| @@ -0,0 +1,50 @@ | |||||
| openapi: 3.0.0 | |||||
| info: | |||||
| title: Beacon Parser API | |||||
| version: 1.0.0 | |||||
| paths: | |||||
| /configs/beacons: | |||||
| get: | |||||
| summary: Retrieve beacon parsing configurations | |||||
| responses: | |||||
| '200': | |||||
| description: A list of beacon protocol definitions | |||||
| content: | |||||
| application/json: | |||||
| schema: | |||||
| type: array | |||||
| items: | |||||
| $ref: '#/components/schemas/BeaconConfig' | |||||
| components: | |||||
| schemas: | |||||
| BeaconConfig: | |||||
| type: object | |||||
| properties: | |||||
| name: | |||||
| type: string | |||||
| example: "Ingics" | |||||
| min: | |||||
| type: integer | |||||
| max: | |||||
| type: integer | |||||
| pattern: | |||||
| type: array | |||||
| items: | |||||
| type: string | |||||
| example: ["0xFF", "0x59"] | |||||
| configs: | |||||
| type: object | |||||
| additionalProperties: | |||||
| $ref: '#/components/schemas/FieldMapping' | |||||
| FieldMapping: | |||||
| type: object | |||||
| properties: | |||||
| offset: | |||||
| type: integer | |||||
| length: | |||||
| type: integer | |||||
| order: | |||||
| type: string | |||||
| enum: [littleendian, bigendian] | |||||
| @@ -94,6 +94,10 @@ services: | |||||
| environment: | environment: | ||||
| - VALKEY_URL=valkey:6379 | - VALKEY_URL=valkey:6379 | ||||
| - KAFKA_URL=kafka:29092 | - KAFKA_URL=kafka:29092 | ||||
| - DBHost=db | |||||
| - DBUser=postgres | |||||
| - DBPass=postgres | |||||
| - DBName=postgres | |||||
| ports: | ports: | ||||
| - "127.0.0.1:1902:1902" | - "127.0.0.1:1902:1902" | ||||
| depends_on: | depends_on: | ||||
| @@ -113,7 +117,7 @@ services: | |||||
| container_name: presense-bridge | container_name: presense-bridge | ||||
| environment: | environment: | ||||
| - KAFKA_URL=kafka:29092 | - KAFKA_URL=kafka:29092 | ||||
| - MQTT_HOST=192.168.1.101:1883 | |||||
| - MQTT_HOST=192.168.1.101 | |||||
| - MQTT_USERNAME=user | - MQTT_USERNAME=user | ||||
| - MQTT_PASSWORD=pass | - MQTT_PASSWORD=pass | ||||
| depends_on: | depends_on: | ||||
| @@ -13,5 +13,6 @@ FROM alpine:latest | |||||
| RUN apk add --no-cache ca-certificates | RUN apk add --no-cache ca-certificates | ||||
| WORKDIR /app | WORKDIR /app | ||||
| COPY --from=builder /app/decoder . | COPY --from=builder /app/decoder . | ||||
| COPY --from=builder /app/cmd/decoder/config.json ./cmd/decoder/config.json | |||||
| ENTRYPOINT ["./decoder"] | ENTRYPOINT ["./decoder"] | ||||