yats.git

commit 65c512f75b1c711811c4b245a085bac8c45151c9

Author: Paolo Lulli <paolo@lulli.net>

Local versions

 .gitignore | 2 +
 .goreleaser.yaml | 61 -------------------------------------------
 .idea/.gitignore | 8 +++++
 .idea/misc.xml | 6 ++++
 .idea/modules.xml | 8 +++++
 .idea/vcs.xml | 6 ++++
 .idea/yats.iml | 10 +++++++
 clients/shell/LogNow.sh | 3 +
 compose.yml | 19 -------------
 openapi/swagger.json | 30 ++++----------------
 openapi/swagger.yaml | 24 ++++------------


diff --git a/.gitignore b/.gitignore
index 36f3fc893fb1a2c6f5430d07dcf02fb130b23f23..7a7d39fb725480b084e0cea67d80d6bee4c6530a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,5 @@ .dqt
 server/.dqt
 .vscode/
 */nohup.out
+
+dist/




diff --git a/.goreleaser.yaml b/.goreleaser.yaml
deleted file mode 100644
index 4f964141fdcdb5207080fdc1713e214755d1ae51..0000000000000000000000000000000000000000
--- a/.goreleaser.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
-project_name: yats
-version: 2
-
-
-
-before:
-  hooks:
-    # You may remove this if you don't use go modules.
-    #- go mod tidy
-    # you may remove this if you don't need go generate
-    #- go generate ./...
-
-builds:
-  main: ./server/main.go
-  env:
-      - CGO_ENABLED=0
-  goos:
-     - linux
-     - windows
-     - darwin
-     - freebsd
-#Configuration for building packages for rpm and deb package managers
-nfpms:
-  - package_name: yats
-    homepage: https://kevwe.com
-    maintainer: Paolo Lulli <paolo@lulli.net>
-    description: |-
-            My own package description
-    formats:
-      - rpm
-      - deb
-
-archives:
-  - format: tar.gz
-    # this name template makes the OS and Arch compatible with the results of `uname`.
-    name_template: >-
-      {{ .ProjectName }}_
-      {{- title .Os }}_
-      {{- if eq .Arch "amd64" }}x86_64
-      {{- else if eq .Arch "386" }}i386
-      {{- else }}{{ .Arch }}{{ end }}
-      {{- if .Arm }}v{{ .Arm }}{{ end }}
-    # use zip for windows archives
-    format_overrides:
-      - goos: windows
-        format: zip
-          #      - goos: linux
-          #format: deb
-
-changelog:
-  sort: asc
-  filters:
-    exclude:
-      - "^docs:"
-      - "^test:"
-
-uploads:
-  - name: production
-    client_x509_cert: path/to/client.cert.pem
-    client_x509_key: path/to/client.key.pem
-    target: "http://some.server/some/path/example-repo-local/{{ .ProjectName }}/{{ .Version }}/{{ .Os }}/{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}"




diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..13566b81b018ad684f3a35fee301741b2734c8f4
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml




diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6f29fee2f2b3b412625a792b92bcd1263e5b765a
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>
\ No newline at end of file




diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000000000000000000000000000000000000..16fa7a7ede6293a0b65bd589e9748386912c2d78
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/yats.iml" filepath="$PROJECT_DIR$/.idea/yats.iml" />
+    </modules>
+  </component>
+</project>
\ No newline at end of file




diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000000000000000000000000000000000000..35eb1ddfbbc029bcab630581847471d7f238ec53
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+  </component>
+</project>
\ No newline at end of file




diff --git a/.idea/yats.iml b/.idea/yats.iml
new file mode 100644
index 0000000000000000000000000000000000000000..25ed3f6e7b6e344b6ca91ebcc5d005f35357f9cf
--- /dev/null
+++ b/.idea/yats.iml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="Go" enabled="true" />
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>
\ No newline at end of file




diff --git a/clients/shell/LogNow.sh b/clients/shell/LogNow.sh
index cd3cc26440998ed9ca208c370134b32e813acf56..f8746ce50e48bb255fdb7029cf53c32795594773 100755
--- a/clients/shell/LogNow.sh
+++ b/clients/shell/LogNow.sh
@@ -5,4 +5,5 @@ 	-X POST\
 	--header "Content-Type: application/json"\
 	--header "X-SSL-Client-CN: something"\
 	-d '{"id_client":"test-cli","name":"test-log","value":"A log message"}'\
-	http://127.0.0.1:18081/metric
+	http://build-server:18081/metric
+	#http://127.0.0.1:18081/metric




diff --git a/compose.yml b/compose.yml
deleted file mode 100644
index 724c33bd5145433827a1f66f7b32037874bba034..0000000000000000000000000000000000000000
--- a/compose.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-services:
-  #  yats-server:
-  #  build: server
-  #  ports:
-  #    - 8080:8080
-
-  cassandra:
-    image: cassandra:latest
-    container_name: cassandra-container
-    ports:
-      - "9042:9042"
-    environment:
-      - CASSANDRA_USER=admin
-      - CASSANDRA_PASSWORD=admin
-    volumes:
-      - cassandra-data:/var/lib/cassandra
-
-volumes:
-  cassandra-data:




diff --git a/openapi/swagger.json b/openapi/swagger.json
index 9c226e3acae8029699206c2105ef67a805895990..d5951325181585493b3e60121b7fab9d4eca3f47 100755
--- a/openapi/swagger.json
+++ b/openapi/swagger.json
@@ -1,13 +1,10 @@
 {
     "components": {
         "schemas": {
-            "model.EventModel": {
+            "model.EventRequest": {
                 "properties": {
                     "etime": {
                         "type": "integer"
-                    },
-                    "id_client": {
-                        "type": "string"
                     },
                     "name": {
                         "type": "string"
@@ -19,9 +16,6 @@             "model.EventSearchRequest": {
                 "properties": {
                     "from": {
                         "type": "integer"
-                    },
-                    "id_client": {
-                        "type": "string"
                     },
                     "source": {
                         "type": "string"
@@ -32,11 +26,8 @@                     }
                 },
                 "type": "object"
             },
-            "model.MetricModel": {
+            "model.MetricRequest": {
                 "properties": {
-                    "id_client": {
-                        "type": "string"
-                    },
                     "mtime": {
                         "type": "integer"
                     },
@@ -54,9 +45,6 @@                 "properties": {
                     "from": {
                         "type": "integer"
                     },
-                    "id_client": {
-                        "type": "string"
-                    },
                     "name": {
                         "type": "string"
                     },
@@ -69,11 +57,8 @@                     }
                 },
                 "type": "object"
             },
-            "model.PositionModel": {
+            "model.PositionRequest": {
                 "properties": {
-                    "id_client": {
-                        "type": "string"
-                    },
                     "lat": {
                         "description": "TODO Check parquet types",
                         "type": "number"
@@ -96,9 +81,6 @@                 "properties": {
                     "from": {
                         "type": "integer"
                     },
-                    "id_client": {
-                        "type": "string"
-                    },
                     "source": {
                         "type": "string"
                     },
@@ -149,7 +131,7 @@                 "requestBody": {
                     "content": {
                         "application/json": {
                             "schema": {
-                                "$ref": "#/components/schemas/model.EventModel"
+                                "$ref": "#/components/schemas/model.EventRequest"
                             }
                         }
                     },
@@ -290,7 +272,7 @@                 "requestBody": {
                     "content": {
                         "application/json": {
                             "schema": {
-                                "$ref": "#/components/schemas/model.MetricModel"
+                                "$ref": "#/components/schemas/model.MetricRequest"
                             }
                         }
                     },
@@ -428,7 +410,7 @@                 "requestBody": {
                     "content": {
                         "application/json": {
                             "schema": {
-                                "$ref": "#/components/schemas/model.PositionModel"
+                                "$ref": "#/components/schemas/model.PositionRequest"
                             }
                         }
                     },




diff --git a/openapi/swagger.yaml b/openapi/swagger.yaml
index 235e60f577c88fa21ff5eaa5d20dd7fb3c35eadc..8cdade98e82e72445a0efdfa84e3a258faf20d79 100755
--- a/openapi/swagger.yaml
+++ b/openapi/swagger.yaml
@@ -1,11 +1,9 @@
 components:
     schemas:
-        model.EventModel:
+        model.EventRequest:
             properties:
                 etime:
                     type: integer
-                id_client:
-                    type: string
                 name:
                     type: string
             type: object
@@ -13,17 +11,13 @@         model.EventSearchRequest:
             properties:
                 from:
                     type: integer
-                id_client:
-                    type: string
                 source:
                     type: string
                 to:
                     type: integer
             type: object
-        model.MetricModel:
+        model.MetricRequest:
             properties:
-                id_client:
-                    type: string
                 mtime:
                     type: integer
                 name:
@@ -35,8 +29,6 @@         model.MetricSearchRequest:
             properties:
                 from:
                     type: integer
-                id_client:
-                    type: string
                 name:
                     type: string
                 source:
@@ -44,10 +36,8 @@                     type: string
                 to:
                     type: integer
             type: object
-        model.PositionModel:
+        model.PositionRequest:
             properties:
-                id_client:
-                    type: string
                 lat:
                     description: TODO Check parquet types
                     type: number
@@ -63,8 +53,6 @@         model.PositionSearchRequest:
             properties:
                 from:
                     type: integer
-                id_client:
-                    type: string
                 source:
                     type: string
                 to:
@@ -101,7 +89,7 @@             requestBody:
                 content:
                     application/json:
                         schema:
-                            $ref: '#/components/schemas/model.EventModel'
+                            $ref: '#/components/schemas/model.EventRequest'
                 description: Event body data
                 required: true
                 x-originalParamName: event1
@@ -191,7 +179,7 @@             requestBody:
                 content:
                     application/json:
                         schema:
-                            $ref: '#/components/schemas/model.MetricModel'
+                            $ref: '#/components/schemas/model.MetricRequest'
                 description: Metric request body
                 required: true
                 x-originalParamName: metric2
@@ -279,7 +267,7 @@             requestBody:
                 content:
                     application/json:
                         schema:
-                            $ref: '#/components/schemas/model.PositionModel'
+                            $ref: '#/components/schemas/model.PositionRequest'
                 description: Position body data
                 required: true
                 x-originalParamName: position