diff --git a/README.md b/README.md index ee0612daf556eb709e928ad37c3029f9db74109c..516b92a1a318ab925e7ba2a5aa8292d2b70f60b3 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,17 @@ **_What's New in v1.10.0!_** -:zap: **New MEC Federation service: [ETSI MEC040 - MEC Federation Service API](https://interdigitalinc.github.io/AdvantEDGE/docs/overview/edge-services/#mec-federation-service)** +:zap: **New edge native service: [ETSI MEC Profile for CAPIF](https://interdigitalinc.github.io/AdvantEDGE/docs/overview/edge-services/#edge-platform-application-enablement-service)** -:zap: **New command line api: ** +:zap: **New edge native service: [ETSI MEC040 - MEC Federation API](https://interdigitalinc.github.io/AdvantEDGE/docs/overview/edge-services/#mec-federation-service)** + +:zap: **Service API upgrade to MEC Phase 3 for [ETSI MEC011](https://interdigitalinc.github.io/AdvantEDGE/docs/overview/edge-services/#edge-platform-application-enablement-service), [ETSI MEC012](https://interdigitalinc.github.io/AdvantEDGE/docs/overview/edge-services/#radio-network-information-service), [ETSI MEC013](https://interdigitalinc.github.io/AdvantEDGE/docs/overview/edge-services/#location-service), [ETSI MEC021](https://interdigitalinc.github.io/AdvantEDGE/docs/overview/edge-services/#application-mobility-service), [ETSI MEC030](https://interdigitalinc.github.io/AdvantEDGE/docs/overview/edge-services/#v2x-information-service), [ETSI MEC033](https://interdigitalinc.github.io/AdvantEDGE/docs/overview/edge-services/#iot-api) and [ETSI MEC040](https://interdigitalinc.github.io/AdvantEDGE/docs/overview/edge-services/#mec-federation-service) :arrow_up:** + +:zap: **New command line api to develop MEC application/service without GUI** + +:zap: **General maintenance :hammer_and_wrench:** + +:zap: **Don't hesitate to reach out to us by initiating a [GitHub Discussion](https://github.com/InterDigitalInc/AdvantEDGE/discussions) :octocat:** ------ diff --git a/charts/meep-iot/.helmignore b/charts/meep-iot/.helmignore new file mode 100644 index 0000000000000000000000000000000000000000..f0c13194444163d1cba5c67d9e79231a62bc8f44 --- /dev/null +++ b/charts/meep-iot/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/charts/meep-iot/Chart.yaml b/charts/meep-iot/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e148b97873c06df05318097fe7d66491198b6379 --- /dev/null +++ b/charts/meep-iot/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: '1.0.0' +description: MEEP IOT Information Service Helm chart for Kubernetes +name: meep-iot +version: 1.0.0 diff --git a/charts/meep-iot/templates/_helpers.tpl b/charts/meep-iot/templates/_helpers.tpl new file mode 100644 index 0000000000000000000000000000000000000000..43ab1ed99065087e95e63b8f03dfa562994ec2fd --- /dev/null +++ b/charts/meep-iot/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "meep-iot.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "meep-iot.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "meep-iot.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/charts/meep-iot/templates/clusterrolebinding.yaml b/charts/meep-iot/templates/clusterrolebinding.yaml new file mode 100644 index 0000000000000000000000000000000000000000..09442d4ff4a8be864d6ba024e53ff5d0d855312a --- /dev/null +++ b/charts/meep-iot/templates/clusterrolebinding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: "{{ .Release.Namespace }}:{{ template "meep-iot.fullname" . }}" +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- kind: ServiceAccount + name: {{ template "meep-iot.fullname" . }} + namespace: {{ .Release.Namespace }} diff --git a/charts/meep-iot/templates/codecov-pv.yaml b/charts/meep-iot/templates/codecov-pv.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4935d8a105d30b290f1440abaaf327217a925f5a --- /dev/null +++ b/charts/meep-iot/templates/codecov-pv.yaml @@ -0,0 +1,35 @@ +{{- if .Values.codecov.enabled}} +kind: PersistentVolume +apiVersion: v1 +metadata: + name: meep-iot-codecov-pv +spec: + storageClassName: meep-iot-codecov-sc + capacity: + storage: 100Mi + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + hostPath: + path: {{ .Values.codecov.location }} + +--- +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: meep-iot-codecov-sc +proiotioner: kubernetes.io/no-proiotioner +volumeBindingMode: WaitForFirstConsumer +--- +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: meep-iot-codecov-pvc +spec: + storageClassName: meep-iot-codecov-sc + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +{{- end}} diff --git a/charts/meep-iot/templates/deployment.yaml b/charts/meep-iot/templates/deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e4246fe2a801921e9e55f757e19b542185c08657 --- /dev/null +++ b/charts/meep-iot/templates/deployment.yaml @@ -0,0 +1,61 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "meep-iot.fullname" . }} + labels: + app: {{ template "meep-iot.name" . }} + chart: {{ template "meep-iot.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + meepOrigin: {{ .Values.meepOrigin }} +spec: + replicas: {{ .Values.deployment.replicas }} + selector: + matchLabels: + app: {{ template "meep-iot.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "meep-iot.name" . }} + release: {{ .Release.Name }} + meepOrigin: {{ .Values.meepOrigin }} + spec: + serviceAccountName: {{ .Values.serviceAccount }} + {{- if .Values.codecov.enabled}} + volumes: + - name: codecov-storage + persistentVolumeClaim: + claimName: meep-iot-codecov-pvc + {{- end}} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.deployment.port }} + protocol: {{ .Values.deployment.protocol }} + env: + {{- range $key, $value := .Values.image.env }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- if .Values.codecov.enabled}} + volumeMounts: + - name: codecov-storage + mountPath: /codecov + {{- end}} + terminationGracePeriodSeconds: 5 + initContainers: + {{- range $value := .Values.deployment.dependencies.system }} + - name: init-system-{{ $value }} + image: busybox:1.28 + imagePullPolicy: IfNotPresent + command: ['sh', '-c', 'until nslookup {{ $value }}.kube-system ; do echo waiting for {{ $value }}; sleep 0.25; done;'] + {{- end}} + {{- range $value := .Values.deployment.dependencies.namespace }} + - name: init-{{ $value }} + image: busybox:1.28 + imagePullPolicy: IfNotPresent + command: ['sh', '-c', 'until nslookup {{ $value }} ; do echo waiting for {{ $value }}; sleep 0.25; done;'] + {{- end}} diff --git a/charts/meep-iot/templates/ingress.yaml b/charts/meep-iot/templates/ingress.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3ff653f5cff88b88f68f583a97ec1fb8f23bbc6a --- /dev/null +++ b/charts/meep-iot/templates/ingress.yaml @@ -0,0 +1,42 @@ +{{- if .Values.ingress.enabled -}} +{{- $serviceName := .Values.service.name -}} +{{- $servicePort := .Values.service.port -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ $serviceName }} + labels: + app: {{ template "meep-iot.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- if .Values.ingress.labels }} +{{ toYaml .Values.ingress.labels | indent 4 }} +{{- end }} + annotations: + {{- range $key, $value := .Values.ingress.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + rules: + {{- range .Values.ingress.hosts }} + - http: + paths: + {{- range $path := .paths }} + - path: {{ $path }} + pathType: ImplementationSpecific + backend: + service: + name: {{ $serviceName }} + port: + number: {{ $servicePort }} + {{- end -}} + {{- if .name }} + host: {{ .name }} + {{- end }} + {{- end -}} + {{- if .Values.ingress.tls }} + tls: +{{ toYaml .Values.ingress.tls | indent 4 }} + {{- end -}} +{{- end -}} diff --git a/charts/meep-iot/templates/monitor.yaml b/charts/meep-iot/templates/monitor.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a3e169d64dc3aa91895de3b3190634579752af93 --- /dev/null +++ b/charts/meep-iot/templates/monitor.yaml @@ -0,0 +1,33 @@ +{{- if .Values.prometheus.monitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "meep-iot.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "meep-iot.name" . }} + chart: {{ template "meep-iot.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + meepOrigin: {{ .Values.meepOrigin }} + {{- if .Values.prometheus.monitor.additionalLabels }} +{{ toYaml .Values.prometheus.monitor.additionalLabels | indent 4 }} + {{- end }} +spec: + selector: + matchLabels: + app: {{ template "meep-iot.name" . }} + release: {{ .Release.Name }} + endpoints: + - port: metrics + {{- if .Values.prometheus.monitor.interval }} + interval: {{ .Values.prometheus.monitor.interval }} + {{- end }} + {{- if .Values.prometheus.monitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.prometheus.monitor.scrapeTimeout }} + {{- end }} +{{- if .Values.prometheus.monitor.relabelings }} + relabelings: +{{ toYaml .Values.prometheus.monitor.relabelings | indent 6 }} +{{- end }} +{{- end }} diff --git a/charts/meep-iot/templates/service.yaml b/charts/meep-iot/templates/service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cfa9f30931e9b7bd9dcfe5dd1fbb278568943b58 --- /dev/null +++ b/charts/meep-iot/templates/service.yaml @@ -0,0 +1,28 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.service.name }} + labels: + app: {{ template "meep-iot.name" . }} + chart: {{ template "meep-iot.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + meepOrigin: {{ .Values.meepOrigin }} +spec: + type: {{ .Values.service.type }} + selector: + app: {{ template "meep-iot.name" . }} + release: {{ .Release.Name }} + ports: + - name: iot + port: {{ .Values.service.port }} + targetPort: {{ .Values.deployment.port }} + {{- if .Values.service.nodePort }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} + {{- if .Values.prometheus.monitor.enabled}} + - name: metrics + port: {{ .Values.prometheus.monitor.port }} + targetPort: {{ .Values.prometheus.monitor.port }} + protocol: TCP + {{- end}} diff --git a/charts/meep-iot/templates/serviceaccount.yaml b/charts/meep-iot/templates/serviceaccount.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0ab6a7917520f63d359701019ed0a13fe84a6788 --- /dev/null +++ b/charts/meep-iot/templates/serviceaccount.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "meep-iot.fullname" . }} diff --git a/charts/meep-iot/values-template.yaml b/charts/meep-iot/values-template.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5d0a231ed3f59ad92b3b38d25d7102825d295b8c --- /dev/null +++ b/charts/meep-iot/values-template.yaml @@ -0,0 +1,85 @@ +# Default values for meep-iot. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +deployment: + replicas: 1 + port: 80 + protocol: TCP + dependencies: + system: + {{- if not .IsMepService }} + - kube-dns + {{- end }} + namespace: + +image: + repository: meep-docker-registry:30001/meep-iot + tag: latest + pullPolicy: Always + env: + MEEP_INSTANCE_ID: {{.InstanceId}} + MEEP_SANDBOX_NAME: {{.SandboxName}} + MEEP_SVC_PATH: /iots/v1 + MEEP_HOST_URL: {{.HostUrl}} + {{- if .IsMepService }} + MEEP_MEP_NAME: {{.MepName}} + {{- end }} + {{- if eq .AppEnablement "local" }} + MEEP_APP_ENABLEMENT: {{.MepName}}-meep-app-enablement + {{- else if eq .AppEnablement "global" }} + MEEP_APP_ENABLEMENT: meep-app-enablement + {{- end }} + {{- range .Env}} + {{.}} + {{- end}} + +service: + {{- if .IsMepService }} + name: {{.MepName}}-meep-iot + {{- else }} + name: meep-iot + {{- end }} + type: ClusterIP + port: 80 + +ingress: + enabled: true + hosts: + - name: '' + paths: + {{- if .IsMepService }} + - /{{.SandboxName}}/{{.MepName}}/iots + {{- else }} + - /{{.SandboxName}}/iots + {{- end }} + annotations: + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/force-ssl-redirect: {{ .HttpsOnly }} + {{- if .IsMepService }} + nginx.ingress.kubernetes.io/configuration-snippet: | + rewrite ^/{{.SandboxName}}/{{.MepName}}/iots(/|$)(.*)$ /iots/$2 break; + {{- else }} + nginx.ingress.kubernetes.io/configuration-snippet: | + rewrite ^/{{.SandboxName}}/iots(/|$)(.*)$ /iots/$2 break; + {{- end }} + {{- if .AuthEnabled }} + nginx.ingress.kubernetes.io/auth-url: https://$http_host/auth/v1/authenticate?svc=meep-iot&sbox={{.SandboxName}}&mep={{.MepName}} + {{- end }} + labels: {} + tls: + +prometheus: + monitor: + enabled: true + port: 9000 + interval: 10s + additionalLabels: {} + relabelings: [] + scrapeTimeout: 5s + +codecov: + enabled: false + location: "/codecov/meep-iot" + +meepOrigin: core diff --git a/docs/api-iot/Addresses.md b/docs/api-iot/Addresses.md new file mode 100644 index 0000000000000000000000000000000000000000..0ea47be3b641d731492a560a536ac47da04558e0 --- /dev/null +++ b/docs/api-iot/Addresses.md @@ -0,0 +1,10 @@ +# Addresses + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | Host portion of the address. | [default to null] +**Port** | **int32** | Port portion of the address. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/DeviceInfo.md b/docs/api-iot/DeviceInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..58d4bea5a4fcabea494a2cb19d1ed0f4048399f2 --- /dev/null +++ b/docs/api-iot/DeviceInfo.md @@ -0,0 +1,25 @@ +# DeviceInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceAuthenticationInfo** | **string** | Information needed for secondary authentication of the IoT device to the data network - see ETSI TS 129 561 [i.4] and ETSI TS 129 061 [i.5] for 5G and LTE procedures, respectively. This attribute is implementation dependent and should be logically linked to the identifiers of the IoT device listed hereafter. | [default to null] +**DeviceMetadata** | [**[]KeyValuePair**](KeyValuePair.md) | Additional information about the IoT device. This attribute is implementation dependent and may be expressed as an array of keyvalue pairs. | [optional] [default to null] +**Gpsi** | **string** | GPSI of the IoT device if 5G-enabled (see note 1). | [optional] [default to null] +**Pei** | **string** | PEI of the IoT device if 5G-enabled (see note 1). | [optional] [default to null] +**Supi** | **string** | SUPI of the IoT device if 5G-enabled (see note 1). | [optional] [default to null] +**Msisdn** | **string** | MSISDN of the IoT device if LTE-enabled (see note 1). | [optional] [default to null] +**Imei** | **string** | IMEI of the IoT device if LTE-enabled (see note 1). | [optional] [default to null] +**Imsi** | **string** | IMSI of the IoT device if LTE-enabled (see note 1). | [optional] [default to null] +**Iccid** | **string** | ICCID of the IoT device (see note 1). | [optional] [default to null] +**DeviceId** | **string** | Human-readable identifier of the IoT device. | [default to null] +**RequestedMecTrafficRule** | [**[]TrafficRuleDescriptor**](TrafficRuleDescriptor.md) | MEC traffic rules the IoT device is requested to be associated to (see note 2). The data type definition is as per ETSI GS MEC 010-2 [i.6]. | [optional] [default to null] +**RequestedIotPlatformId** | **string** | IoT platform to which the IoT device is requested to be associated to (see note 2). | [optional] [default to null] +**RequestedUserTransportId** | **string** | User transport to which the IoT device is requested to be associated to (see note 2). | [optional] [default to null] +**DeviceSpecificMessageFormats** | [***DeviceSpecificMessageFormats**](DeviceSpecificMessageFormats.md) | | [optional] [default to null] +**DownlinkInfo** | [***DownlinkInfo**](DownlinkInfo.md) | | [optional] [default to null] +**ClientCertificate** | **string** | Client-side SSL/TLS certificate to be used by the MEC IoTS to interact with the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device. | [optional] [default to null] +**Enabled** | **bool** | Indication whether the IoT device has a valid associated traffic rule (TRUE) or not (FALSE). See note 3. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/DeviceSpecificMessageFormats.md b/docs/api-iot/DeviceSpecificMessageFormats.md new file mode 100644 index 0000000000000000000000000000000000000000..0869c5cb340204d6d1fa70ef89af5bb0c2bd1de9 --- /dev/null +++ b/docs/api-iot/DeviceSpecificMessageFormats.md @@ -0,0 +1,10 @@ +# DeviceSpecificMessageFormats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventMsgFormat** | [***EventMsg**](EventMsg.md) | | [optional] [default to null] +**UplinkMsgFormat** | [***UplinkMsg**](UplinkMsg.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/DownlinkInfo.md b/docs/api-iot/DownlinkInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..ba3d84cf2027f40553d755cf7db72df55f5f02ac --- /dev/null +++ b/docs/api-iot/DownlinkInfo.md @@ -0,0 +1,10 @@ +# DownlinkInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DownlinkTopic** | **string** | Topic associated to the IoT device. This topic should be used by an end IoT application to send downlink data to the IoT device. | [optional] [default to null] +**DevicePort** | **int32** | UDP port to be used by the MEC IoTS for the outgoing downlink packets towards the IoT device. In case a default value is used, this attribute is optional. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/EndPointInfo.md b/docs/api-iot/EndPointInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..9c6821ec76242fbf621b7a23f5e57ff1a0be6cf9 --- /dev/null +++ b/docs/api-iot/EndPointInfo.md @@ -0,0 +1,12 @@ +# EndPointInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uris** | **[]string** | Entry point information of the service as string, formatted according to URI syntax (see IETF RFC 3986 [8]). Shall be used for REST APIs. See note. | [optional] [default to null] +**Fqdn** | **[]string** | Fully Qualified Domain Name of the service. See note. | [optional] [default to null] +**Addresses** | [**[]Addresses**](Addresses.md) | | [optional] [default to null] +**Alternative** | **string** | Entry point information of the service in a format defined by an implementation, or in an external specification. See note. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/EventMsg.md b/docs/api-iot/EventMsg.md new file mode 100644 index 0000000000000000000000000000000000000000..c5af0adb4cac45b4ad4ae257c71d4e25f83fa63c --- /dev/null +++ b/docs/api-iot/EventMsg.md @@ -0,0 +1,18 @@ +# EventMsg + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventTopic** | **string** | Topic where the message containing application-specific information should be published. | [default to null] +**SelectedSerializer** | [***SerializerType**](SerializerType.md) | | [default to null] +**IncludeDeviceAddr** | **bool** | Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeDeviceMetadata** | **bool** | Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludePei** | **bool** | Indication whether to include the PEI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeSupi** | **bool** | Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeImei** | **bool** | Indication whether to include the IMEI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeImsi** | **bool** | Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeIccid** | **bool** | Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeDeviceId** | **bool** | Indication whether to include the human-readable identified of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/ImplSpecificInfo.md b/docs/api-iot/ImplSpecificInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..80c29e783782c08ed12c835712f8e95d51511e0d --- /dev/null +++ b/docs/api-iot/ImplSpecificInfo.md @@ -0,0 +1,11 @@ +# ImplSpecificInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventTopics** | **[]string** | Topics used to publish events related to the established session between the IoT device(s) and the end IoT application(s) on the user transport. | [optional] [default to null] +**UplinkTopics** | **[]string** | Topics used to publish data generated by the IoT device(s) on the user transport, in order to be consumed by the end IoT application(s). | [optional] [default to null] +**DownlinkTopics** | **[]string** | Topics used to publish data generated by the IoT applications(s) on the user transport, in order to be consumed by the end IoT device(s). | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/InlineResponse200.md b/docs/api-iot/InlineResponse200.md new file mode 100644 index 0000000000000000000000000000000000000000..09b79cb8416034f0564b3459c5294fffc71a585a --- /dev/null +++ b/docs/api-iot/InlineResponse200.md @@ -0,0 +1,9 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [***DeviceInfo**](DeviceInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/InlineResponse2001.md b/docs/api-iot/InlineResponse2001.md new file mode 100644 index 0000000000000000000000000000000000000000..cacfbb80487867c65da1c653668bb468ce286d36 --- /dev/null +++ b/docs/api-iot/InlineResponse2001.md @@ -0,0 +1,9 @@ +# InlineResponse2001 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IotPlatformInfo** | [***IotPlatformInfo**](IotPlatformInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/InterfaceDescriptor.md b/docs/api-iot/InterfaceDescriptor.md new file mode 100644 index 0000000000000000000000000000000000000000..6be8d4353e414ab89f0d904a2a0cba1517458172 --- /dev/null +++ b/docs/api-iot/InterfaceDescriptor.md @@ -0,0 +1,13 @@ +# InterfaceDescriptor + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InterfaceType** | **string** | Type of interface: TUNNEL, MAC, IP, etc. | [default to null] +**TunnelInfo** | [***TunnelInfo**](TunnelInfo.md) | | [optional] [default to null] +**SrcMACAddress** | **string** | If the interface type is MAC, the source address identifies the MAC address of the interface. | [optional] [default to null] +**DstMACAddress** | **string** | If the interface type is MAC, the destination address identifies the MAC address of the destination. Only used for dstInterface. | [optional] [default to null] +**DstIPAddress** | **string** | If the interface type is IP, the destination address identifies the IP address of the destination. Only used for dstInterface. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/IotPlatformInfo.md b/docs/api-iot/IotPlatformInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..d96c7a45ccb0d3add34e21aaab469605d97bd177 --- /dev/null +++ b/docs/api-iot/IotPlatformInfo.md @@ -0,0 +1,12 @@ +# IotPlatformInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IotPlatformId** | **string** | Identifier of the IoT platform. | [default to null] +**UserTransportInfo** | [**[]MbTransportInfo**](MBTransportInfo.md) | Information about the user transport(s) provided by the IoT platform. | [default to null] +**CustomServicesTransportInfo** | [**[]TransportInfo**](TransportInfo.md) | Transport enabling access to vendor-specific services provided by the IoT platform. The data type definition is as per ETSI GS MEC 011 [i.2]. | [optional] [default to null] +**Enabled** | **bool** | Indication whether the IoT platform is capable of providing user transports and vendor-specific services (TRUE) or not (FALSE). | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/KeyValuePair.md b/docs/api-iot/KeyValuePair.md new file mode 100644 index 0000000000000000000000000000000000000000..45ef9c0e85767dc613e04364bf3adfc577c57014 --- /dev/null +++ b/docs/api-iot/KeyValuePair.md @@ -0,0 +1,10 @@ +# KeyValuePair + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | | [optional] [default to null] +**Value** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/MbTransportInfo.md b/docs/api-iot/MbTransportInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..6a68795f954541145bf1838304977b550a7cd68b --- /dev/null +++ b/docs/api-iot/MbTransportInfo.md @@ -0,0 +1,17 @@ +# MbTransportInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The identifier of this transport as per ETSI GS MEC 011 [i.2]. | [default to null] +**Name** | **string** | The name of this transport as per ETSI GS MEC 011 [i.2]. | [default to null] +**Description** | **string** | Human-readable description of this transport as per ETSI GS MEC 011 [i.2]. | [optional] [default to null] +**Type_** | [***TransportType**](TransportType.md) | | [default to null] +**Protocol** | **string** | The name of the protocol used. Being the transport of MB_TOPIC_BASED type, this attribute should be typically set to \"MQTT\" or \"AMQP.\" | [default to null] +**Version** | **string** | The version of the protocol used as per ETSI GS MEC 011 [i.2]. | [default to null] +**Endpoint** | [***EndPointInfo**](EndPointInfo.md) | | [default to null] +**Security** | [***SecurityInfo**](SecurityInfo.md) | | [default to null] +**ImplSpecificInfo** | [***ImplSpecificInfo**](ImplSpecificInfo.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/OAuth2Info.md b/docs/api-iot/OAuth2Info.md new file mode 100644 index 0000000000000000000000000000000000000000..2036501367684811b6b51823f52c3b4b64a26fcb --- /dev/null +++ b/docs/api-iot/OAuth2Info.md @@ -0,0 +1,10 @@ +# OAuth2Info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GrantTypes** | **[]string** | List of supported OAuth 2.0 grant types. Each entry shall be one of the following permitted values: - OAUTH2_AUTHORIZATION_CODE: Authorization code grant type - OAUTH2_IMPLICIT_GRANT: Implicit grant type - OAUTH2_RESOURCE_OWNER: Resource owner password credentials grant type - OAUTH2_CLIENT_CREDENTIALS: Client credentials grant type Only the value \"OAUTH2_CLIENT_CREDENTIALS\" is supported in the present document. | [default to null] +**TokenEndpoint** | **string** | The token endpoint. Shall be present unless the grant type is OAUTH2_IMPLICIT_GRANT. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/ProblemDetails.md b/docs/api-iot/ProblemDetails.md new file mode 100644 index 0000000000000000000000000000000000000000..f2596ffa3944f557c5f98c6a7ff38b6430c3dd58 --- /dev/null +++ b/docs/api-iot/ProblemDetails.md @@ -0,0 +1,13 @@ +# ProblemDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type_** | **string** | A URI reference according to IETF RFC 3986 that identifies the problem type | [optional] [default to null] +**Title** | **string** | A short, human-readable summary of the problem type | [optional] [default to null] +**Status** | **int32** | The HTTP status code for this occurrence of the problem | [optional] [default to null] +**Detail** | **string** | A human-readable explanation specific to this occurrence of the problem | [optional] [default to null] +**Instance** | **string** | A URI reference that identifies the specific occurrence of the problem | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/RegDevApi.md b/docs/api-iot/RegDevApi.md new file mode 100644 index 0000000000000000000000000000000000000000..6927235585df40767313da72af2385176f36bafb --- /dev/null +++ b/docs/api-iot/RegDevApi.md @@ -0,0 +1,160 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/sandboxname/amsi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RegistereddevicesByIdDELETE**](RegDevApi.md#RegistereddevicesByIdDELETE) | **Delete** /registered_devices/{registeredDeviceId} | Deregister a device - see clause 5.2.6. +[**RegistereddevicesByIdGET**](RegDevApi.md#RegistereddevicesByIdGET) | **Get** /registered_devices/{registeredDeviceId} | Retrieve information about a device - see clause 5.2.4. +[**RegistereddevicesByIdPUT**](RegDevApi.md#RegistereddevicesByIdPUT) | **Put** /registered_devices/{registeredDeviceId} | Update information about a device including its association to a valid traffic rule - see clauses 5.2.5 and 5.4.3. +[**RegistereddevicesGET**](RegDevApi.md#RegistereddevicesGET) | **Get** /registered_devices | Retrieve information about all devices with a valid traffic rule association - see clause 5.2.2. +[**RegistereddevicesPOST**](RegDevApi.md#RegistereddevicesPOST) | **Post** /registered_devices | Register a new device - see clause 5.2.3. + +# **RegistereddevicesByIdDELETE** +> RegistereddevicesByIdDELETE(ctx, registeredDeviceId) +Deregister a device - see clause 5.2.6. + +The DELETE method may be used by a service consumer to deregister a device. This method is typically used in the \"device deregistration\" procedure as described in clause 5.2.6. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registeredDeviceId** | **string**| The unique identifier of the registered device. | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegistereddevicesByIdGET** +> RegisteredDevicesBody RegistereddevicesByIdGET(ctx, registeredDeviceId) +Retrieve information about a device - see clause 5.2.4. + +The GET method may be used by a service consumer to retrieve information about a device. This method is typically used in the \"device registration query\" procedure as described in clause 5.2.4. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registeredDeviceId** | **string**| The unique identifier of the registered device. | + +### Return type + +[**RegisteredDevicesBody**](registered_devices_body.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegistereddevicesByIdPUT** +> RegisteredDevicesRegisteredDeviceIdBody RegistereddevicesByIdPUT(ctx, body, registeredDeviceId) +Update information about a device including its association to a valid traffic rule - see clauses 5.2.5 and 5.4.3. + +The PUT method may be used by a service consumer to update a device registration including its association to a valid traffic rule. This method is typically used in the \"device registration update\" procedure as described in clause 5.2.5 and in the \"user transport assignment\" procedure as described in clause 5.4.3. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**RegisteredDevicesRegisteredDeviceIdBody**](RegisteredDevicesRegisteredDeviceIdBody.md)| One or more updated attributes that are allowed to be changed are included in the DeviceInfo data structure in the payload body of the request. . | + **registeredDeviceId** | **string**| The unique identifier of the registered device. | + +### Return type + +[**RegisteredDevicesRegisteredDeviceIdBody**](registered_devices_registeredDeviceId_body.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegistereddevicesGET** +> InlineResponse200 RegistereddevicesGET(ctx, optional) +Retrieve information about all devices with a valid traffic rule association - see clause 5.2.2. + +The GET method may be used by a service consumer to retrieve information about all devices with a valid traffic rule association. This method is typically used in the \"registered devices query\" procedure as described in clause 5.2.2. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***RegDevApiRegistereddevicesGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a RegDevApiRegistereddevicesGETOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filter** | **optional.String**| Attribute-based filtering parameters according to ETSI GS MEC 009 [i.1]. The API producer shall support receiving the following filtering parameters as part of the URI query string: \"(eq,enabled,TRUE)\". | + **fields** | [**optional.Interface of []string**](string.md)| The list may contain one or more of the following attributes from the DeviceInfo data type: - deviceMetadata - gpsi - msisdn - deviceId - requestedMecTrafficRule - requestedIotPlatformId - requestedUserTransportId | + +### Return type + +[**InlineResponse200**](inline_response_200.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegistereddevicesPOST** +> RegisteredDevicesBody RegistereddevicesPOST(ctx, body) +Register a new device - see clause 5.2.3. + +The POST method may be used by a service consumer to register a new device. This method is typically used in the \"device registration\" procedure as described in clause 5.2.3. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**RegisteredDevicesBody**](RegisteredDevicesBody.md)| Payload body in the request contains the information associated to the IoT device to be registered. | + +### Return type + +[**RegisteredDevicesBody**](registered_devices_body.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/api-iot/RegIotPlatApi.md b/docs/api-iot/RegIotPlatApi.md new file mode 100644 index 0000000000000000000000000000000000000000..3041d85f50b2c75458a2e2b7eb598263178aa413 --- /dev/null +++ b/docs/api-iot/RegIotPlatApi.md @@ -0,0 +1,167 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/sandboxname/amsi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RegisterediotplatformsByIdDELETE**](RegIotPlatApi.md#RegisterediotplatformsByIdDELETE) | **Delete** /registered_iot_platforms/{registeredIotPlatformId} | Deregister a IoT platform - see clause 5.3.6. +[**RegisterediotplatformsByIdGET**](RegIotPlatApi.md#RegisterediotplatformsByIdGET) | **Get** /registered_iot_platforms/{registeredIotPlatformId} | Discover native services and obtain information about user transports provided by a IoT platform - see clauses 5.3.3 and 5.4.2. +[**RegisterediotplatformsByIdPUT**](RegIotPlatApi.md#RegisterediotplatformsByIdPUT) | **Put** /registered_iot_platforms/{registeredIotPlatformId} | Update information about a IoT platform - see clause 5.3.5. +[**RegisterediotplatformsGET**](RegIotPlatApi.md#RegisterediotplatformsGET) | **Get** /registered_iot_platforms | Retrieve information about all IoT platforms - see clause 5.3.2. +[**RegisterediotplatformsPOST**](RegIotPlatApi.md#RegisterediotplatformsPOST) | **Post** /registered_iot_platforms | Register a IoT platform - see clause 5.3.4. + +# **RegisterediotplatformsByIdDELETE** +> RegisterediotplatformsByIdDELETE(ctx, registeredIotPlatformId) +Deregister a IoT platform - see clause 5.3.6. + +The DELETE method may be used by a service consumer to deregister a IoT platform. This method is typically used in the \"IoT platform deregistration\" procedure as described in clause 5.3.6. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registeredIotPlatformId** | **string**| The unique identifier of the registered IoT platform. | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegisterediotplatformsByIdGET** +> InlineResponse2001 RegisterediotplatformsByIdGET(ctx, registeredIotPlatformId, optional) +Discover native services and obtain information about user transports provided by a IoT platform - see clauses 5.3.3 and 5.4.2. + +The GET method may be used by a service consumer to obtain information about a IoT platform. This method is typically used in the \"IoT platform information request\" procedure as described in clause 5.3.3 and in the \"user transport query\" procedure as described in clause 5.4.2. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registeredIotPlatformId** | **string**| The unique identifier of the registered IoT platform. | + **optional** | ***RegIotPlatApiRegisterediotplatformsByIdGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a RegIotPlatApiRegisterediotplatformsByIdGETOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | [**optional.Interface of []string**](string.md)| The list may contain one or more of the following attributes from the IotPlatformInfo data type: - userTransportInfo - customServiceTransportInfo | + +### Return type + +[**InlineResponse2001**](inline_response_200_1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegisterediotplatformsByIdPUT** +> RegisteredIotPlatformsRegisteredIotPlatformIdBody RegisterediotplatformsByIdPUT(ctx, body, registeredIotPlatformId) +Update information about a IoT platform - see clause 5.3.5. + +The PUT method may be used by a service consumer to update a IoT platform registration. This method is typically used in the \"IoT platform update\" procedure as described in clause 5.3.5. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**RegisteredIotPlatformsRegisteredIotPlatformIdBody**](RegisteredIotPlatformsRegisteredIotPlatformIdBody.md)| One or more updated attributes that are allowed to be changed are included in the IotPlatformInfo data structure in the payload body of the request. . | + **registeredIotPlatformId** | **string**| The unique identifier of the registered IoT platform. | + +### Return type + +[**RegisteredIotPlatformsRegisteredIotPlatformIdBody**](registered_iot_platforms_registeredIotPlatformId_body.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegisterediotplatformsGET** +> []IotPlatformInfo RegisterediotplatformsGET(ctx, optional) +Retrieve information about all IoT platforms - see clause 5.3.2. + +The GET method may be used by an authorized service consumer to retrieve the information of all currently registered IoT platforms. This method is typically used in the \"registered IoT platforms query\" procedure as described in clause 5.3.2. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***RegIotPlatApiRegisterediotplatformsGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a RegIotPlatApiRegisterediotplatformsGETOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | [**optional.Interface of []string**](string.md)| The list shall contain the following attributes from the IotPlatformInfo data type: - iotPlatformId - enabled | + +### Return type + +[**[]IotPlatformInfo**](IotPlatformInfo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegisterediotplatformsPOST** +> RegisteredIotPlatformsBody RegisterediotplatformsPOST(ctx, body) +Register a IoT platform - see clause 5.3.4. + +The POST method may be used by a service consumer to register a new IoT platform. This method is typically used in the \"IoT platform registration\" procedure as described in clause 5.3.4. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**RegisteredIotPlatformsBody**](RegisteredIotPlatformsBody.md)| Payload body in the request contains the information associated to the IoT platform to be registered. | + +### Return type + +[**RegisteredIotPlatformsBody**](registered_iot_platforms_body.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/api-iot/RegisteredDevicesBody.md b/docs/api-iot/RegisteredDevicesBody.md new file mode 100644 index 0000000000000000000000000000000000000000..71941e93c2da461f6a7166fdf892e7241dac59b1 --- /dev/null +++ b/docs/api-iot/RegisteredDevicesBody.md @@ -0,0 +1,9 @@ +# RegisteredDevicesBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceInfo** | [***DeviceInfo**](DeviceInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/RegisteredDevicesRegisteredDeviceIdBody.md b/docs/api-iot/RegisteredDevicesRegisteredDeviceIdBody.md new file mode 100644 index 0000000000000000000000000000000000000000..b12c05bbba03477ee220a3101e44540de80255d4 --- /dev/null +++ b/docs/api-iot/RegisteredDevicesRegisteredDeviceIdBody.md @@ -0,0 +1,9 @@ +# RegisteredDevicesRegisteredDeviceIdBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceInfo** | [***DeviceInfo**](DeviceInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/RegisteredIotPlatformsBody.md b/docs/api-iot/RegisteredIotPlatformsBody.md new file mode 100644 index 0000000000000000000000000000000000000000..a1c2c0aa18f7839ab30475ca7e21210738025c76 --- /dev/null +++ b/docs/api-iot/RegisteredIotPlatformsBody.md @@ -0,0 +1,9 @@ +# RegisteredIotPlatformsBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IoTPlatformInfo** | [***IotPlatformInfo**](IotPlatformInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/RegisteredIotPlatformsRegisteredIotPlatformIdBody.md b/docs/api-iot/RegisteredIotPlatformsRegisteredIotPlatformIdBody.md new file mode 100644 index 0000000000000000000000000000000000000000..0c63b652609d88bdc3908e256ca1ac16037d4464 --- /dev/null +++ b/docs/api-iot/RegisteredIotPlatformsRegisteredIotPlatformIdBody.md @@ -0,0 +1,9 @@ +# RegisteredIotPlatformsRegisteredIotPlatformIdBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IotPlatformInfo** | [***IotPlatformInfo**](IotPlatformInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/SecurityInfo.md b/docs/api-iot/SecurityInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..40559b94e7342cf62667b91ff104bb69886fab15 --- /dev/null +++ b/docs/api-iot/SecurityInfo.md @@ -0,0 +1,10 @@ +# SecurityInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OAuth2Info** | [***OAuth2Info**](OAuth2Info.md) | | [optional] [default to null] +**Extensions** | **string** | Extensions for alternative transport mechanisms. These extensions depend on the actual transport and are out of scope of the present document. For instance, such extensions may be used to signal the necessary parameters for the client to use TLS-based authorization defined for alternative transports (see ETSI GS MEC 009 [5] for more information). | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/SerializerType.md b/docs/api-iot/SerializerType.md new file mode 100644 index 0000000000000000000000000000000000000000..210b392935244c534261a0ea886a64ca67431069 --- /dev/null +++ b/docs/api-iot/SerializerType.md @@ -0,0 +1,8 @@ +# SerializerType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/TrafficFilter.md b/docs/api-iot/TrafficFilter.md new file mode 100644 index 0000000000000000000000000000000000000000..12438dd2ff1d4674fd60d64dd12f6aaa46c06065 --- /dev/null +++ b/docs/api-iot/TrafficFilter.md @@ -0,0 +1,23 @@ +# TrafficFilter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SrcAddress** | **[]string** | An IP address or a range of IP addresses. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes. | [optional] [default to null] +**DstAddress** | **[]string** | An IP address or a range of IP addresses. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes. | [optional] [default to null] +**SrcPort** | **[]string** | A port or a range of ports. | [optional] [default to null] +**DstPort** | **[]string** | A port or a range of ports. | [optional] [default to null] +**Protocol** | **[]string** | Specify the protocol of the traffic filter. | [optional] [default to null] +**Tag** | **[]string** | Used for tag based traffic rule. | [optional] [default to null] +**Uri** | **[]string** | An URI label, in application layer, i.e. in HTTP message, is used to filter the traffic. | [optional] [default to null] +**PacketLabel** | **[]string** | A customized packet label in network layer, as defined by the owner of the MEC platform, is used to filter the traffic. | [optional] [default to null] +**SrcTunnelAddress** | **[]string** | Used for GTP tunnel based traffic rule. | [optional] [default to null] +**TgtTunnelAddress** | **[]string** | Used for GTP tunnel based traffic rule. | [optional] [default to null] +**SrcTunnelPort** | **[]string** | Used for GTP tunnel based traffic rule. | [optional] [default to null] +**DstTunnelPort** | **[]string** | Used for GTP tunnel based traffic rule. | [optional] [default to null] +**QCI** | **int32** | Used to match all packets that have the same QCI. | [optional] [default to null] +**DSCP** | **int32** | Used to match all IPv4 packets that have the same DSCP. | [optional] [default to null] +**TC** | **int32** | Used to match all IPv6 packets that have the same TC. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/TrafficRuleDescriptor.md b/docs/api-iot/TrafficRuleDescriptor.md new file mode 100644 index 0000000000000000000000000000000000000000..149fa1216faed5688c8e68d05e72ee974ad63531 --- /dev/null +++ b/docs/api-iot/TrafficRuleDescriptor.md @@ -0,0 +1,14 @@ +# TrafficRuleDescriptor + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TrafficRuleId** | **string** | Identifies the traffic rule. | [default to null] +**FilterType** | **string** | Definition of filter type: per FLOW or PACKET If it is per FLOW, the filter matches upstream (e.g. UE->EPC) packets and downstream (e.g. EPC->UE) packets are handled by the same context. | [default to null] +**Priority** | **int32** | Priority of this traffic rule within the range 0 to 255. If traffic rule conflicts, the one with higher priority take precedence. See note 1. | [default to null] +**TrafficFilter** | [**[]TrafficFilter**](TrafficFilter.md) | The filter used to identify specific flow/packets that need to be handled by the MEC host. | [default to null] +**Action** | **string** | Identifies the action of the MEC host data plane, when a packet matches the trafficFilter, the example actions include: DROP, FORWARD_DECAPSULATED, FORWARD_ENCAPSULATED, PASSTHROUGH, DUPLICATE_DECAPSULATED, DUPLICATE_ENCAPSULATED | [default to null] +**DstInterface** | [***InterfaceDescriptor**](InterfaceDescriptor.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/TransportInfo.md b/docs/api-iot/TransportInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..df89530928f7e66de6d6387ac8c39a1e2cdfd3f1 --- /dev/null +++ b/docs/api-iot/TransportInfo.md @@ -0,0 +1,17 @@ +# TransportInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The identifier of this transport. | [default to null] +**Name** | **string** | The name of this transport. | [default to null] +**Description** | **string** | Human-readable description of this transport. | [optional] [default to null] +**Type_** | [***TransportType**](TransportType.md) | | [default to null] +**Protocol** | **string** | The name of the protocol used. Shall be set to \"HTTP\" for a REST API. | [default to null] +**Version** | **string** | The version of the protocol used. | [default to null] +**Endpoint** | [***EndPointInfo**](EndPointInfo.md) | | [default to null] +**Security** | [***SecurityInfo**](SecurityInfo.md) | | [default to null] +**ImplSpecificInfo** | **string** | Additional implementation specific details of the transport. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/TransportType.md b/docs/api-iot/TransportType.md new file mode 100644 index 0000000000000000000000000000000000000000..46cc250c00bccbe02d268207efd77e07b56be0bf --- /dev/null +++ b/docs/api-iot/TransportType.md @@ -0,0 +1,8 @@ +# TransportType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/TunnelInfo.md b/docs/api-iot/TunnelInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..e10e407945f89f1676ceb1140845e4e50e55652b --- /dev/null +++ b/docs/api-iot/TunnelInfo.md @@ -0,0 +1,12 @@ +# TunnelInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TunnelType** | **string** | Type of tunnel: GTP-U, GRE, etc. | [default to null] +**TunnelDstAddress** | **string** | Destination address of the tunnel. | [default to null] +**TunnelSrcAddress** | **string** | Source address of the tunnel. | [default to null] +**TunnelSpecificData** | **string** | Parameters specific to the tunnel. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/api-iot/UplinkMsg.md b/docs/api-iot/UplinkMsg.md new file mode 100644 index 0000000000000000000000000000000000000000..e9b87571debb98fefdcadadeb4b12f622d23315d --- /dev/null +++ b/docs/api-iot/UplinkMsg.md @@ -0,0 +1,19 @@ +# UplinkMsg + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UplinkTopic** | **string** | Topic where the message containing the data generated by the IoT device(s) should be published, in order to be consumed by the end IoT application(s). | [default to null] +**SelectedSerializer** | [***SerializerType**](SerializerType.md) | | [default to null] +**IncludeDevicePort** | **bool** | Indication whether to include the UDP port of the remote IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeDeviceAddr** | **bool** | Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeDeviceMetadata** | **bool** | Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludePei** | **bool** | Indication whether to include the PEI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeSupi** | **bool** | Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeImei** | **bool** | Indication whether to include the IMEI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeImsi** | **bool** | Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeIccid** | **bool** | Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeDeviceId** | **bool** | Indication whether to include the human-readable identified of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/AreaInfo.md b/docs/meep-sss/AreaInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..6b104fc9cde71df6068437590f37b0a7581dfa7c --- /dev/null +++ b/docs/meep-sss/AreaInfo.md @@ -0,0 +1,11 @@ +# AreaInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Shape** | [***ShapeType**](ShapeType.md) | | [default to null] +**Points** | [**[]Point**](Point.md) | Shall include one point if the shape is CIRCLE. Shall include 3-15 points if the shape is POLYGON | [default to null] +**Radius** | **int32** | Shall be present if the shape is CIRCLE | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/LinkType.md b/docs/meep-sss/LinkType.md new file mode 100644 index 0000000000000000000000000000000000000000..5d8170f4aa61d5c57074f8228ee99479a91526cd --- /dev/null +++ b/docs/meep-sss/LinkType.md @@ -0,0 +1,9 @@ +# LinkType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Href** | **string** | The URI referring to the subscription. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/ManagementnApi.md b/docs/meep-sss/ManagementnApi.md new file mode 100644 index 0000000000000000000000000000000000000000..538b5f148fe13cc8d42e05a2e32ebd2a408974d2 --- /dev/null +++ b/docs/meep-sss/ManagementnApi.md @@ -0,0 +1,36 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/sens/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SensorMgmtPUT**](ManagementnApi.md#SensorMgmtPUT) | **Put** /sensor_management | The PUT method is used to update the value of the characteristics that can be set on a sensor or on a group of sensors + +# **SensorMgmtPUT** +> []SensorCharacteristic SensorMgmtPUT(ctx, body) +The PUT method is used to update the value of the characteristics that can be set on a sensor or on a group of sensors + +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.12.3.2-1 and 7.12.3.2-2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**[]SensorCharacteristic**](SensorCharacteristic.md)| The list of sensor characteristics to be updated, with the new values to set, is included as entity body of the request | + +### Return type + +[**[]SensorCharacteristic**](SensorCharacteristic.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/Point.md b/docs/meep-sss/Point.md new file mode 100644 index 0000000000000000000000000000000000000000..65e28c65ce182b0ffc86cf274df30a1e764d9b40 --- /dev/null +++ b/docs/meep-sss/Point.md @@ -0,0 +1,10 @@ +# Point + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Latitude** | **float64** | Location latitude, expressed in the range -90° to +90° | [default to null] +**Longitude** | **float64** | Location longitude, expressed in the range -180° to +180°. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/ProblemDetails.md b/docs/meep-sss/ProblemDetails.md new file mode 100644 index 0000000000000000000000000000000000000000..f2596ffa3944f557c5f98c6a7ff38b6430c3dd58 --- /dev/null +++ b/docs/meep-sss/ProblemDetails.md @@ -0,0 +1,13 @@ +# ProblemDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type_** | **string** | A URI reference according to IETF RFC 3986 that identifies the problem type | [optional] [default to null] +**Title** | **string** | A short, human-readable summary of the problem type | [optional] [default to null] +**Status** | **int32** | The HTTP status code for this occurrence of the problem | [optional] [default to null] +**Detail** | **string** | A human-readable explanation specific to this occurrence of the problem | [optional] [default to null] +**Instance** | **string** | A URI reference that identifies the specific occurrence of the problem | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorCharacteristic.md b/docs/meep-sss/SensorCharacteristic.md new file mode 100644 index 0000000000000000000000000000000000000000..b231da16d9d39600f1d4aa2afca959e13865287d --- /dev/null +++ b/docs/meep-sss/SensorCharacteristic.md @@ -0,0 +1,11 @@ +# SensorCharacteristic + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CharacteristicName** | **string** | The name of the characteristic | [default to null] +**CharacteristicValue** | **string** | The value of the characteristic. | [default to null] +**CharacteristicUnitOfMeasure** | **string** | The unit of measure of the characteristic (see saref:UnitOfMeasure in ETSI TS 103 264 [4], clause 4.3.8). | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorData.md b/docs/meep-sss/SensorData.md new file mode 100644 index 0000000000000000000000000000000000000000..7cfcbc76d1cf991eb5b90abadc76dd4af3d868b9 --- /dev/null +++ b/docs/meep-sss/SensorData.md @@ -0,0 +1,13 @@ +# SensorData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SensorIdentifier** | **string** | Unique identifier of the sensor | [default to null] +**Data** | **string** | The status of the sensor | [default to null] +**DataFormat** | **string** | String explaining the error of the sensor | [default to null] +**DataUnitOfMeasure** | **string** | String explaining the error of the sensor | [default to null] +**DataTimestamp** | [***TimeStamp**](TimeStamp.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorDataLookupApi.md b/docs/meep-sss/SensorDataLookupApi.md new file mode 100644 index 0000000000000000000000000000000000000000..f594779f63e9e3e7138f1cfa066c91ca4a93469a --- /dev/null +++ b/docs/meep-sss/SensorDataLookupApi.md @@ -0,0 +1,36 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/sens/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SensorDataLookupGET**](SensorDataLookupApi.md#SensorDataLookupGET) | **Get** /queries/status_data | The GET method is used to query the last sensor data from specific sensors + +# **SensorDataLookupGET** +> []SensorData SensorDataLookupGET(ctx, sensorIdentifier) +The GET method is used to query the last sensor data from specific sensors + +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.9.3.1-1 and 7.9.3.1-2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **sensorIdentifier** | [**[]string**](string.md)| It uniquely identifies the created individual application mobility service | + +### Return type + +[**[]SensorData**](SensorData.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorDataSubscription.md b/docs/meep-sss/SensorDataSubscription.md new file mode 100644 index 0000000000000000000000000000000000000000..63d67bf76ebd44874c6f95c3a4b7b03aaff026ff --- /dev/null +++ b/docs/meep-sss/SensorDataSubscription.md @@ -0,0 +1,14 @@ +# SensorDataSubscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubscriptionType** | [***SubscriptionType**](SubscriptionType.md) | | [default to null] +**CallbackReference** | **string** | URI exposed by the client on which to receive notifications via HTTP | [optional] [default to null] +**RequestTestNotification** | **bool** | Set to TRUE by the MEC application to request a test notification via HTTP on the callbackReference URI, | [optional] [default to null] +**WebsockNotifConfig** | [***WebsockNotifConfig**](WebsockNotifConfig.md) | | [optional] [default to null] +**Links** | [***SubscriptionLinks**](SubscriptionLinks.md) | | [optional] [default to null] +**ExpiryDeadline** | [***TimeStamp**](TimeStamp.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorDataSubscriptionApi.md b/docs/meep-sss/SensorDataSubscriptionApi.md new file mode 100644 index 0000000000000000000000000000000000000000..2f3fca78f1d996be2ce856783eb87ca2227c6f13 --- /dev/null +++ b/docs/meep-sss/SensorDataSubscriptionApi.md @@ -0,0 +1,153 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/sens/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SensorDataIndividualSubscriptionGET**](SensorDataSubscriptionApi.md#SensorDataIndividualSubscriptionGET) | **Get** /queries/status_data/{subscriptionId} | The GET method is used to retrieve information about this subscription +[**SensorDataSubscriptionDELETE**](SensorDataSubscriptionApi.md#SensorDataSubscriptionDELETE) | **Delete** /queries/status_data/{subscriptionId} | The DELETE method is used to cancel the existing subscription +[**SensorDataSubscriptionGET**](SensorDataSubscriptionApi.md#SensorDataSubscriptionGET) | **Get** /subscriptions/sensor_data | The GET method is used to request information about the subscriptions related to sensor data for this requestor +[**SensorDataSubscriptionPOST**](SensorDataSubscriptionApi.md#SensorDataSubscriptionPOST) | **Post** /subscriptions/sensor_data | The POST method is used to create a new subscription to sensor status notifications +[**SensorDataSubscriptionPUT**](SensorDataSubscriptionApi.md#SensorDataSubscriptionPUT) | **Put** /queries/status_data/{subscriptionId} | The PUT method is used to update the existing subscription + +# **SensorDataIndividualSubscriptionGET** +> []SensorDataSubscription SensorDataIndividualSubscriptionGET(ctx, subscriptionId) +The GET method is used to retrieve information about this subscription + +This method shall support the request and response data structures, and response codes, as specified in Tables 7.11.3.1-1 and 7.11.3.1-2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **subscriptionId** | **string**| Unique identifiers of a subscription | + +### Return type + +[**[]SensorDataSubscription**](SensorDataSubscription.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **SensorDataSubscriptionDELETE** +> []SubscriptionLinkList SensorDataSubscriptionDELETE(ctx, subscriptionId) +The DELETE method is used to cancel the existing subscription + +This method shall support the request and response data structures, and response codes, as specified in Tables 7.11.3.5-1 and 7.11.3.5-2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **subscriptionId** | **string**| It uniquely identifies a subscription | + +### Return type + +[**[]SubscriptionLinkList**](SubscriptionLinkList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **SensorDataSubscriptionGET** +> []SubscriptionLinkList SensorDataSubscriptionGET(ctx, sensorIdentifier) +The GET method is used to request information about the subscriptions related to sensor data for this requestor + +This method shall support the URI query parameter, request and response data structures, and response codes, as specified in Tables 7.10.3.1-1 and 7.10.3.1-2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **sensorIdentifier** | [**[]string**](string.md)| Unique identifiers of the sensors | + +### Return type + +[**[]SubscriptionLinkList**](SubscriptionLinkList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **SensorDataSubscriptionPOST** +> []SensorStatusSubscription SensorDataSubscriptionPOST(ctx, body) +The POST method is used to create a new subscription to sensor status notifications + +This method shall support the request and response data structures, and response codes, as specified in Table 7.7.3.4-1 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**SubscriptionsSensorDataBody**](SubscriptionsSensorDataBody.md)| The entity body in the request contains data type of the specific sensor status subscription that is to be created | + +### Return type + +[**[]SensorStatusSubscription**](SensorStatusSubscription.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **SensorDataSubscriptionPUT** +> []SensorDataSubscription SensorDataSubscriptionPUT(ctx, body, subscriptionId) +The PUT method is used to update the existing subscription + +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.11.3.2-1 and 7.11.3.2-2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**StatusDataSubscriptionIdBody**](StatusDataSubscriptionIdBody.md)| New SensorDataSubscription is included as entity body of the request | + **subscriptionId** | **string**| Unique identifiers of a subscription | + +### Return type + +[**[]SensorDataSubscription**](SensorDataSubscription.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorDiscoveryEventSubscription.md b/docs/meep-sss/SensorDiscoveryEventSubscription.md new file mode 100644 index 0000000000000000000000000000000000000000..15cd2caf31c0efe2f2a6ae52db7eb27c779ed13a --- /dev/null +++ b/docs/meep-sss/SensorDiscoveryEventSubscription.md @@ -0,0 +1,16 @@ +# SensorDiscoveryEventSubscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubscriptionType** | [***SubscriptionType**](SubscriptionType.md) | | [default to null] +**CallbackReference** | **string** | URI exposed by the client on which to receive notifications via HTTP | [optional] [default to null] +**RequestTestNotification** | **bool** | Set to TRUE by the MEC application to request a test notification via HTTP on the callbackReference URI, | [optional] [default to null] +**WebsockNotifConfig** | [***WebsockNotifConfig**](WebsockNotifConfig.md) | | [optional] [default to null] +**Links** | [***SubscriptionLinks**](SubscriptionLinks.md) | | [optional] [default to null] +**SensorInfoList** | **[]string** | Object containing the characteristics of the sensor(s) to be selected for the subscription | [optional] [default to null] +**GeographicalArea** | [**[]AreaInfo**](AreaInfo.md) | The parameters describing the area to subscribe | [optional] [default to null] +**ExpiryDeadline** | [***TimeStamp**](TimeStamp.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorDiscoveryInfo.md b/docs/meep-sss/SensorDiscoveryInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..539f302fa6789bbbe61cbcb6ddf88eac9aaa37ca --- /dev/null +++ b/docs/meep-sss/SensorDiscoveryInfo.md @@ -0,0 +1,13 @@ +# SensorDiscoveryInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SensorIdentifier** | **string** | Unique identifier of the sensor | [default to null] +**SensorType** | **string** | Type of the Sensor | [default to null] +**SensorPropertyList** | **[]string** | It indicates the list of properties that the sensor can sense | [default to null] +**SensorCharacteristicList** | [**[]SensorCharacteristic**](SensorCharacteristic.md) | The sensor' characteristics | [optional] [default to null] +**SensorPosition** | [***Point**](Point.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorDiscoveryLookupApi.md b/docs/meep-sss/SensorDiscoveryLookupApi.md new file mode 100644 index 0000000000000000000000000000000000000000..c1210feee592accb2bf0e94ef40543fb8900baf2 --- /dev/null +++ b/docs/meep-sss/SensorDiscoveryLookupApi.md @@ -0,0 +1,42 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/sens/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SensorDiscoveryLookupGET**](SensorDiscoveryLookupApi.md#SensorDiscoveryLookupGET) | **Get** /queries/sensor_discovery | The GET method is used to query the available sensors + +# **SensorDiscoveryLookupGET** +> []SensorDiscoveryInfo SensorDiscoveryLookupGET(ctx, optional) +The GET method is used to query the available sensors + +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.3.3.1-1 and 7.3.3.1-2. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***SensorDiscoveryLookupApiSensorDiscoveryLookupGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a SensorDiscoveryLookupApiSensorDiscoveryLookupGETOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sensorInfo** | [**optional.Interface of SensorInfo**](.md)| Object containing the characteristics of the sensor(s) to be selected for the query | + +### Return type + +[**[]SensorDiscoveryInfo**](SensorDiscoveryInfo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorDiscoverySubscriptionApi.md b/docs/meep-sss/SensorDiscoverySubscriptionApi.md new file mode 100644 index 0000000000000000000000000000000000000000..dce85a43c5dcae010f648fe0cfd812793d833227 --- /dev/null +++ b/docs/meep-sss/SensorDiscoverySubscriptionApi.md @@ -0,0 +1,159 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/sens/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SensorDiscoveryIndividualSubscriptionGET**](SensorDiscoverySubscriptionApi.md#SensorDiscoveryIndividualSubscriptionGET) | **Get** /subscriptions/sensor_discovery/{subscriptionId} | The GET method is used to request information about the subscriptions related to sensor status for this requestor +[**SensorDiscoverySubscriptionDELETE**](SensorDiscoverySubscriptionApi.md#SensorDiscoverySubscriptionDELETE) | **Delete** /subscriptions/sensor_discovery/{subscriptionId} | The DELETE method is used to cancel the existing subscription. Cancellation can be made by deleting the resource that represents existing sensor discovery subscription +[**SensorDiscoverySubscriptionGET**](SensorDiscoverySubscriptionApi.md#SensorDiscoverySubscriptionGET) | **Get** /subscriptions/sensor_discovery | The GET method is used to request information about the subscriptions related to sensor discovery for this requestor +[**SensorDiscoverySubscriptionPOST**](SensorDiscoverySubscriptionApi.md#SensorDiscoverySubscriptionPOST) | **Post** /subscriptions/sensor_discovery | The POST method is used to create a new subscription to sensor discovery notifications +[**SensorDiscoverySubscriptionPUT**](SensorDiscoverySubscriptionApi.md#SensorDiscoverySubscriptionPUT) | **Put** /subscriptions/sensor_discovery/{subscriptionId} | The POST method is used to create a new subscription to sensor discovery notifications + +# **SensorDiscoveryIndividualSubscriptionGET** +> []SubscriptionLinkList SensorDiscoveryIndividualSubscriptionGET(ctx, subscriptionId) +The GET method is used to request information about the subscriptions related to sensor status for this requestor + +This method shall support the URI query parameter, request and response data structures, and response codes, as specified in Tables 7.7.3.1-1 and 7.7.3.1-2. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **subscriptionId** | **string**| Unique identifiers of the subscription | + +### Return type + +[**[]SubscriptionLinkList**](SubscriptionLinkList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **SensorDiscoverySubscriptionDELETE** +> []SubscriptionLinkList SensorDiscoverySubscriptionDELETE(ctx, subscriptionId) +The DELETE method is used to cancel the existing subscription. Cancellation can be made by deleting the resource that represents existing sensor discovery subscription + +This method shall support the request and response data structures, and response codes, as specified in Tables 7.5.3.5-1 and 7.5.3.5-2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **subscriptionId** | **string**| It uniquely identifies the created individual application mobility service | + +### Return type + +[**[]SubscriptionLinkList**](SubscriptionLinkList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **SensorDiscoverySubscriptionGET** +> []SubscriptionLinkList SensorDiscoverySubscriptionGET(ctx, optional) +The GET method is used to request information about the subscriptions related to sensor discovery for this requestor + +This method shall support the URI query parameter, request and response data structures, and response codes, as specified in Tables 7.4.3.1-1 and 7.4.3.1-2. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***SensorDiscoverySubscriptionApiSensorDiscoverySubscriptionGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a SensorDiscoverySubscriptionApiSensorDiscoverySubscriptionGETOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **subscriptionId** | **optional.String**| Object containing the characteristics of the sensor(s) to be selected for the query | + +### Return type + +[**[]SubscriptionLinkList**](SubscriptionLinkList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **SensorDiscoverySubscriptionPOST** +> []SensorDiscoveryEventSubscription SensorDiscoverySubscriptionPOST(ctx, body) +The POST method is used to create a new subscription to sensor discovery notifications + +This method shall support the request and response data structures, and response codes, as specified in Table 7.4.3.4-1 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**SubscriptionsSensorDiscoveryBody**](SubscriptionsSensorDiscoveryBody.md)| This type represents a subscription to notifications from the Sensor-sharing Service regarding events related to changes in sensor information | + +### Return type + +[**[]SensorDiscoveryEventSubscription**](SensorDiscoveryEventSubscription.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **SensorDiscoverySubscriptionPUT** +> []SubscriptionLinkList SensorDiscoverySubscriptionPUT(ctx, body, subscriptionId) +The POST method is used to create a new subscription to sensor discovery notifications + +This method shall support the request and response data structures, and response codes, as specified in Table 7.4.3.4-1 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**SensorDiscoverySubscriptionIdBody**](SensorDiscoverySubscriptionIdBody.md)| New SensorDiscoveryEventSubscription is included as entity body of the request | + **subscriptionId** | **string**| It uniquely identifies the created individual application mobility service | + +### Return type + +[**[]SubscriptionLinkList**](SubscriptionLinkList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorDiscoverySubscriptionIdBody.md b/docs/meep-sss/SensorDiscoverySubscriptionIdBody.md new file mode 100644 index 0000000000000000000000000000000000000000..1b09c55730f6352b9e06f20881beed7014c3035e --- /dev/null +++ b/docs/meep-sss/SensorDiscoverySubscriptionIdBody.md @@ -0,0 +1,9 @@ +# SensorDiscoverySubscriptionIdBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SensorDiscoveryEventSubscription** | [***SensorDiscoveryEventSubscription**](SensorDiscoveryEventSubscription.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorInfo.md b/docs/meep-sss/SensorInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..9b656e067381466dbbe3b3ea758c7a3532009320 --- /dev/null +++ b/docs/meep-sss/SensorInfo.md @@ -0,0 +1,12 @@ +# SensorInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type_** | **string** | Type of the sensor | [default to null] +**SensorPropertyList** | **[]string** | It indicates the list of properties that the sensor can sense (see saref:Property in ETSI TS 103 264 [4], clause 4.3.8). | [default to null] +**SensorCharacteristicList** | [**[]SensorCharacteristic**](SensorCharacteristic.md) | The sensor' characteristics to be matched | [optional] [default to null] +**GeographicalArea** | [**[]AreaInfo**](AreaInfo.md) | The parameters describing the area | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorManagementApi.md b/docs/meep-sss/SensorManagementApi.md new file mode 100644 index 0000000000000000000000000000000000000000..fe1d140027bd4748465d050b9ea29aa935e326eb --- /dev/null +++ b/docs/meep-sss/SensorManagementApi.md @@ -0,0 +1,36 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/sens/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SensorMgmtGET**](SensorManagementApi.md#SensorMgmtGET) | **Get** /sensor_management | The GET method is used to receive the sensor characteristics that can be modified on specific sensors + +# **SensorMgmtGET** +> []SensorCharacteristic SensorMgmtGET(ctx, sensorIdentifier) +The GET method is used to receive the sensor characteristics that can be modified on specific sensors + +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.12.3.1-1 and 7.12.3.1-2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **sensorIdentifier** | [**[]string**](string.md)| It uniquely identifies the created individual application mobility service | + +### Return type + +[**[]SensorCharacteristic**](SensorCharacteristic.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorStatusInfo.md b/docs/meep-sss/SensorStatusInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..2367033288ee8930f0a5d82b9759df4930bd4a3b --- /dev/null +++ b/docs/meep-sss/SensorStatusInfo.md @@ -0,0 +1,11 @@ +# SensorStatusInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SensorIdentifier** | **string** | Unique identifier of the sensor | [default to null] +**SensorStatusType** | **string** | The status of the sensor | [default to null] +**ErrorInformation** | **string** | String explaining the error of the sensor | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorStatusLookupApi.md b/docs/meep-sss/SensorStatusLookupApi.md new file mode 100644 index 0000000000000000000000000000000000000000..454436a7b607529ae0a0caa10ed2578d7a67d4b0 --- /dev/null +++ b/docs/meep-sss/SensorStatusLookupApi.md @@ -0,0 +1,36 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/sens/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SensorStatusLookupGET**](SensorStatusLookupApi.md#SensorStatusLookupGET) | **Get** /queries/sensor_status | The GET method is used to query the available status + +# **SensorStatusLookupGET** +> []SensorStatusInfo SensorStatusLookupGET(ctx, sensorIdentifier) +The GET method is used to query the available status + +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.6.3.1-1 and 7.6.3.1-2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **sensorIdentifier** | [**[]string**](string.md)| It uniquely identifies the created individual application mobility service | + +### Return type + +[**[]SensorStatusInfo**](SensorStatusInfo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorStatusSubscription.md b/docs/meep-sss/SensorStatusSubscription.md new file mode 100644 index 0000000000000000000000000000000000000000..1434682e7434cc3cb994ace54f4fb9848b4c8091 --- /dev/null +++ b/docs/meep-sss/SensorStatusSubscription.md @@ -0,0 +1,14 @@ +# SensorStatusSubscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubscriptionType** | [***SubscriptionType**](SubscriptionType.md) | | [default to null] +**CallbackReference** | **string** | URI exposed by the client on which to receive notifications via HTTP | [optional] [default to null] +**RequestTestNotification** | **bool** | Set to TRUE by the MEC application to request a test notification via HTTP on the callbackReference URI, | [optional] [default to null] +**WebsockNotifConfig** | [***WebsockNotifConfig**](WebsockNotifConfig.md) | | [optional] [default to null] +**Links** | [***SubscriptionLinks**](SubscriptionLinks.md) | | [optional] [default to null] +**ExpiryDeadline** | [***TimeStamp**](TimeStamp.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorStatusSubscriptionApi.md b/docs/meep-sss/SensorStatusSubscriptionApi.md new file mode 100644 index 0000000000000000000000000000000000000000..8802daea1b36ad63fe5988b14da11df17532dfc8 --- /dev/null +++ b/docs/meep-sss/SensorStatusSubscriptionApi.md @@ -0,0 +1,130 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/sens/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SensorSatusIndividualSubscriptionGET**](SensorStatusSubscriptionApi.md#SensorSatusIndividualSubscriptionGET) | **Get** /subscriptions/sensor_status/{subscriptionId} | The GET method is used to retrieve information about this subscription +[**SensorStatusIndividualSubscriptionGET**](SensorStatusSubscriptionApi.md#SensorStatusIndividualSubscriptionGET) | **Get** /subscriptions/sensor_status | The GET method is used to request information about the subscriptions related to sensor status for this requestor +[**SensorStatusSubscriptionDELETE**](SensorStatusSubscriptionApi.md#SensorStatusSubscriptionDELETE) | **Delete** /subscriptions/sensor_status/{subscriptionId} | The DELETE method is used to cancel the existing subscription +[**SensorStatusSubscriptionPUT**](SensorStatusSubscriptionApi.md#SensorStatusSubscriptionPUT) | **Put** /subscriptions/sensor_status/{subscriptionId} | The PUT method is used to update the existing subscription + +# **SensorSatusIndividualSubscriptionGET** +> []SensorStatusSubscription SensorSatusIndividualSubscriptionGET(ctx, subscriptionId) +The GET method is used to retrieve information about this subscription + +This method shall support the request and response data structures, and response codes, as specified in Tables 7.8.3.1-1 and 7.8.3.1-2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **subscriptionId** | **string**| Unique identifiers of the subscription | + +### Return type + +[**[]SensorStatusSubscription**](SensorStatusSubscription.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **SensorStatusIndividualSubscriptionGET** +> []SubscriptionLinkList SensorStatusIndividualSubscriptionGET(ctx, optional) +The GET method is used to request information about the subscriptions related to sensor status for this requestor + +This method shall support the URI query parameter, request and response data structures, and response codes, as specified in Tables 7.7.3.1-1 and 7.7.3.1-2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***SensorStatusSubscriptionApiSensorStatusIndividualSubscriptionGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a SensorStatusSubscriptionApiSensorStatusIndividualSubscriptionGETOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sensorIdentifier** | [**optional.Interface of []string**](string.md)| Unique identifiers of the sensors | + +### Return type + +[**[]SubscriptionLinkList**](SubscriptionLinkList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **SensorStatusSubscriptionDELETE** +> []SubscriptionLinkList SensorStatusSubscriptionDELETE(ctx, subscriptionId) +The DELETE method is used to cancel the existing subscription + +This method shall support the request and response data structures, and response codes, as specified in Tables 7.8.3.5-1 and 7.8.3.5-2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **subscriptionId** | **string**| It uniquely identifies a subscription | + +### Return type + +[**[]SubscriptionLinkList**](SubscriptionLinkList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **SensorStatusSubscriptionPUT** +> []SensorStatusSubscription SensorStatusSubscriptionPUT(ctx, body, subscriptionId) +The PUT method is used to update the existing subscription + +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.8.3.2-1 and 7.8.3.2-2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**SensorStatusSubscriptionIdBody**](SensorStatusSubscriptionIdBody.md)| New SensorStatusSubscription is included as entity body of the request | + **subscriptionId** | **string**| It uniquely identifies the created individual application mobility service | + +### Return type + +[**[]SensorStatusSubscription**](SensorStatusSubscription.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SensorStatusSubscriptionIdBody.md b/docs/meep-sss/SensorStatusSubscriptionIdBody.md new file mode 100644 index 0000000000000000000000000000000000000000..2591085b0e95c06cd0af1f795dac6a879fe6a7e4 --- /dev/null +++ b/docs/meep-sss/SensorStatusSubscriptionIdBody.md @@ -0,0 +1,9 @@ +# SensorStatusSubscriptionIdBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SensorStatusSubscription** | [***SensorStatusSubscription**](SensorStatusSubscription.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/ShapeType.md b/docs/meep-sss/ShapeType.md new file mode 100644 index 0000000000000000000000000000000000000000..ade18455d1662c984836363df519a62b8508b3a9 --- /dev/null +++ b/docs/meep-sss/ShapeType.md @@ -0,0 +1,8 @@ +# ShapeType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/StatusDataSubscriptionIdBody.md b/docs/meep-sss/StatusDataSubscriptionIdBody.md new file mode 100644 index 0000000000000000000000000000000000000000..70a2b2e720cbd4db57155dfac153e1731ec911dc --- /dev/null +++ b/docs/meep-sss/StatusDataSubscriptionIdBody.md @@ -0,0 +1,9 @@ +# StatusDataSubscriptionIdBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SensorStatusSubscription** | [***SensorDataSubscription**](SensorDataSubscription.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/StatusStatusSubscriptionApi.md b/docs/meep-sss/StatusStatusSubscriptionApi.md new file mode 100644 index 0000000000000000000000000000000000000000..a910cb89f955c7b027eae8be84ce502b29ed580d --- /dev/null +++ b/docs/meep-sss/StatusStatusSubscriptionApi.md @@ -0,0 +1,36 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/sens/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SensorStatusSubscriptionPOST**](StatusStatusSubscriptionApi.md#SensorStatusSubscriptionPOST) | **Post** /subscriptions/sensor_status | The POST method is used to create a new subscription to sensor status notifications + +# **SensorStatusSubscriptionPOST** +> []SensorStatusSubscription SensorStatusSubscriptionPOST(ctx, body) +The POST method is used to create a new subscription to sensor status notifications + +This method shall support the request and response data structures, and response codes, as specified in Table 7.7.3.4-1 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**SubscriptionsSensorStatusBody**](SubscriptionsSensorStatusBody.md)| The entity body in the request contains data type of the specific sensor status subscription that is to be created | + +### Return type + +[**[]SensorStatusSubscription**](SensorStatusSubscription.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SubscriptionLinkList.md b/docs/meep-sss/SubscriptionLinkList.md new file mode 100644 index 0000000000000000000000000000000000000000..ac82d3b67810dae8dccbded1b701759451ee67e2 --- /dev/null +++ b/docs/meep-sss/SubscriptionLinkList.md @@ -0,0 +1,9 @@ +# SubscriptionLinkList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [***SubscriptionLinkListLinks**](SubscriptionLinkList.links.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SubscriptionLinkListLinks.md b/docs/meep-sss/SubscriptionLinkListLinks.md new file mode 100644 index 0000000000000000000000000000000000000000..409c916f773be1d68706ab8b30511dfea463af36 --- /dev/null +++ b/docs/meep-sss/SubscriptionLinkListLinks.md @@ -0,0 +1,10 @@ +# SubscriptionLinkListLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Self** | [***LinkType**](LinkType.md) | | [default to null] +**Subscriptions** | [**[]SubscriptionLinkListSubscription**](SubscriptionLinkList.subscription.md) | The MEC application's subscriptions | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SubscriptionLinkListSubscription.md b/docs/meep-sss/SubscriptionLinkListSubscription.md new file mode 100644 index 0000000000000000000000000000000000000000..5bebb63a2738d740860fdf7147344abac206797d --- /dev/null +++ b/docs/meep-sss/SubscriptionLinkListSubscription.md @@ -0,0 +1,10 @@ +# SubscriptionLinkListSubscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Href** | **string** | The URI referring to the subscription | [default to null] +**SubscriptionType** | **string** | Type of the subscription | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SubscriptionLinks.md b/docs/meep-sss/SubscriptionLinks.md new file mode 100644 index 0000000000000000000000000000000000000000..21443c4cc3012fc1446a66597f2f590b2e61c674 --- /dev/null +++ b/docs/meep-sss/SubscriptionLinks.md @@ -0,0 +1,9 @@ +# SubscriptionLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Self** | [***LinkType**](LinkType.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SubscriptionType.md b/docs/meep-sss/SubscriptionType.md new file mode 100644 index 0000000000000000000000000000000000000000..029e22468e90994f7ace4c1a93e8bc49f82ee3f1 --- /dev/null +++ b/docs/meep-sss/SubscriptionType.md @@ -0,0 +1,8 @@ +# SubscriptionType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SubscriptionsSensorDataBody.md b/docs/meep-sss/SubscriptionsSensorDataBody.md new file mode 100644 index 0000000000000000000000000000000000000000..a90ef2497e1b7d1eab46d784fbea6f1ae3cfb6f9 --- /dev/null +++ b/docs/meep-sss/SubscriptionsSensorDataBody.md @@ -0,0 +1,9 @@ +# SubscriptionsSensorDataBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SensorDataSubscription** | [***SensorDataSubscription**](SensorDataSubscription.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SubscriptionsSensorDiscoveryBody.md b/docs/meep-sss/SubscriptionsSensorDiscoveryBody.md new file mode 100644 index 0000000000000000000000000000000000000000..07a1b88f0fd8fcebf667fee5deea7d9ca5fd7ce9 --- /dev/null +++ b/docs/meep-sss/SubscriptionsSensorDiscoveryBody.md @@ -0,0 +1,9 @@ +# SubscriptionsSensorDiscoveryBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SensorDiscoveryEventSubscription** | [***SensorDiscoveryEventSubscription**](SensorDiscoveryEventSubscription.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/SubscriptionsSensorStatusBody.md b/docs/meep-sss/SubscriptionsSensorStatusBody.md new file mode 100644 index 0000000000000000000000000000000000000000..78f1cda964e7e2009a4ab5499df31c11b6163e89 --- /dev/null +++ b/docs/meep-sss/SubscriptionsSensorStatusBody.md @@ -0,0 +1,9 @@ +# SubscriptionsSensorStatusBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SensorStatusSubscription** | [***SensorStatusSubscription**](SensorStatusSubscription.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/TimeStamp.md b/docs/meep-sss/TimeStamp.md new file mode 100644 index 0000000000000000000000000000000000000000..b13c4a15da44f69db47d4be34ac57feaf7f35f32 --- /dev/null +++ b/docs/meep-sss/TimeStamp.md @@ -0,0 +1,10 @@ +# TimeStamp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Seconds** | **int32** | 'The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.' | [default to null] +**NanoSeconds** | **int32** | 'The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.' | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meep-sss/WebsockNotifConfig.md b/docs/meep-sss/WebsockNotifConfig.md new file mode 100644 index 0000000000000000000000000000000000000000..6b8ae7ddacdf3a8f404cedb6c02c82402648e7cb --- /dev/null +++ b/docs/meep-sss/WebsockNotifConfig.md @@ -0,0 +1,10 @@ +# WebsockNotifConfig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WebsocketUri** | **string** | Set by AMS to indicate to the service consumer the Websocket URI to be used for delivering notifications. | [optional] [default to null] +**RequestWebsocketUri** | **bool** | Set to true by the service consumer to indicate that Websocket delivery is requested. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/meepctl/meepctl_build.md b/docs/meepctl/meepctl_build.md index 66d7062ed96d70d839e8a0d0859cdcd60c6ad066..63b6ac3806ac047d9dded2f97e405534af2904c0 100644 --- a/docs/meepctl/meepctl_build.md +++ b/docs/meepctl/meepctl_build.md @@ -40,6 +40,8 @@ Valid Targets: * meep-tc-sidecar * meep-virt-engine * meep-vis + * meep-iot + * meep-sss * meep-wais * meep-webhook ``` diff --git a/docs/meepctl/meepctl_dockerize.md b/docs/meepctl/meepctl_dockerize.md index e93e16a19e4e86cbb4457ec4047fe99fcd24185b..47c701ed9724bee8bf0c5c140c7b9d7e89a1d540 100644 --- a/docs/meepctl/meepctl_dockerize.md +++ b/docs/meepctl/meepctl_dockerize.md @@ -42,6 +42,8 @@ Valid Targets: * meep-tc-sidecar * meep-virt-engine * meep-vis + * meep-iot + * meep-sss * meep-wais * meep-webhook ``` diff --git a/docs/meepctl/meepctl_lint.md b/docs/meepctl/meepctl_lint.md index 5c7bb83498f714a3da09900b38f9ffb625d490e5..475260162bbbb6395f6da6c1e9bdb70b55ae46ca 100644 --- a/docs/meepctl/meepctl_lint.md +++ b/docs/meepctl/meepctl_lint.md @@ -63,6 +63,9 @@ Valid Targets: * meep-virt-engine * meep-vis * meep-vis-traffic-mgr + * meep-iot + * meep-sss + * meep-iot-mgr * meep-wais * meep-watchdog * meep-webhook diff --git a/etsi-mec-sandbox.code-workspace b/etsi-mec-sandbox.code-workspace index ce6903f3cd0d645f72abae794275ed61f1a5539f..75d6051794fc49348259713b0e99321b5afaa131 100644 --- a/etsi-mec-sandbox.code-workspace +++ b/etsi-mec-sandbox.code-workspace @@ -5,6 +5,12 @@ }, { "path": "../etsi-mec-sandbox-frontend" + }, + { + "path": "../tmp/tools" + }, + { + "path": "../mec-sandbox-scenarios" } ], "extensions": { diff --git a/examples/demo6/python/README.md b/examples/demo6/python/README.md new file mode 100644 index 0000000000000000000000000000000000000000..13a1c2b9ca5236e915257829e3c086ce32d1627a --- /dev/null +++ b/examples/demo6/python/README.md @@ -0,0 +1,6 @@ + +docker pull quay.io/jupyter/base-notebook:latest + +cd ~/etsi-mec-sandbox/examples/demo6/python/ && docker run --rm -it -d --expose 31111 -p 31111:31111 -p 9999:8888 -v"$PWD:/home/jovyan/work" quay.io/jupyter/base-notebook:latest + +curl --verbose --request GET http://mec-platform2.etsi.org:31111/sandbox/v1/statistic/v1/quantity --header "Accept: application/json" --data '{"time":20180124,"data1":"[1516752000,11590.6,11616.9,11590.4,11616.9,0.25202387,1516752060,11622.4,11651.7,11622.4,11644.6,1.03977764]"}' diff --git a/go-apps/meep-app-enablement/server/capif-mgmt/service-mgmt.go b/go-apps/meep-app-enablement/server/capif-mgmt/service-mgmt.go index b0a32f5be4c0e8b73cd46a093b88333ee285c1dc..dbdf4213bf8f7f1826b0409523b37939979d333a 100644 --- a/go-apps/meep-app-enablement/server/capif-mgmt/service-mgmt.go +++ b/go-apps/meep-app-enablement/server/capif-mgmt/service-mgmt.go @@ -1107,7 +1107,7 @@ func applicationsSubscriptionsPUT(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, jsonSub) } -var HrefUrl string +var HrefUrl string func applicationsSubscriptionsPOST(w http.ResponseWriter, r *http.Request) { log.Info("applicationsSubscriptionsPOST") diff --git a/go-apps/meep-app-enablement/server/mae_test.go b/go-apps/meep-app-enablement/server/mae_test.go index 724bf80a157d8a51ba60bccaed61f2779bb85b9b..9f0a85af295b27582d538a7dc0752e1c7614c827 100644 --- a/go-apps/meep-app-enablement/server/mae_test.go +++ b/go-apps/meep-app-enablement/server/mae_test.go @@ -7917,19 +7917,19 @@ func TestAppServicesPATCH(t *testing.T) { }, } - type ApiResponse struct { - ApiName string `json:"apiName"` - ApiId string `json:"apiId"` - AefProfiles []struct { - AefId string `json:"aefId"` - Versions []string `json:"versions"` - InterfaceDescriptions struct { - Uris []string `json:"uris"` - } `json:"interfaceDescriptions"` - VendorSpecificTransportInfo map[string]interface{} `json:"vendorSpecific-urn:etsi:mec:capifext:transport-info"` - } `json:"aefProfiles"` - VendorSpecificServiceInfo map[string]interface{} `json:"vendorSpecific-urn:etsi:mec:capifext:service-info"` - } + // type ApiResponse struct { + // ApiName string `json:"apiName"` + // ApiId string `json:"apiId"` + // AefProfiles []struct { + // AefId string `json:"aefId"` + // Versions []string `json:"versions"` + // InterfaceDescriptions struct { + // Uris []string `json:"uris"` + // } `json:"interfaceDescriptions"` + // VendorSpecificTransportInfo map[string]interface{} `json:"vendorSpecific-urn:etsi:mec:capifext:transport-info"` + // } `json:"aefProfiles"` + // VendorSpecificServiceInfo map[string]interface{} `json:"vendorSpecific-urn:etsi:mec:capifext:service-info"` + // } // Marshalling the request body to JSON format body, err := json.Marshal(requestBody) @@ -8196,4 +8196,4 @@ func TestIndividualAppServicesDELETE(t *testing.T) { t.Fatalf(err.Error()) } fmt.Println("sendRequest done in TestIndividualAppServicesDELETE") -} \ No newline at end of file +} diff --git a/go-apps/meep-auth-svc/Dockerfile b/go-apps/meep-auth-svc/Dockerfile index 46ae3ce94d48a5f04310a286b2e70ccd167a9570..2915c7a8199814fbea5eff0cd45bbd020a339873 100644 --- a/go-apps/meep-auth-svc/Dockerfile +++ b/go-apps/meep-auth-svc/Dockerfile @@ -23,6 +23,8 @@ RUN chmod +x /entrypoint.sh RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates -RUN update-ca-certificates + RUN dpkg --configure -a + + RUN update-ca-certificates ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/go-apps/meep-dai/Dockerfile b/go-apps/meep-dai/Dockerfile index 5aeebd31c26dfb8f08edf51a4abc5aa0aca1e7e4..294296d573e36be0205853dfe8332bba9f3dc2af 100644 --- a/go-apps/meep-dai/Dockerfile +++ b/go-apps/meep-dai/Dockerfile @@ -32,6 +32,8 @@ RUN apt-get update \ # && sudo chmod -R 777 /mnt/nfs/ \ # && mount -t nfs $HOSTNAME:/mnt/nfs/mec_sandbox /mnt/nfs/mec_sandbox +RUN dpkg --configure -a + EXPOSE 31120-31129/tcp ENTRYPOINT ["/entrypoint.sh"] diff --git a/go-apps/meep-federation/Dockerfile b/go-apps/meep-federation/Dockerfile index 3c23332a4d7ead00365baa375fb499af2b556b7d..5db45a03e92c5c1b933b1cc434293cce54abcb41 100644 --- a/go-apps/meep-federation/Dockerfile +++ b/go-apps/meep-federation/Dockerfile @@ -23,6 +23,8 @@ RUN chmod +x /entrypoint.sh RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates +RUN dpkg --configure -a + RUN update-ca-certificates ENTRYPOINT ["/entrypoint.sh"] diff --git a/go-apps/meep-iot/.swagger-codegen-ignore b/go-apps/meep-iot/.swagger-codegen-ignore new file mode 100644 index 0000000000000000000000000000000000000000..c5fa491b4c557bf997d5dd21797de782545dc9e5 --- /dev/null +++ b/go-apps/meep-iot/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/go-apps/meep-iot/.swagger-codegen/VERSION b/go-apps/meep-iot/.swagger-codegen/VERSION new file mode 100644 index 0000000000000000000000000000000000000000..0667b5ffc7ae803493efb90a1f4ee6224b1f6a17 --- /dev/null +++ b/go-apps/meep-iot/.swagger-codegen/VERSION @@ -0,0 +1 @@ +3.0.29 \ No newline at end of file diff --git a/go-apps/meep-iot/Dockerfile b/go-apps/meep-iot/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e7af4228809ba57f78dc77792b7c9ebe1c81fc7d --- /dev/null +++ b/go-apps/meep-iot/Dockerfile @@ -0,0 +1,23 @@ +# Copyright (c) 2024 The AdvantEDGE Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM debian:11.7-slim +COPY ./meep-iot /meep-iot +COPY ./api /api +COPY ./user-api /user-api +COPY ./data / + +RUN chmod +x /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/go-apps/meep-iot/api/swagger.yaml b/go-apps/meep-iot/api/swagger.yaml new file mode 100644 index 0000000000000000000000000000000000000000..14640b74bed7dd9cde653d5fd752a22dadeac288 --- /dev/null +++ b/go-apps/meep-iot/api/swagger.yaml @@ -0,0 +1,2858 @@ +openapi: 3.0.0 +info: + title: ETSI GS MEC 033 IoT API + description: ETSI GS MEC 033 IoT API described using OpenAPI. + contact: + name: ETSI Forge + url: https://forge.etsi.org/rep/mec/gs021-amsi-api + email: cti_support@etsi.org + license: + name: BSD-3-Clause + url: https://forge.etsi.org/legal-matters + version: 3.1.1 +externalDocs: + description: "ETSI GS MEC 033 IoT API, v3.3.1" + url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_mec033v030101p.pdf +servers: +- url: https://localhost/sandboxname/iots/v1 +tags: +- name: reg-dev + description: registered_devices +- name: reg-iot-plat + description: registered_iot_platforms +paths: + /registered_devices: + get: + tags: + - reg-dev + summary: Retrieve information about all devices with a valid traffic rule association + - see clause 5.2.2. + description: The GET method may be used by a service consumer to retrieve information + about all devices with a valid traffic rule association. This method is typically + used in the "registered devices query" procedure as described in clause 5.2.2. + operationId: registereddevicesGET + parameters: + - name: filter + in: query + description: "Attribute-based filtering parameters according to ETSI GS MEC\ + \ 009 [i.1]. The API producer shall support receiving the following filtering\ + \ parameters as part of the URI query string: \"(eq,enabled,TRUE)\".\n" + required: false + style: form + explode: true + schema: + type: string + - name: fields + in: query + description: | + The list may contain one or more of the following attributes from the DeviceInfo data type: + - deviceMetadata + - gpsi + - msisdn + - deviceId + - requestedMecTrafficRule + - requestedIotPlatformId + - requestedUserTransportId + required: false + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the list of registered\ + \ devices is returned. The response body shall contain a list of resources\ + \ that match the attribute filter." + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - reg-dev + summary: Register a new device - see clause 5.2.3. + description: The POST method may be used by a service consumer to register a + new device. This method is typically used in the "device registration" procedure + as described in clause 5.2.3. + operationId: registereddevicesPOST + requestBody: + description: Payload body in the request contains the information associated + to the IoT device to be registered. + content: + application/json: + schema: + $ref: '#/components/schemas/registered_devices_body' + required: true + responses: + "201": + description: "Upon success, the HTTP response shall include a \"Location\"\ + \ HTTP header that contains the resource URI of the registered device." + content: + application/json: + schema: + $ref: '#/components/schemas/registered_devices_body' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /registered_devices/{registeredDeviceId}: + get: + tags: + - reg-dev + summary: Retrieve information about a device - see clause 5.2.4. + description: The GET method may be used by a service consumer to retrieve information + about a device. This method is typically used in the "device registration + query" procedure as described in clause 5.2.4. + operationId: registereddevicesByIdGET + parameters: + - name: registeredDeviceId + in: path + description: The unique identifier of the registered device. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: "Upon success, a response body containing information about\ + \ the registered device is returned." + content: + application/json: + schema: + $ref: '#/components/schemas/registered_devices_body' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - reg-dev + summary: Update information about a device including its association to a valid + traffic rule - see clauses 5.2.5 and 5.4.3. + description: The PUT method may be used by a service consumer to update a device + registration including its association to a valid traffic rule. This method + is typically used in the "device registration update" procedure as described + in clause 5.2.5 and in the "user transport assignment" procedure as described + in clause 5.4.3. + operationId: registereddevicesByIdPUT + parameters: + - name: registeredDeviceId + in: path + description: The unique identifier of the registered device. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: One or more updated attributes that are allowed to be changed + are included in the DeviceInfo data structure in the payload body of the + request. . + content: + application/json: + schema: + $ref: '#/components/schemas/registered_devices_registeredDeviceId_body' + required: true + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the updated DeviceInfo is returned." + content: + application/json: + schema: + $ref: '#/components/schemas/registered_devices_registeredDeviceId_body' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "412": + description: "Precondition failed: used when a condition has failed during\ + \ conditional requests, e.g. when using ETags to avoid write conflicts\ + \ when using PUT" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - reg-dev + summary: Deregister a device - see clause 5.2.6. + description: The DELETE method may be used by a service consumer to deregister + a device. This method is typically used in the "device deregistration" procedure + as described in clause 5.2.6. + operationId: registereddevicesByIdDELETE + parameters: + - name: registeredDeviceId + in: path + description: The unique identifier of the registered device. + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: No Content + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /registered_iot_platforms: + get: + tags: + - reg-iot-plat + summary: Retrieve information about all IoT platforms - see clause 5.3.2. + description: The GET method may be used by an authorized service consumer to + retrieve the information of all currently registered IoT platforms. This method + is typically used in the "registered IoT platforms query" procedure as described + in clause 5.3.2. + operationId: registerediotplatformsGET + parameters: + - name: fields + in: query + description: | + The list shall contain the following attributes from the IotPlatformInfo data type: + - iotPlatformId + - enabled + required: false + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the list of registered\ + \ IoT platforms is returned." + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IotPlatformInfo' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - reg-iot-plat + summary: Register a IoT platform - see clause 5.3.4. + description: The POST method may be used by a service consumer to register a + new IoT platform. This method is typically used in the "IoT platform registration" + procedure as described in clause 5.3.4. + operationId: registerediotplatformsPOST + requestBody: + description: Payload body in the request contains the information associated + to the IoT platform to be registered. + content: + application/json: + schema: + $ref: '#/components/schemas/registered_iot_platforms_body' + required: true + responses: + "201": + description: "Upon success, the HTTP response shall include a \"Location\"\ + \ HTTP header that contains the resource URI of the registered IoT platform." + content: + application/json: + schema: + $ref: '#/components/schemas/registered_iot_platforms_body' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /registered_iot_platforms/{registeredIotPlatformId}: + get: + tags: + - reg-iot-plat + summary: Discover native services and obtain information about user transports + provided by a IoT platform - see clauses 5.3.3 and 5.4.2. + description: 'The GET method may be used by a service consumer to obtain information + about a IoT platform. This method is typically used in the "IoT platform information + request" procedure as described in clause 5.3.3 and in the "user transport + query" procedure as described in clause 5.4.2. ' + operationId: registerediotplatformsByIdGET + parameters: + - name: registeredIotPlatformId + in: path + description: The unique identifier of the registered IoT platform. + required: true + style: simple + explode: false + schema: + type: string + - name: fields + in: query + description: | + The list may contain one or more of the following attributes from the IotPlatformInfo data type: + - userTransportInfo + - customServiceTransportInfo + required: false + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing information about\ + \ the registered IoT platform is returned." + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_1' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - reg-iot-plat + summary: Update information about a IoT platform - see clause 5.3.5. + description: The PUT method may be used by a service consumer to update a IoT + platform registration. This method is typically used in the "IoT platform + update" procedure as described in clause 5.3.5. + operationId: registerediotplatformsByIdPUT + parameters: + - name: registeredIotPlatformId + in: path + description: The unique identifier of the registered IoT platform. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: One or more updated attributes that are allowed to be changed + are included in the IotPlatformInfo data structure in the payload body of + the request. . + content: + application/json: + schema: + $ref: '#/components/schemas/registered_iot_platforms_registeredIotPlatformId_body' + required: true + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the updated IotPlatformInfo is returned." + content: + application/json: + schema: + $ref: '#/components/schemas/registered_iot_platforms_registeredIotPlatformId_body' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "412": + description: "Precondition failed: used when a condition has failed during\ + \ conditional requests, e.g. when using ETags to avoid write conflicts\ + \ when using PUT" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - reg-iot-plat + summary: Deregister a IoT platform - see clause 5.3.6. + description: The DELETE method may be used by a service consumer to deregister + a IoT platform. This method is typically used in the "IoT platform deregistration" + procedure as described in clause 5.3.6. + operationId: registerediotplatformsByIdDELETE + parameters: + - name: registeredIotPlatformId + in: path + description: The unique identifier of the registered IoT platform. + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: No Content + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' +components: + schemas: + ProblemDetails: + type: object + properties: + type: + type: string + description: A URI reference according to IETF RFC 3986 that identifies + the problem type + format: uri + title: + type: string + description: "A short, human-readable summary of the problem type" + status: + type: integer + description: The HTTP status code for this occurrence of the problem + format: uint32 + detail: + type: string + description: A human-readable explanation specific to this occurrence of + the problem + instance: + type: string + description: A URI reference that identifies the specific occurrence of + the problem + format: uri + DeviceInfo: + title: DeviceInfo + required: + - deviceAuthenticationInfo + - deviceId + - enabled + type: object + properties: + deviceAuthenticationInfo: + type: string + description: "Information needed for secondary authentication of the IoT\ + \ device to the data network - see ETSI TS 129 561 [i.4] and ETSI TS 129\ + \ 061 [i.5] for 5G and LTE procedures, respectively. This attribute is\ + \ implementation dependent and should be logically linked to the identifiers\ + \ of the IoT device listed hereafter." + deviceMetadata: + type: array + description: 'Additional information about the IoT device. This attribute + is implementation dependent and may be expressed as an array of keyvalue + pairs. ' + items: + $ref: '#/components/schemas/KeyValuePair' + gpsi: + type: string + description: GPSI of the IoT device if 5G-enabled (see note 1). + pei: + type: string + description: PEI of the IoT device if 5G-enabled (see note 1). + supi: + type: string + description: SUPI of the IoT device if 5G-enabled (see note 1). + msisdn: + type: string + description: MSISDN of the IoT device if LTE-enabled (see note 1). + imei: + type: string + description: IMEI of the IoT device if LTE-enabled (see note 1). + imsi: + type: string + description: IMSI of the IoT device if LTE-enabled (see note 1). + iccid: + type: string + description: ICCID of the IoT device (see note 1). + deviceId: + type: string + description: Human-readable identifier of the IoT device. + requestedMecTrafficRule: + type: array + description: "MEC traffic rules the IoT device is requested to be associated\ + \ to (see note 2). The data type definition is as per ETSI GS\_MEC 010-2\ + \ [i.6]." + items: + $ref: '#/components/schemas/TrafficRuleDescriptor' + requestedIotPlatformId: + type: string + description: IoT platform to which the IoT device is requested to be associated + to (see note 2). + requestedUserTransportId: + type: string + description: User transport to which the IoT device is requested to be associated + to (see note 2). + deviceSpecificMessageFormats: + $ref: '#/components/schemas/DeviceSpecificMessageFormats' + downlinkInfo: + $ref: '#/components/schemas/DownlinkInfo' + clientCertificate: + type: string + description: Client-side SSL/TLS certificate to be used by the MEC IoTS + to interact with the user transport provided by the associated IoT platform + in case the MEC IoTS acts on behalf of the IoT device. + enabled: + type: boolean + description: Indication whether the IoT device has a valid associated traffic + rule (TRUE) or not (FALSE). See note 3. + description: "NOTE 1: At least one attribute among gpsi, pei, supi, msisdn,\ + \ imei, imsi, and iccid should be provided. Sufficient security\n measures\ + \ shall be put in place when any attribute among PEI, SUPI, IMEI, and IMSI\ + \ is disclosed over the API.\nNOTE 2: Until a valid traffic rule is not provided,\ + \ the device will not be able to use the IoTS. A valid traffic rule is provided\n\ + \ by one of the following options:\n • the requestedMecTrafficRule\ + \ attribute;\n • the requestedIotPlatformId attribute when the IoT\ + \ platform offers only one user transport;\n • the combination of requestedIotPlatformId\ + \ and requestedUserTransportId.\nNOTE 3: Enabled is a pseudo-attribute which\ + \ needs to be maintained by the IoTS based on the presence or not of a valid\n\ + \ traffic rule associated to the device. It cannot be set directly\ + \ by the service consumer. \n" + example: + deviceSpecificMessageFormats: + eventMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + includeImsi: true + includeSupi: true + selectedSerializer: JSON + eventTopic: eventTopic + includeDeviceId: true + includePei: true + uplinkMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + uplinkTopic: uplinkTopic + includeImsi: true + includeSupi: true + selectedSerializer: null + includeDevicePort: true + includeDeviceId: true + includePei: true + clientCertificate: clientCertificate + downlinkInfo: + downlinkTopic: downlinkTopic + devicePort: 5 + imsi: imsi + supi: supi + deviceId: deviceId + requestedMecTrafficRule: + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + enabled: true + gpsi: gpsi + requestedUserTransportId: requestedUserTransportId + iccid: iccid + pei: pei + requestedIotPlatformId: requestedIotPlatformId + deviceMetadata: + - value: value + key: key + - value: value + key: key + deviceAuthenticationInfo: deviceAuthenticationInfo + imei: imei + msisdn: msisdn + IotPlatformInfo: + title: IotPlatformInfo + required: + - enabled + - iotPlatformId + - userTransportInfo + type: object + properties: + iotPlatformId: + type: string + description: Identifier of the IoT platform. + userTransportInfo: + minItems: 1 + type: array + description: Information about the user transport(s) provided by the IoT + platform. + items: + $ref: '#/components/schemas/MBTransportInfo' + customServicesTransportInfo: + minItems: 0 + type: array + description: "Transport enabling access to vendor-specific services provided\ + \ by the IoT platform. The data type definition is as per ETSI GS MEC\ + \ 011 [i.2]." + items: + $ref: '#/components/schemas/TransportInfo' + enabled: + type: boolean + description: Indication whether the IoT platform is capable of providing + user transports and vendor-specific services (TRUE) or not (FALSE). + example: + iotPlatformId: iotPlatformId + customServicesTransportInfo: + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + userTransportInfo: + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + enabled: true + MBTransportInfo: + title: MBTransportInfo + required: + - endpoint + - id + - implSpecificInfo + - name + - protocol + - security + - type + - version + type: object + properties: + id: + type: string + description: "The identifier of this transport as per ETSI GS\_MEC\_011\ + \ [i.2]." + name: + type: string + description: "The name of this transport as per ETSI GS\_MEC\_011\_[i.2]." + description: + type: string + description: "Human-readable description of this transport as per ETSI GS\_\ + MEC 011 [i.2]." + type: + $ref: '#/components/schemas/TransportType' + protocol: + type: string + description: "The name of the protocol used. Being the transport of MB_TOPIC_BASED\ + \ type, this attribute should be typically set to \"MQTT\" or \"AMQP.\"" + version: + type: string + description: "The version of the protocol used as per ETSI GS\_MEC\_011\_\ + [i.2]." + endpoint: + $ref: '#/components/schemas/EndPointInfo' + security: + $ref: '#/components/schemas/SecurityInfo' + implSpecificInfo: + $ref: '#/components/schemas/ImplSpecificInfo' + example: + implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + EventMsg: + title: EventMsg + required: + - eventTopic + - selectedSerializer + type: object + properties: + eventTopic: + type: string + description: 'Topic where the message containing application-specific information + should be published. ' + selectedSerializer: + $ref: '#/components/schemas/SerializerType' + includeDeviceAddr: + type: boolean + description: Indication whether to include the IP address of the IoT device + (TRUE) or not (FALSE). + includeDeviceMetadata: + type: boolean + description: Indication whether to include the metadata about the IoT device + (TRUE) or not (FALSE). + includePei: + type: boolean + description: Indication whether to include the PEI of the IoT device (TRUE) + or not (FALSE). + includeSupi: + type: boolean + description: Indication whether to include the SUPI of the IoT device (TRUE) + or not (FALSE). + includeImei: + type: boolean + description: Indication whether to include the IMEI of the IoT device (TRUE) + or not (FALSE). + includeImsi: + type: boolean + description: Indication whether to include the IMSI of the IoT device (TRUE) + or not (FALSE). + includeIccid: + type: boolean + description: Indication whether to include the ICCID of the IoT device (TRUE) + or not (FALSE). + includeDeviceId: + type: boolean + description: Indication whether to include the human-readable identified + of the IoT device (TRUE) or not (FALSE). + example: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + includeImsi: true + includeSupi: true + selectedSerializer: JSON + eventTopic: eventTopic + includeDeviceId: true + includePei: true + UplinkMsg: + title: UplinkMsg + required: + - selectedSerializer + - uplinkTopic + type: object + properties: + uplinkTopic: + type: string + description: "Topic where the message containing the data generated by the\ + \ IoT device(s) should be published, in order to be consumed by the end\ + \ IoT application(s)." + selectedSerializer: + $ref: '#/components/schemas/SerializerType' + includeDevicePort: + type: boolean + description: Indication whether to include the UDP port of the remote IoT + device (TRUE) or not (FALSE). + includeDeviceAddr: + type: boolean + description: Indication whether to include the IP address of the IoT device + (TRUE) or not (FALSE). + includeDeviceMetadata: + type: boolean + description: Indication whether to include the metadata about the IoT device + (TRUE) or not (FALSE). + includePei: + type: boolean + description: Indication whether to include the PEI of the IoT device (TRUE) + or not (FALSE). + includeSupi: + type: boolean + description: Indication whether to include the SUPI of the IoT device (TRUE) + or not (FALSE). + includeImei: + type: boolean + description: Indication whether to include the IMEI of the IoT device (TRUE) + or not (FALSE). + includeImsi: + type: boolean + description: Indication whether to include the IMSI of the IoT device (TRUE) + or not (FALSE). + includeIccid: + type: boolean + description: Indication whether to include the ICCID of the IoT device (TRUE) + or not (FALSE). + includeDeviceId: + type: boolean + description: Indication whether to include the human-readable identified + of the IoT device (TRUE) or not (FALSE). + example: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + uplinkTopic: uplinkTopic + includeImsi: true + includeSupi: true + selectedSerializer: null + includeDevicePort: true + includeDeviceId: true + includePei: true + DeviceSpecificMessageFormats: + type: object + properties: + eventMsgFormat: + $ref: '#/components/schemas/EventMsg' + uplinkMsgFormat: + $ref: '#/components/schemas/UplinkMsg' + description: Format of the messages to be published by the MEC IoTS on the user + transport provided by the associated IoT platform in case the MEC IoTS acts + on behalf of the IoT device. + example: + eventMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + includeImsi: true + includeSupi: true + selectedSerializer: JSON + eventTopic: eventTopic + includeDeviceId: true + includePei: true + uplinkMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + uplinkTopic: uplinkTopic + includeImsi: true + includeSupi: true + selectedSerializer: null + includeDevicePort: true + includeDeviceId: true + includePei: true + DownlinkInfo: + type: object + properties: + downlinkTopic: + type: string + description: Topic associated to the IoT device. This topic should be used + by an end IoT application to send downlink data to the IoT device. + devicePort: + type: integer + description: "UDP port to be used by the MEC IoTS for the outgoing downlink\ + \ packets towards the IoT device. In case a default value is used, this\ + \ attribute is optional." + description: Downlink communication configuration of the user transport provided + by the associated IoT platform in case the MEC IoTS acts on behalf of the + IoT device. + example: + downlinkTopic: downlinkTopic + devicePort: 5 + ImplSpecificInfo: + type: object + properties: + eventTopics: + minItems: 0 + type: array + description: Topics used to publish events related to the established session + between the IoT device(s) and the end IoT application(s) on the user transport. + items: + type: string + uplinkTopics: + type: array + description: "Topics used to publish data generated by the IoT device(s)\ + \ on the user transport, in order to be consumed by the end IoT application(s)." + items: + type: string + downlinkTopics: + type: array + description: "Topics used to publish data generated by the IoT applications(s)\ + \ on the user transport, in order to be consumed by the end IoT device(s)." + items: + type: string + description: Additional implementation specific details of the transport. + example: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + SerializerType: + type: string + description: The enumeration SerializerType represents types of serializers. + enum: + - JSON + - XML + - PROTOBUF3 + TransportInfo: + title: TransportInfo + required: + - endpoint + - id + - name + - protocol + - security + - type + - version + type: object + properties: + id: + type: string + description: The identifier of this transport. + name: + type: string + description: The name of this transport. + description: + type: string + description: Human-readable description of this transport. + type: + $ref: '#/components/schemas/TransportType' + protocol: + type: string + description: The name of the protocol used. Shall be set to "HTTP" for a + REST API. + version: + type: string + description: The version of the protocol used. + endpoint: + $ref: '#/components/schemas/EndPointInfo' + security: + $ref: '#/components/schemas/SecurityInfo' + implSpecificInfo: + type: string + description: Additional implementation specific details of the transport. + example: + implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + TransportType: + type: string + description: Enumeration representing types of transports. + enum: + - REST_HTTP + - MB_TOPIC_BASED + - MB_ROUTING + - MB_PUBSUB + - RPC + - RPC_STREAMING + - WEBSOCKET + EndPointInfo: + title: EndPointInfo + type: object + properties: + uris: + type: array + description: "Entry point information of the service as string, formatted\ + \ according to URI syntax (see IETF RFC 3986 [8]). Shall be used for REST\ + \ APIs. See note." + items: + type: string + fqdn: + type: array + description: Fully Qualified Domain Name of the service. See note. + items: + type: string + addresses: + type: array + items: + $ref: '#/components/schemas/Addresses' + alternative: + type: string + description: "Entry point information of the service in a format defined\ + \ by an implementation, or in an external specification. See\_note." + description: "NOTE: Exactly one of \"uris\", \"fqdn\", \"addresses\" or \"alternative\"\ + \ shall be present. \n" + example: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + SecurityInfo: + type: object + properties: + oAuth2Info: + $ref: '#/components/schemas/OAuth2Info' + extensions: + type: string + description: "Extensions for alternative transport mechanisms. These extensions\ + \ depend on the actual transport and are out of scope of the present document.\ + \ For instance, such extensions may be used to signal the necessary parameters\ + \ for the client to use TLS-based authorization defined for alternative\ + \ transports (see ETSI GS MEC 009 [5] for more information).\n" + example: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + Addresses: + required: + - host + - port + type: object + properties: + host: + type: string + description: Host portion of the address. + port: + type: integer + description: Port portion of the address. + description: Entry point information of the service as one or more pairs of + IP address and port. See note. + example: + port: 0 + host: host + OAuth2Info: + required: + - grantTypes + type: object + properties: + grantTypes: + type: array + description: "List of supported OAuth 2.0 grant types.\nEach entry shall\ + \ be one of the following permitted values:\n- OAUTH2_AUTHORIZATION_CODE:\ + \ Authorization code grant type\n- OAUTH2_IMPLICIT_GRANT: Implicit grant\ + \ type\n- OAUTH2_RESOURCE_OWNER: Resource owner password credentials grant\ + \ type\n- OAUTH2_CLIENT_CREDENTIALS: Client credentials grant type\nOnly\ + \ the value \"OAUTH2_CLIENT_CREDENTIALS\" is supported in the present\ + \ document.\n" + items: + type: string + enum: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_IMPLICIT_GRANT + - OAUTH2_RESOURCE_OWNER + - OAUTH2_CLIENT_CREDENTIALS + tokenEndpoint: + type: string + description: The token endpoint. Shall be present unless the grant type + is OAUTH2_IMPLICIT_GRANT. + format: uri + description: "Parameters related to use of OAuth 2.0. Shall be present in case\ + \ OAuth 2.0 (see IETF RFC 6749 [13]) is supported to secure the provision\ + \ of the service over the transport." + example: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + TrafficRuleDescriptor: + title: TrafficRuleDescriptor + required: + - action + - filterType + - priority + - trafficFilter + - trafficRuleId + type: object + properties: + trafficRuleId: + type: string + description: Identifies the traffic rule. + filterType: + type: string + description: "Definition of filter type: per FLOW or PACKET\n\nIf it is\ + \ per FLOW, the filter matches upstream (e.g. UE->EPC) packets and downstream\ + \ (e.g. EPC->UE) packets are handled by the same context.\n" + enum: + - per FLOW + - per PACKET + priority: + type: integer + description: "Priority of this traffic rule within the range 0 to 255. If\ + \ traffic rule conflicts, the one with higher priority take precedence.\ + \ See note\_1." + trafficFilter: + type: array + description: The filter used to identify specific flow/packets that need + to be handled by the MEC host. + items: + $ref: '#/components/schemas/TrafficFilter' + action: + type: string + description: "Identifies the action of the MEC host data plane, when a packet\ + \ matches the trafficFilter, the example actions include:\nDROP,\nFORWARD_DECAPSULATED,\n\ + FORWARD_ENCAPSULATED,\nPASSTHROUGH,\nDUPLICATE_DECAPSULATED,\nDUPLICATE_ENCAPSULATED " + enum: + - SEE_DESCRIPTION + dstInterface: + $ref: '#/components/schemas/InterfaceDescriptor' + description: "NOTE 1: Value indicates the priority in descending order, i.e.\ + \ with 0 as the highest priority and 255 as the lowest\n priority.\n\ + NOTE 2: Some applications (like inline/tap) require two interfaces. The first\ + \ interface in the case of inline/tap is on the\n client (e.g. UE)\ + \ side and the second on the core network (e.g. EPC) side. \n" + example: + action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + TrafficFilter: + title: TrafficFilter + type: object + properties: + srcAddress: + type: array + description: "An IP address or a range of IP addresses.\nFor IPv4, the IP\ + \ address could be an IP address plus mask, or an individual IP address,\ + \ or a range of IP addresses.\nFor IPv6, the IP address could be an IP\ + \ prefix, or a range of IP prefixes." + items: + type: string + dstAddress: + type: array + description: "An IP address or a range of IP addresses.\nFor IPv4, the IP\ + \ address could be an IP address plus mask, or an individual IP address,\ + \ or a range of IP addresses.\nFor IPv6, the IP address could be an IP\ + \ prefix, or a range of IP prefixes." + items: + type: string + srcPort: + type: array + description: A port or a range of ports. + items: + type: string + dstPort: + type: array + description: A port or a range of ports. + items: + type: string + protocol: + type: array + description: Specify the protocol of the traffic filter. + items: + type: string + tag: + type: array + description: Used for tag based traffic rule. + items: + type: string + uri: + type: array + description: "An URI label, in application layer, i.e. in HTTP message,\ + \ is used to filter the traffic." + items: + type: string + packetLabel: + type: array + description: "A customized packet label in network layer, as defined by\ + \ the owner of the MEC platform, is used to filter the traffic." + items: + type: string + srcTunnelAddress: + type: array + description: Used for GTP tunnel based traffic rule. + items: + type: string + tgtTunnelAddress: + type: array + description: Used for GTP tunnel based traffic rule. + items: + type: string + srcTunnelPort: + type: array + description: Used for GTP tunnel based traffic rule. + items: + type: string + dstTunnelPort: + type: array + description: Used for GTP tunnel based traffic rule. + items: + type: string + qCI: + type: integer + description: Used to match all packets that have the same QCI. + dSCP: + type: integer + description: Used to match all IPv4 packets that have the same DSCP. + tC: + type: integer + description: Used to match all IPv6 packets that have the same TC. + example: + srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + InterfaceDescriptor: + title: InterfaceDescriptor + required: + - interfaceType + type: object + properties: + interfaceType: + type: string + description: "Type of interface: TUNNEL, MAC, IP, etc." + enum: + - TUNNEL + - MAC + - IP + tunnelInfo: + $ref: '#/components/schemas/TunnelInfo' + srcMACAddress: + type: string + description: "If the interface type is MAC, the source address identifies\ + \ the MAC address of the interface." + dstMACAddress: + type: string + description: "If the interface type is MAC, the destination address identifies\ + \ the MAC address of the destination. Only used for dstInterface." + dstIPAddress: + type: string + description: "If the interface type is IP, the destination address identifies\ + \ the IP address of the destination. Only used for dstInterface." + example: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + TunnelInfo: + title: TunnelInfo + required: + - tunnelDstAddress + - tunnelSrcAddress + - tunnelType + type: object + properties: + tunnelType: + type: string + description: "Type of tunnel: GTP-U, GRE, etc." + enum: + - GTP-U + - GRE + tunnelDstAddress: + type: string + description: Destination address of the tunnel. + tunnelSrcAddress: + type: string + description: Source address of the tunnel. + tunnelSpecificData: + type: string + description: Parameters specific to the tunnel. + example: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + KeyValuePair: + type: object + properties: + key: + type: string + value: + type: string + description: Key-value pairs for device metadata + example: + value: value + key: key + inline_response_200: + type: object + properties: + items: + $ref: '#/components/schemas/DeviceInfo' + example: + items: + deviceSpecificMessageFormats: + eventMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + includeImsi: true + includeSupi: true + selectedSerializer: JSON + eventTopic: eventTopic + includeDeviceId: true + includePei: true + uplinkMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + uplinkTopic: uplinkTopic + includeImsi: true + includeSupi: true + selectedSerializer: null + includeDevicePort: true + includeDeviceId: true + includePei: true + clientCertificate: clientCertificate + downlinkInfo: + downlinkTopic: downlinkTopic + devicePort: 5 + imsi: imsi + supi: supi + deviceId: deviceId + requestedMecTrafficRule: + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + enabled: true + gpsi: gpsi + requestedUserTransportId: requestedUserTransportId + iccid: iccid + pei: pei + requestedIotPlatformId: requestedIotPlatformId + deviceMetadata: + - value: value + key: key + - value: value + key: key + deviceAuthenticationInfo: deviceAuthenticationInfo + imei: imei + msisdn: msisdn + registered_devices_body: + type: object + properties: + DeviceInfo: + $ref: '#/components/schemas/DeviceInfo' + example: + DeviceInfo: + deviceSpecificMessageFormats: + eventMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + includeImsi: true + includeSupi: true + selectedSerializer: JSON + eventTopic: eventTopic + includeDeviceId: true + includePei: true + uplinkMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + uplinkTopic: uplinkTopic + includeImsi: true + includeSupi: true + selectedSerializer: null + includeDevicePort: true + includeDeviceId: true + includePei: true + clientCertificate: clientCertificate + downlinkInfo: + downlinkTopic: downlinkTopic + devicePort: 5 + imsi: imsi + supi: supi + deviceId: deviceId + requestedMecTrafficRule: + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + enabled: true + gpsi: gpsi + requestedUserTransportId: requestedUserTransportId + iccid: iccid + pei: pei + requestedIotPlatformId: requestedIotPlatformId + deviceMetadata: + - value: value + key: key + - value: value + key: key + deviceAuthenticationInfo: deviceAuthenticationInfo + imei: imei + msisdn: msisdn + registered_devices_registeredDeviceId_body: + type: object + properties: + DeviceInfo: + $ref: '#/components/schemas/DeviceInfo' + example: + DeviceInfo: + deviceSpecificMessageFormats: + eventMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + includeImsi: true + includeSupi: true + selectedSerializer: JSON + eventTopic: eventTopic + includeDeviceId: true + includePei: true + uplinkMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + uplinkTopic: uplinkTopic + includeImsi: true + includeSupi: true + selectedSerializer: null + includeDevicePort: true + includeDeviceId: true + includePei: true + clientCertificate: clientCertificate + downlinkInfo: + downlinkTopic: downlinkTopic + devicePort: 5 + imsi: imsi + supi: supi + deviceId: deviceId + requestedMecTrafficRule: + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + enabled: true + gpsi: gpsi + requestedUserTransportId: requestedUserTransportId + iccid: iccid + pei: pei + requestedIotPlatformId: requestedIotPlatformId + deviceMetadata: + - value: value + key: key + - value: value + key: key + deviceAuthenticationInfo: deviceAuthenticationInfo + imei: imei + msisdn: msisdn + registered_iot_platforms_body: + type: object + properties: + IoTPlatformInfo: + $ref: '#/components/schemas/IotPlatformInfo' + example: + IoTPlatformInfo: + iotPlatformId: iotPlatformId + customServicesTransportInfo: + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + userTransportInfo: + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + enabled: true + inline_response_200_1: + type: object + properties: + IotPlatformInfo: + $ref: '#/components/schemas/IotPlatformInfo' + example: + IotPlatformInfo: + iotPlatformId: iotPlatformId + customServicesTransportInfo: + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + userTransportInfo: + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + enabled: true + registered_iot_platforms_registeredIotPlatformId_body: + type: object + properties: + IotPlatformInfo: + $ref: '#/components/schemas/IotPlatformInfo' + example: + IotPlatformInfo: + iotPlatformId: iotPlatformId + customServicesTransportInfo: + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + userTransportInfo: + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + enabled: true + responses: + "200": + description: OK + "204": + description: No Content + "400": + description: "Bad Request: used to indicate that incorrect parameters were passed\ + \ to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status of\ + \ the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be mapped\ + \ to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "412": + description: "Precondition failed: used when a condition has failed during conditional\ + \ requests, e.g. when using ETags to avoid write conflicts when using PUT" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' diff --git a/go-apps/meep-iot/entrypoint.sh b/go-apps/meep-iot/entrypoint.sh new file mode 100755 index 0000000000000000000000000000000000000000..04990153483b58425e42ae01cf33c50b75545aad --- /dev/null +++ b/go-apps/meep-iot/entrypoint.sh @@ -0,0 +1,48 @@ +#!/bin/bash +set -e + +echo "MEEP_HOST_URL: ${MEEP_HOST_URL}" +echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" +echo "MEEP_MEP_NAME: ${MEEP_MEP_NAME}" +echo "MEEP_CODECOV: ${MEEP_CODECOV}" +if [[ ! -z "${MEEP_MEP_NAME}" ]]; then + svcPath="${MEEP_SANDBOX_NAME}/${MEEP_MEP_NAME}" +else + svcPath="${MEEP_SANDBOX_NAME}" +fi + +# Update API yaml basepaths to enable "Try-it-out" feature +# OAS2: Set relative path to sandbox name + endpoint path (origin will be derived from browser URL) +# OAS3: Set full path to provided Host URL + sandbox name + endpoint path +setBasepath() { + # OAS3 + hostName=$(echo "${MEEP_HOST_URL}" | sed -E 's/^\s*.*:\/\///g') + echo "Replacing [localhost] with ${hostName} to url in: '$1'" + sed -i "s,localhost,${hostName},g" "$1"; + + # OAS2 and OAS3 + echo "Replacing [sandboxname] with ${svcPath} to basepath or url in: '$1'" + sed -i "s,sandboxname,${svcPath},g" "$1"; +} + +# Set basepath for API files +for file in /api/*; do + if [[ ! -e "$file" ]]; then continue; fi + setBasepath "$file" +done + +# Set basepath for user-supplied API files +for file in /user-api/*; do + if [[ ! -e "$file" ]]; then continue; fi + setBasepath "$file" +done + +# Start service +currenttime=`date "+%Y%m%d-%H%M%S"` +filepath="/codecov/codecov-meep-iot-" +filename=$filepath$currenttime".out" +if [ "$MEEP_CODECOV" = 'true' ]; then + exec /meep-iot -test.coverprofile=$filename __DEVEL--code-cov +else + exec /meep-iot +fi diff --git a/go-apps/meep-iot/go.mod b/go-apps/meep-iot/go.mod new file mode 100644 index 0000000000000000000000000000000000000000..17227eec90432a99a2738eebc9d9a77eecc2e549 --- /dev/null +++ b/go-apps/meep-iot/go.mod @@ -0,0 +1,43 @@ +module github.com/InterDigitalInc/AdvantEDGE/go-apps/meep-iot + +go 1.12 + +require ( + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-app-support-client v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-key-mgr v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-model v0.0.0 // indirect + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-engine-client v0.0.0 // indirect + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-http-logger v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-iot-mgr v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-metrics v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-model v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-mq v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-redis v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-sandbox-ctrl-client v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-service-mgmt-client v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-subscriptions v0.0.0 // indirect + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-swagger-api-mgr v0.0.0 + github.com/gorilla/handlers v1.5.1 + github.com/gorilla/mux v1.8.1 + github.com/prometheus/client_golang v1.9.0 +) + +replace ( + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-app-support-client => ../../go-packages/meep-app-support-client + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-key-mgr => ../../go-packages/meep-data-key-mgr + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-model => ../../go-packages/meep-data-model + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-engine-client => ../../go-packages/meep-gis-engine-client + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-http-logger => ../../go-packages/meep-http-logger + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-iot-mgr => ../../go-packages/meep-iot-mgr + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger => ../../go-packages/meep-logger + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-metrics => ../../go-packages/meep-metrics + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-model => ../../go-packages/meep-model + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-mq => ../../go-packages/meep-mq + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-redis => ../../go-packages/meep-redis + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-sandbox-ctrl-client => ../../go-packages/meep-sandbox-ctrl-client + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-service-mgmt-client => ../../go-packages/meep-service-mgmt-client + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-subscriptions => ../../go-packages/meep-subscriptions + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-swagger-api-mgr => ../../go-packages/meep-swagger-api-mgr + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-websocket => ../../go-packages/meep-websocket +) diff --git a/go-apps/meep-iot/go.sum b/go-apps/meep-iot/go.sum new file mode 100644 index 0000000000000000000000000000000000000000..d2eacd2e5c2eaef6bcf0775f09b7b004b9fb2d35 --- /dev/null +++ b/go-apps/meep-iot/go.sum @@ -0,0 +1,505 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/InterDigitalInc/AdvantEDGE v1.9.2 h1:CAcF+bn5m0Va2mHFL2lE4awU/kjuF6CjC05phiz8vnk= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/RyanCarrier/dijkstra v0.0.0-20190726134004-b51cadb5ae52 h1:trnwuu/Q8T59kgRjXcSDBODnyZP9wes+bnLn0lx4PgM= +github.com/RyanCarrier/dijkstra v0.0.0-20190726134004-b51cadb5ae52/go.mod h1:DdR6ymcLl8+sN/XOVNjnYO1NDYfgHskGjreZUDuQCTY= +github.com/RyanCarrier/dijkstra-1 v0.0.0-20170512020943-0e5801a26345/go.mod h1:OK4EvWJ441LQqGzed5NGB6vKBAE34n3z7iayPcEwr30= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/albertorestifo/dijkstra v0.0.0-20160910063646-aba76f725f72/go.mod h1:o+JdB7VetTHjLhU0N57x18B9voDBQe0paApdEAEoEfw= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/eclipse/paho.mqtt.golang v1.4.2 h1:66wOzfUHSSI1zamx7jR6yMEI5EuHnT1G6rNA5PM12m4= +github.com/eclipse/paho.mqtt.golang v1.4.2/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-redis/redis v6.15.2+incompatible h1:9SpNVG76gr6InJGxoZ6IuuxaCOQwDAhzyXg+Bs+0Sb4= +github.com/go-redis/redis v6.15.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattomatic/dijkstra v0.0.0-20130617153013-6f6d134eb237/go.mod h1:UOnLAUmVG5paym8pD3C4B9BQylUDC2vXFJJpT7JrlEA= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= +github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/roymx/viper v1.3.3-0.20190416163942-b9a223fc58a3 h1:lBNvYUFo7d4fHs8BXUmoTzbdUo4usq6PlP5qn894sGA= +github.com/roymx/viper v1.3.3-0.20190416163942-b9a223fc58a3/go.mod h1:jo59Sv6xirZtbxbaZbCtrQd1CSufmcxJZIC8hm2tepw= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v1.1.0 h1:py12iX8XSyI7aN/3dUT8DFIDJazNJsVJdxNVEpnQTZM= +github.com/streadway/amqp v1.1.0/go.mod h1:WYSrTEYHOXHd0nwFeUXAe2G2hRnQT+deZJJf88uS9Bg= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/go-apps/meep-iot/main.go b/go-apps/meep-iot/main.go new file mode 100644 index 0000000000000000000000000000000000000000..ff72f16d39f458bf680ee61df302114d025981bd --- /dev/null +++ b/go-apps/meep-iot/main.go @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "net/http" + "os" + "os/signal" + "syscall" + "time" + + server "github.com/InterDigitalInc/AdvantEDGE/go-apps/meep-iot/server" + log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" + "github.com/prometheus/client_golang/prometheus/promhttp" + + "github.com/gorilla/handlers" +) + +func init() { + // Log as JSON instead of the default ASCII formatter. + log.MeepJSONLogInit("meep-iot") +} + +func main() { + log.Info(os.Args) + + log.Info("Starting IOT Service") + + run := true + go func() { + sigchan := make(chan os.Signal, 10) + signal.Notify(sigchan, syscall.SIGINT, syscall.SIGTERM) + <-sigchan + log.Info("Program killed !") + // do last actions and wait for all write operations to end + run = false + }() + + go func() { + // Initialize IOT + err := server.Init() + if err != nil { + log.Error("Failed to initialize IOT Service") + run = false + return + } + + // Start IOT Event Handler thread + err = server.Run() + if err != nil { + log.Error("Failed to start IOT Service") + run = false + return + } + + // Start IOT REST API Server + router := server.NewRouter() + methods := handlers.AllowedMethods([]string{"OPTIONS", "DELETE", "GET", "HEAD", "POST", "PUT"}) + header := handlers.AllowedHeaders([]string{"content-type"}) + log.Fatal(http.ListenAndServe(":80", handlers.CORS(methods, header)(router))) + run = false + }() + + go func() { + // Initialize Metrics Endpoint + http.Handle("/metrics", promhttp.Handler()) + log.Fatal(http.ListenAndServe(":9000", nil)) + run = false + }() + + count := 0 + for { + if !run { + _ = server.Stop() + log.Info("Ran for ", count, " seconds") + break + } + time.Sleep(time.Second) + count++ + } + +} diff --git a/go-apps/meep-iot/main_test.go b/go-apps/meep-iot/main_test.go new file mode 100644 index 0000000000000000000000000000000000000000..5e054c3f011cf7b40f026148c216fe1a0f08a525 --- /dev/null +++ b/go-apps/meep-iot/main_test.go @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "os" + "strings" + "testing" + + log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" +) + +// Build: +// $ go test -covermode=count -coverpkg=./... -c -o +// Run: +// $ ./ -test.coverprofile=cover.out __DEVEL--code-cov + +// TestMain is a hack that allows us to figure out what the coverage is during +// integration tests. I would not recommend that you use a binary built using +// this hack outside of a test suite. +func TestMain(t *testing.T) { + var ( + args []string + run bool + ) + + log.Info(os.Args) + for _, arg := range os.Args { + switch { + case arg == "__DEVEL--code-cov": + run = true + case strings.HasPrefix(arg, "-test"): + case strings.HasPrefix(arg, "__DEVEL"): + default: + args = append(args, arg) + } + } + os.Args = args + log.Info(os.Args) + + if run { + main() + } +} diff --git a/go-apps/meep-iot/sbi/iot-sbi.go b/go-apps/meep-iot/sbi/iot-sbi.go new file mode 100644 index 0000000000000000000000000000000000000000..68f8d2168480ab88aa9a218a8f2db6e6a4e36de9 --- /dev/null +++ b/go-apps/meep-iot/sbi/iot-sbi.go @@ -0,0 +1,454 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package sbi + +import ( + "sync" + + tm "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-iot-mgr" + log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" + mod "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-model" + mq "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-mq" + sam "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-swagger-api-mgr" +) + +const moduleName string = "meep-iot-sbi" + +// var redisAddr string = "meep-redis-master.default.svc.cluster.local:6379" +// var influxAddr string = "http://meep-influxdb.default.svc.cluster.local:8086" + +type SbiCfg struct { + ModuleName string + SandboxName string + IotBroker string + IotTopic string + MepName string + RedisAddr string + InfluxAddr string + Locality []string + IotNotify func(string, string) + ScenarioNameCb func(string) + CleanUpCb func() +} + +type IotSbi struct { + moduleName string + sandboxName string + mepName string + scenarioName string + localityEnabled bool + locality map[string]bool + mqLocal *mq.MsgQueue + handlerId int + apiMgr *sam.SwaggerApiMgr + activeModel *mod.Model + iotMgr *tm.IotMgr + updateScenarioNameCB func(string) + cleanUpCB func() + mutex sync.Mutex +} + +var sbi *IotSbi + +type IotPlatformInfo struct { + IotPlatformId string + UserTransportInfo []MbTransportInfo + CustomServicesTransportInfo []TransportInfo + Enabled bool +} + +type MbTransportInfo struct { + Id string + Name string + Description string + Type_ *string + Protocol string + Version string + Endpoint *EndPointInfo + Security *SecurityInfo + ImplSpecificInfo *ImplSpecificInfo +} + +type TransportInfo struct { + Id string + Name string + Description string + Type_ *string + Protocol string + Version string + Endpoint *EndPointInfo + Security *SecurityInfo + ImplSpecificInfo string +} + +type EndPointInfo struct { + Uris []string + Fqdn []string + Addresses []Addresses + Alternative string +} + +type Addresses struct { + Host string + Port int32 +} + +type SecurityInfo struct { + OAuth2Info *OAuth2Info + Extensions string +} + +type OAuth2Info struct { + GrantTypes []string + TokenEndpoint string +} + +type ImplSpecificInfo struct { + EventTopics []string + UplinkTopics []string + DownlinkTopics []string +} + +type DeviceInfo struct { + DeviceAuthenticationInfo string + //DeviceMetadata []KeyValuePair + Gpsi string + Pei string + Supi string + Msisdn string + Imei string + Imsi string + Iccid string + DeviceId string + //RequestedMecTrafficRule []TrafficRuleDescriptor + RequestedIotPlatformId string + RequestedUserTransportId string + //DeviceSpecificMessageFormats *DeviceSpecificMessageFormats + //DownlinkInfo *DownlinkInfo + ClientCertificate string + Enabled bool +} + +// Init - IOT Service SBI initialization +func Init(cfg SbiCfg) (err error) { + + // Create new SBI instance + if sbi != nil { + sbi = nil + } + sbi = new(IotSbi) + sbi.moduleName = cfg.ModuleName + sbi.sandboxName = cfg.SandboxName + sbi.mepName = cfg.MepName + sbi.scenarioName = "" + sbi.updateScenarioNameCB = cfg.ScenarioNameCb + sbi.cleanUpCB = cfg.CleanUpCb + + // Fill locality map + if len(cfg.Locality) > 0 { + sbi.locality = make(map[string]bool) + for _, locality := range cfg.Locality { + sbi.locality[locality] = true + } + sbi.localityEnabled = true + } else { + sbi.localityEnabled = false + } + + // Create message queue + sbi.mqLocal, err = mq.NewMsgQueue(mq.GetLocalName(sbi.sandboxName), moduleName, sbi.sandboxName, cfg.RedisAddr) + if err != nil { + log.Error("Failed to create Message Queue with error: ", err) + return err + } + log.Info("Message Queue created") + + // Create Swagger API Manager + sbi.apiMgr, err = sam.NewSwaggerApiMgr(sbi.moduleName, sbi.sandboxName, sbi.mepName, sbi.mqLocal) + if err != nil { + log.Error("Failed to create Swagger API Manager. Error: ", err) + return err + } + log.Info("Swagger API Manager created") + + // Create new active scenario model + modelCfg := mod.ModelCfg{ + Name: "activeScenario", + Namespace: sbi.sandboxName, + Module: moduleName, + UpdateCb: nil, + DbAddr: cfg.RedisAddr, + } + sbi.activeModel, err = mod.NewModel(modelCfg) + if err != nil { + log.Error("Failed to create model: ", err.Error()) + return err + } + + // Connect to IOT Manager + sbi.iotMgr, err = tm.NewIotMgr(sbi.moduleName, sbi.sandboxName) + if err != nil { + log.Error("Failed connection to IOT Manager: ", err) + return err + } + log.Info("Connected to IOT Manager") + + // Initialize service + processActiveScenarioUpdate() + + return nil +} + +// Run - MEEP IOT execution +func Run() (err error) { + + // Start Swagger API Manager (provider) + err = sbi.apiMgr.Start(true, false) + if err != nil { + log.Error("Failed to start Swagger API Manager with error: ", err.Error()) + return err + } + log.Info("Swagger API Manager started") + + // Add module Swagger APIs + err = sbi.apiMgr.AddApis() + if err != nil { + log.Error("Failed to add Swagger APIs with error: ", err.Error()) + return err + } + log.Info("Swagger APIs successfully added") + + // Register Message Queue handler + handler := mq.MsgHandler{Handler: msgHandler, UserData: nil} + sbi.handlerId, err = sbi.mqLocal.RegisterHandler(handler) + if err != nil { + log.Error("Failed to register message queue handler: ", err.Error()) + return err + } + + return nil +} + +func Stop() (err error) { + if sbi == nil { + return + } + + if sbi.mqLocal != nil { + sbi.mqLocal.UnregisterHandler(sbi.handlerId) + } + + if sbi.apiMgr != nil { + // Remove APIs + err = sbi.apiMgr.RemoveApis() + if err != nil { + log.Error("Failed to remove APIs with err: ", err.Error()) + return err + } + } + + // Delete IOT Manager + if sbi.iotMgr != nil { + err = sbi.iotMgr.DeleteIotMgr() + if err != nil { + log.Error(err.Error()) + return err + } + } + + return nil +} + +// Message Queue handler +func msgHandler(msg *mq.Msg, userData interface{}) { + switch msg.Message { + case mq.MsgScenarioActivate: + log.Debug("RX MSG: ", mq.PrintMsg(msg)) + processActiveScenarioUpdate() + case mq.MsgScenarioUpdate: + log.Debug("RX MSG: ", mq.PrintMsg(msg)) + processActiveScenarioUpdate() + case mq.MsgScenarioTerminate: + log.Debug("RX MSG: ", mq.PrintMsg(msg)) + processActiveScenarioTerminate() + default: + log.Trace("Ignoring unsupported message: ", mq.PrintMsg(msg)) + } +} + +func processActiveScenarioTerminate() { + log.Debug("processActiveScenarioTerminate") + + // Sync with active scenario store + sbi.activeModel.UpdateScenario() + + // Update scenario name + sbi.scenarioName = "" + + sbi.cleanUpCB() +} + +func processActiveScenarioUpdate() { + sbi.mutex.Lock() + defer sbi.mutex.Unlock() + + log.Debug("processActiveScenarioUpdate") + sbi.activeModel.UpdateScenario() + + // Process new scenario + var scenarioName = sbi.activeModel.GetScenarioName() + if scenarioName != sbi.scenarioName { + log.Info("processActiveScenarioUpdate: Entering in then") + // Update scenario name + sbi.scenarioName = scenarioName + sbi.updateScenarioNameCB(sbi.scenarioName) + + // err := initializeIotMessageDistribution() + // if err != nil { + // log.Error("Failed to initialize V2X message distribution: ", err) + // return + // } + } +} + +func RegisterIotPlatformInfo(iotPlatformInfo IotPlatformInfo) (responseData IotPlatformInfo, err error) { + log.Info(">>> RegisterIotPlatformInfo: ", iotPlatformInfo) + + // Populate the list of the devices for this IoT platform + pltf := convertToIotMgr(iotPlatformInfo) + err = sbi.iotMgr.RegisterIotPlatformInfo(pltf) + if err != nil { + return iotPlatformInfo, err + } + + log.Info("<<< RegisterIotPlatformInfo: ", iotPlatformInfo) + return iotPlatformInfo, nil +} + +func DeregisterIotPlatformInfo(iotPlatformId string) (err error) { + log.Info(">>> DeregisterIotPlatformInfo: ", iotPlatformId) + + err = sbi.iotMgr.DeregisterIotPlatformInfo(iotPlatformId) + if err != nil { + return err + } + + return nil +} + +func GetDevices() (devices []DeviceInfo, err error) { + log.Info(">>> GetDevices") + + _, err = sbi.iotMgr.GetDevices() + if err != nil { + return devices, err + } + + return devices, nil +} + +func GetDevice(deviceId string) (device DeviceInfo, err error) { + log.Info(">>> GetDevice: ", deviceId) + + _, err = sbi.iotMgr.GetDevice(deviceId) + if err != nil { + return device, err + } + + return device, nil +} + +func convertToIotMgr(val IotPlatformInfo) (item tm.IotPlatformInfo) { + item.IotPlatformId = val.IotPlatformId + item.Enabled = val.Enabled + for _, userTransportInfo := range val.UserTransportInfo { + v := tm.MbTransportInfo{ + Id: userTransportInfo.Id, + Name: userTransportInfo.Name, + Description: userTransportInfo.Description, + Protocol: userTransportInfo.Protocol, + Version: userTransportInfo.Version, + } + if userTransportInfo.Type_ != nil { + s := string(*userTransportInfo.Type_) + v.Type_ = &s + } + if userTransportInfo.Endpoint != nil { + e := tm.EndPointInfo{ + Uris: userTransportInfo.Endpoint.Uris, + Fqdn: userTransportInfo.Endpoint.Fqdn, + Alternative: userTransportInfo.Endpoint.Alternative, + } + if len(userTransportInfo.Endpoint.Addresses) != 0 { + for _, a := range userTransportInfo.Endpoint.Addresses { + e.Addresses = append(e.Addresses, tm.Addresses{Host: a.Host, Port: a.Port}) + } + } + v.Endpoint = &e + } + if userTransportInfo.Security != nil { + e := tm.SecurityInfo{} + if userTransportInfo.Security.OAuth2Info != nil { + e.OAuth2Info = &tm.OAuth2Info{ + GrantTypes: userTransportInfo.Security.OAuth2Info.GrantTypes, + TokenEndpoint: userTransportInfo.Security.OAuth2Info.TokenEndpoint, + } + } + e.Extensions = userTransportInfo.Security.Extensions + } + if userTransportInfo.ImplSpecificInfo != nil { + v.ImplSpecificInfo = &tm.ImplSpecificInfo{ + EventTopics: userTransportInfo.ImplSpecificInfo.EventTopics, + UplinkTopics: userTransportInfo.ImplSpecificInfo.UplinkTopics, + DownlinkTopics: userTransportInfo.ImplSpecificInfo.DownlinkTopics, + } + } + item.UserTransportInfo = append(item.UserTransportInfo, v) + } + if val.CustomServicesTransportInfo != nil && len(val.CustomServicesTransportInfo) != 0 { + item.CustomServicesTransportInfo = make([]tm.TransportInfo, 0) + for _, customServicesTransportInfo := range val.CustomServicesTransportInfo { + v := tm.TransportInfo{ + Id: customServicesTransportInfo.Id, + Name: customServicesTransportInfo.Name, + Description: customServicesTransportInfo.Description, + Protocol: customServicesTransportInfo.Protocol, + Version: customServicesTransportInfo.Version, + } + if customServicesTransportInfo.Type_ != nil { + s := string(*customServicesTransportInfo.Type_) + v.Type_ = &s + } + if customServicesTransportInfo.Endpoint != nil { + e := tm.EndPointInfo{ + Uris: customServicesTransportInfo.Endpoint.Uris, + Fqdn: customServicesTransportInfo.Endpoint.Fqdn, + Alternative: customServicesTransportInfo.Endpoint.Alternative, + } + if len(customServicesTransportInfo.Endpoint.Addresses) != 0 { + for _, a := range customServicesTransportInfo.Endpoint.Addresses { + e.Addresses = append(e.Addresses, tm.Addresses{Host: a.Host, Port: a.Port}) + } + } + v.Endpoint = &e + } + item.CustomServicesTransportInfo = append(item.CustomServicesTransportInfo, v) + } + } + + return item +} diff --git a/go-apps/meep-iot/server/README.md b/go-apps/meep-iot/server/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4d8c6c8948cce43f69dd022acba0b5725075cb71 --- /dev/null +++ b/go-apps/meep-iot/server/README.md @@ -0,0 +1,26 @@ +# Go API Server for swagger + +ETSI GS MEC 033 IoT API described using OpenAPI. + +## Overview +This server was generated by the [swagger-codegen] +(https://github.com/swagger-api/swagger-codegen) project. +By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. +- + +To see how to make this your own, look here: + +[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md) + +- API version: 3.1.1 +- Build date: 2024-07-25T09:23:34.815Z[Etc/UTC] +For more information, please visit [https://forge.etsi.org/rep/mec/gs021-amsi-api](https://forge.etsi.org/rep/mec/gs021-amsi-api) + + +### Running the server +To run the server, follow these simple steps: + +``` +go run main.go +``` + diff --git a/go-apps/meep-iot/server/api_reg_dev.go b/go-apps/meep-iot/server/api_reg_dev.go new file mode 100644 index 0000000000000000000000000000000000000000..599ca9f6185331dde56076312bc87c7a7d8beaee --- /dev/null +++ b/go-apps/meep-iot/server/api_reg_dev.go @@ -0,0 +1,34 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "net/http" +) + +func RegistereddevicesByIdDELETE(w http.ResponseWriter, r *http.Request) { + registereddevicesByIdDELETE(w, r) +} + +func RegistereddevicesByIdGET(w http.ResponseWriter, r *http.Request) { + registereddevicesByIdGET(w, r) +} + +func RegistereddevicesByIdPUT(w http.ResponseWriter, r *http.Request) { + registereddevicesByIdPUT(w, r) +} + +func RegistereddevicesGET(w http.ResponseWriter, r *http.Request) { + registereddevicesGET(w, r) +} + +func RegistereddevicesPOST(w http.ResponseWriter, r *http.Request) { + registereddevicesPOST(w, r) +} diff --git a/go-apps/meep-iot/server/api_reg_iot_plat.go b/go-apps/meep-iot/server/api_reg_iot_plat.go new file mode 100644 index 0000000000000000000000000000000000000000..22aa38777a73e740079626314b622068aa290aa0 --- /dev/null +++ b/go-apps/meep-iot/server/api_reg_iot_plat.go @@ -0,0 +1,38 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "net/http" +) + +func Mec011AppTerminationPOST(w http.ResponseWriter, r *http.Request) { + mec011AppTerminationPost(w, r) +} + +func RegisterediotplatformsByIdDELETE(w http.ResponseWriter, r *http.Request) { + registerediotplatformsByIdDELETE(w, r) +} + +func RegisterediotplatformsByIdGET(w http.ResponseWriter, r *http.Request) { + registerediotplatformsByIdGET(w, r) +} + +func RegisterediotplatformsByIdPUT(w http.ResponseWriter, r *http.Request) { + registerediotplatformsByIdPUT(w, r) +} + +func RegisterediotplatformsGET(w http.ResponseWriter, r *http.Request) { + registerediotplatformsGET(w, r) +} + +func RegisterediotplatformsPOST(w http.ResponseWriter, r *http.Request) { + registerediotplatformsPOST(w, r) +} diff --git a/go-apps/meep-iot/server/convert.go b/go-apps/meep-iot/server/convert.go new file mode 100644 index 0000000000000000000000000000000000000000..16f72cf6a5c56196760d6efc1fbbe59675f33e8e --- /dev/null +++ b/go-apps/meep-iot/server/convert.go @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package server + +import ( + "encoding/json" + //"fmt" + + log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" +) + +func convertProblemDetailstoJson(probdetails *ProblemDetails) string { + jsonInfo, err := json.Marshal(*probdetails) + if err != nil { + log.Error(err.Error()) + return "" + } + return string(jsonInfo) +} + +func convertIoTPlatformInfotoJson(ioTPlatformInfo *IotPlatformInfo) string { + jsonInfo, err := json.Marshal(*ioTPlatformInfo) + if err != nil { + log.Error(err.Error()) + return "" + } + return string(jsonInfo) +} diff --git a/go-apps/meep-iot/server/logger.go b/go-apps/meep-iot/server/logger.go new file mode 100644 index 0000000000000000000000000000000000000000..7d76d08153f8d5e407b1b8a22c7a549dbdb14d87 --- /dev/null +++ b/go-apps/meep-iot/server/logger.go @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * AdvantEDGE V2X Information Service REST API + * + * V2X Information Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC030 V2XI API](.https://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/03.02.01_60/)

[Copyright (c) ETSI 2024](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-iot](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-iot)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of VIS API endpoints (see below) and a subset of subscription types. + * + * API version: 3.2.2 + * Contact: AdvantEDGE@InterDigital.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "net/http" + "time" + + log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" +) + +func Logger(inner http.Handler, name string) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + start := time.Now() + + inner.ServeHTTP(w, r) + + log.Debug( + r.Method, " ", + r.RequestURI, " ", + name, " ", + time.Since(start), + ) + }) +} diff --git a/go-apps/meep-iot/server/meep-iot.go b/go-apps/meep-iot/server/meep-iot.go new file mode 100644 index 0000000000000000000000000000000000000000..d8c205c218d1789e8ef4743acbc8ef6ec3e643bd --- /dev/null +++ b/go-apps/meep-iot/server/meep-iot.go @@ -0,0 +1,1097 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package server + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "net/http" + "net/url" + "os" + "strconv" + "strings" + "time" + + sbi "github.com/InterDigitalInc/AdvantEDGE/go-apps/meep-iot/sbi" + asc "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-app-support-client" + dkm "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-key-mgr" + httpLog "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-http-logger" + log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" + redis "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-redis" + scc "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-sandbox-ctrl-client" + smc "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-service-mgmt-client" + "github.com/gorilla/mux" + //uuid "github.com/google/uuid" +) + +const moduleName = "meep-iot" +const iotBasePath = "iots/v1/" +const iotKey = "iot" + +const serviceName = "IOT Service" +const serviceCategory = "IOT" +const defaultMepName = "global" +const defaultScopeOfLocality = "MEC_SYSTEM" +const defaultConsumedLocalOnly = true +const appTerminationPath = "notifications/mec011/appTermination" + +var redisAddr string = "meep-redis-master.default.svc.cluster.local:6379" +var influxAddr string = "http://meep-influxdb.default.svc.cluster.local:8086" +var sbxCtrlUrl string = "http://meep-sandbox-ctrl" + +var currentStoreName = "" + +var IOT_DB = 0 + +var rc *redis.Connector +var hostUrl *url.URL +var instanceId string +var instanceName string +var sandboxName string +var mepName string = defaultMepName +var scopeOfLocality string = defaultScopeOfLocality +var consumedLocalOnly bool = defaultConsumedLocalOnly +var locality []string +var basePath string +var baseKey string + +const serviceAppVersion = "3.1.1" + +var serviceAppInstanceId string + +var appEnablementUrl string +var appEnablementEnabled bool +var sendAppTerminationWhenDone bool = false +var appTermSubId string +var appEnablementServiceId string +var appSupportClient *asc.APIClient +var svcMgmtClient *smc.APIClient +var sbxCtrlClient *scc.APIClient + +var registrationTicker *time.Ticker + +var registeredIotPlatformsMap = map[string]sbi.IotPlatformInfo{} // List of discovered IOT Plateform + +var validParams = []string{"deviceMetadata", "gpsi", "msisdn", "deviceId", "requestedMecTrafficRule", "requestedIotPlatformId", "requestedUserTransportId"} +var visitedFilter = map[string]bool{ // ETSI GS MEC 033 V3.1.1 (2022-12) Clause 7.3.3.1 GET + "deviceMetadata": false, + "gpsi": false, + "msisdn": false, + "deviceId": false, + "requestedMecTrafficRule": false, + "requestedIotPlatformId": false, + "requestedUserTransportId": false, +} +var visitedOp = map[string]bool{ // ETSI GS MEC 009 V3.3.1 (2024-02) Clause 6.19.2 Resource definition(s) and HTTP methods + "eq": false, + "neq": false, + "gt": false, + "lt": false, + "gte": false, + "lte": false, + "in": false, + "nin": false, + "cont": false, + "ncont": false, +} + +func getAppInstanceId() (id string, err error) { + var appInfo scc.ApplicationInfo + appInfo.Id = instanceId + appInfo.Name = serviceCategory + appInfo.Type_ = "SYSTEM" + appInfo.NodeName = mepName + if mepName == defaultMepName { + appInfo.Persist = true + } else { + appInfo.Persist = false + } + response, _, err := sbxCtrlClient.ApplicationsApi.ApplicationsPOST(context.TODO(), appInfo) + if err != nil { + log.Error("Failed to get App Instance ID with error: ", err) + return "", err + } + return response.Id, nil +} + +func deregisterService(appInstanceId string, serviceId string) error { + _, err := svcMgmtClient.MecServiceMgmtApi.AppServicesServiceIdDELETE(context.TODO(), appInstanceId, serviceId) + if err != nil { + log.Error("Failed to unregister the service to app enablement registry: ", err) + return err + } + return nil +} + +func registerService(appInstanceId string) error { + // Build Service Info + state := smc.ACTIVE_ServiceState + serializer := smc.JSON_SerializerType + transportType := smc.REST_HTTP_TransportType + localityType := smc.LocalityType(scopeOfLocality) + srvInfo := smc.ServiceInfo{ + SerName: instanceName, + Version: serviceAppVersion, + State: &state, + Serializer: &serializer, + ScopeOfLocality: &localityType, + ConsumedLocalOnly: consumedLocalOnly, + TransportInfo: &smc.TransportInfo{ + Id: "sandboxTransport", + Name: "REST", + Type_: &transportType, + Protocol: "HTTP", + Version: "2.0", + Endpoint: &smc.OneOfTransportInfoEndpoint{}, + }, + SerCategory: &smc.CategoryRef{ + Href: "catalogueHref", + Id: "iotId", + Name: serviceCategory, + Version: "v1", + }, + } + srvInfo.TransportInfo.Endpoint.Uris = append(srvInfo.TransportInfo.Endpoint.Uris, hostUrl.String()+basePath) + + appServicesPostResponse, _, err := svcMgmtClient.MecServiceMgmtApi.AppServicesPOST(context.TODO(), srvInfo, appInstanceId) + if err != nil { + log.Error("Failed to register the service to app enablement registry: ", err) + return err + } + log.Info("Application Enablement Service instance Id: ", appServicesPostResponse.SerInstanceId) + appEnablementServiceId = appServicesPostResponse.SerInstanceId + return nil +} + +func sendReadyConfirmation(appInstanceId string) error { + var appReady asc.AppReadyConfirmation + appReady.Indication = "READY" + _, err := appSupportClient.MecAppSupportApi.ApplicationsConfirmReadyPOST(context.TODO(), appReady, appInstanceId) + if err != nil { + log.Error("Failed to send a ready confirm acknowlegement: ", err) + return err + } + return nil +} + +func sendTerminationConfirmation(appInstanceId string) error { + var appTermination asc.AppTerminationConfirmation + operationAction := asc.TERMINATING_OperationActionType + appTermination.OperationAction = &operationAction + _, err := appSupportClient.MecAppSupportApi.ApplicationsConfirmTerminationPOST(context.TODO(), appTermination, appInstanceId) + if err != nil { + log.Error("Failed to send a confirm termination acknowlegement: ", err) + return err + } + return nil +} + +func subscribeAppTermination(appInstanceId string) error { + var sub asc.AppTerminationNotificationSubscription + sub.SubscriptionType = "AppTerminationNotificationSubscription" + sub.AppInstanceId = appInstanceId + if mepName == defaultMepName { + sub.CallbackReference = "http://" + moduleName + "/" + iotBasePath + appTerminationPath + } else { + sub.CallbackReference = "http://" + mepName + "-" + moduleName + "/" + iotBasePath + appTerminationPath + } + subscription, _, err := appSupportClient.MecAppSupportApi.ApplicationsSubscriptionsPOST(context.TODO(), sub, appInstanceId) + if err != nil { + log.Error("Failed to register to App Support subscription: ", err) + return err + } + appTermSubLink := subscription.Links.Self.Href + appTermSubId = appTermSubLink[strings.LastIndex(appTermSubLink, "/")+1:] + return nil +} + +func unsubscribeAppTermination(appInstanceId string, subId string) error { + //only subscribe to one subscription, so we force number to be one, couldn't be anything else + _, err := appSupportClient.MecAppSupportApi.ApplicationsSubscriptionDELETE(context.TODO(), appInstanceId, subId) + if err != nil { + log.Error("Failed to unregister to App Support subscription: ", err) + return err + } + return nil +} + +func mec011AppTerminationPost(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + + var notification AppTerminationNotification + decoder := json.NewDecoder(r.Body) + err := decoder.Decode(¬ification) + if err != nil { + log.Error(err.Error()) + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + if !appEnablementEnabled { + //just ignore the message + w.WriteHeader(http.StatusNoContent) + return + } + + go func() { + // Wait to allow app termination response to be sent + time.Sleep(20 * time.Millisecond) + + // Deregister service + _ = deregisterService(serviceAppInstanceId, appEnablementServiceId) + + // Delete subscriptions + _ = unsubscribeAppTermination(serviceAppInstanceId, appTermSubId) + + // Confirm App termination if necessary + if sendAppTerminationWhenDone { + _ = sendTerminationConfirmation(serviceAppInstanceId) + } + }() + + w.WriteHeader(http.StatusNoContent) +} + +// Init - IOT Service initialization +func Init() (err error) { + + // Retrieve Instance ID from environment variable if present + instanceIdEnv := strings.TrimSpace(os.Getenv("MEEP_INSTANCE_ID")) + if instanceIdEnv != "" { + instanceId = instanceIdEnv + } + log.Info("MEEP_INSTANCE_ID: ", instanceId) + + // Retrieve Instance Name from environment variable + instanceName = moduleName + instanceNameEnv := strings.TrimSpace(os.Getenv("MEEP_POD_NAME")) + if instanceNameEnv != "" { + instanceName = instanceNameEnv + } + log.Info("MEEP_POD_NAME: ", instanceName) + + // Retrieve Sandbox name from environment variable + sandboxNameEnv := strings.TrimSpace(os.Getenv("MEEP_SANDBOX_NAME")) + if sandboxNameEnv != "" { + sandboxName = sandboxNameEnv + } + if sandboxName == "" { + err = errors.New("MEEP_SANDBOX_NAME env variable not set") + log.Error(err.Error()) + return err + } + log.Info("MEEP_SANDBOX_NAME: ", sandboxName) + + // hostUrl is the url of the node serving the resourceURL + // Retrieve public url address where service is reachable, if not present, use Host URL environment variable + hostUrl, err = url.Parse(strings.TrimSpace(os.Getenv("MEEP_PUBLIC_URL"))) + if err != nil || hostUrl == nil || hostUrl.String() == "" { + hostUrl, err = url.Parse(strings.TrimSpace(os.Getenv("MEEP_HOST_URL"))) + if err != nil { + hostUrl = new(url.URL) + } + } + log.Info("MEEP_HOST_URL: ", hostUrl) + + // Get MEP name + mepNameEnv := strings.TrimSpace(os.Getenv("MEEP_MEP_NAME")) + if mepNameEnv != "" { + mepName = mepNameEnv + } + log.Info("MEEP_MEP_NAME: ", mepName) + + // Get App Enablement URL + appEnablementEnabled = false + appEnablementEnv := strings.TrimSpace(os.Getenv("MEEP_APP_ENABLEMENT")) + if appEnablementEnv != "" { + appEnablementUrl = "http://" + appEnablementEnv + appEnablementEnabled = true + } + log.Info("MEEP_APP_ENABLEMENT: ", appEnablementUrl) + + // Get scope of locality + scopeOfLocalityEnv := strings.TrimSpace(os.Getenv("MEEP_SCOPE_OF_LOCALITY")) + if scopeOfLocalityEnv != "" { + scopeOfLocality = scopeOfLocalityEnv + } + log.Info("MEEP_SCOPE_OF_LOCALITY: ", scopeOfLocality) + + // Get local consumption + consumedLocalOnlyEnv := strings.TrimSpace(os.Getenv("MEEP_CONSUMED_LOCAL_ONLY")) + if consumedLocalOnlyEnv != "" { + value, err := strconv.ParseBool(consumedLocalOnlyEnv) + if err == nil { + consumedLocalOnly = value + } + } + log.Info("MEEP_CONSUMED_LOCAL_ONLY: ", consumedLocalOnly) + + // Get locality + localityEnv := strings.TrimSpace(os.Getenv("MEEP_LOCALITY")) + if localityEnv != "" { + locality = strings.Split(localityEnv, ":") + } + log.Info("MEEP_LOCALITY: ", locality) + + // Set base path + if mepName == defaultMepName { + basePath = "/" + sandboxName + "/" + iotBasePath + } else { + basePath = "/" + sandboxName + "/" + mepName + "/" + iotBasePath + } + + // Set base storage key + baseKey = dkm.GetKeyRoot(sandboxName) + iotKey + ":mep:" + mepName + ":" + + // Connect to Redis DB (IOT_DB) + rc, err = redis.NewConnector(redisAddr, IOT_DB) + if err != nil { + log.Error("Failed connection to Redis DB (IOT_DB). Error: ", err) + return err + } + _ = rc.DBFlush(baseKey) + log.Info("Connected to Redis DB, IOT service table") + + // Initialize SBI + sbiCfg := sbi.SbiCfg{ + ModuleName: moduleName, + SandboxName: sandboxName, + RedisAddr: redisAddr, + Locality: locality, + ScenarioNameCb: updateStoreName, + CleanUpCb: cleanUp, + } + if mepName != defaultMepName { + sbiCfg.MepName = mepName + } + err = sbi.Init(sbiCfg) + if err != nil { + log.Error("Failed initialize SBI. Error: ", err) + return err + } + log.Info("SBI Initialized") + + // Create App Enablement REST clients + if appEnablementEnabled { + // Create Sandbox Controller client + sbxCtrlClientCfg := scc.NewConfiguration() + sbxCtrlClientCfg.BasePath = sbxCtrlUrl + "/sandbox-ctrl/v1" + sbxCtrlClient = scc.NewAPIClient(sbxCtrlClientCfg) + if sbxCtrlClient == nil { + return errors.New("Failed to create Sandbox Controller REST API client") + } + log.Info("Create Sandbox Controller REST API client") + + // Create App Support client + appSupportClientCfg := asc.NewConfiguration() + appSupportClientCfg.BasePath = appEnablementUrl + "/mec_app_support/v2" + appSupportClient = asc.NewAPIClient(appSupportClientCfg) + if appSupportClient == nil { + return errors.New("Failed to create App Enablement App Support REST API client") + } + log.Info("Create App Enablement App Support REST API client") + + // Create App Info client + srvMgmtClientCfg := smc.NewConfiguration() + srvMgmtClientCfg.BasePath = appEnablementUrl + "/mec_service_mgmt/v1" + svcMgmtClient = smc.NewAPIClient(srvMgmtClientCfg) + if svcMgmtClient == nil { + return errors.New("Failed to create App Enablement Service Management REST API client") + } + log.Info("Create App Enablement Service Management REST API client") + } + + log.Info("IOT successfully initialized") + return nil +} + +// Run - Start IOT +func Run() (err error) { + // Start MEC Service registration ticker + if appEnablementEnabled { + startRegistrationTicker() + } + return sbi.Run() +} + +// Stop - Stop IOT +func Stop() (err error) { + // Stop MEC Service registration ticker + if appEnablementEnabled { + stopRegistrationTicker() + } + return sbi.Stop() +} + +func startRegistrationTicker() { + // Make sure ticker is not running + if registrationTicker != nil { + log.Warn("Registration ticker already running") + return + } + + // Wait a few seconds to allow App Enablement Service to start. + // This is done to avoid the default 20 second TCP socket connect timeout + // if the App Enablement Service is not yet running. + log.Info("Waiting for App Enablement Service to start") + time.Sleep(5 * time.Second) + + // Start registration ticker + registrationTicker = time.NewTicker(5 * time.Second) + go func() { + mecAppReadySent := false + registrationSent := false + subscriptionSent := false + for range registrationTicker.C { + // Get Application instance ID + if serviceAppInstanceId == "" { + // If a sandbox service, request an app instance ID from Sandbox Controller + // Otherwise use the scenario-proiotioned instance ID + if mepName == defaultMepName { + var err error + serviceAppInstanceId, err = getAppInstanceId() + if err != nil || serviceAppInstanceId == "" { + continue + } + } else { + serviceAppInstanceId = instanceId + } + } + + // Send App Ready message + if !mecAppReadySent { + err := sendReadyConfirmation(serviceAppInstanceId) + if err != nil { + log.Error("Failure when sending the MecAppReady message. Error: ", err) + continue + } + mecAppReadySent = true + } + + // Register service instance + if !registrationSent { + err := registerService(serviceAppInstanceId) + if err != nil { + log.Error("Failed to register to appEnablement DB, keep trying. Error: ", err) + continue + } + registrationSent = true + } + + // Register for graceful termination + if !subscriptionSent { + err := subscribeAppTermination(serviceAppInstanceId) + if err != nil { + log.Error("Failed to subscribe to graceful termination. Error: ", err) + continue + } + sendAppTerminationWhenDone = true + subscriptionSent = true + } + + if mecAppReadySent && registrationSent && subscriptionSent { + + // Registration complete + log.Info("Successfully registered with App Enablement Service") + stopRegistrationTicker() + return + } + } + }() +} + +func stopRegistrationTicker() { + if registrationTicker != nil { + log.Info("Stopping App Enablement registration ticker") + registrationTicker.Stop() + registrationTicker = nil + } +} + +func cleanUp() { + log.Info("Terminate all") + + // Flush all service data + rc.DBFlush(baseKey) + + // Reset metrics store name + updateStoreName("") +} + +func updateStoreName(storeName string) { + log.Debug(">>> updateStoreName: ", storeName) + + if currentStoreName != storeName { + currentStoreName = storeName + + logComponent := moduleName + if mepName != defaultMepName { + logComponent = moduleName + "-" + mepName + } + err := httpLog.ReInit(logComponent, sandboxName, storeName, redisAddr, influxAddr) + if err != nil { + log.Error("Failed to initialise httpLog: ", err) + return + } + } +} + +/* + * errHandlerProblemDetails sends an error message + * @param {struct} HTTP write reference + * @param {string} error contains the error message + * @param {int} code contains the error code + */ +func errHandlerProblemDetails(w http.ResponseWriter, error string, code int) { + var pb ProblemDetails + pb.Detail = error + pb.Status = int32(code) + + jsonResponse := convertProblemDetailstoJson(&pb) + + w.WriteHeader(code) + fmt.Fprint(w, jsonResponse) +} + +func registerediotplatformsByIdDELETE(w http.ResponseWriter, r *http.Request) { + log.Debug(">>> registerediotplatformsByIdDELETE: ", r) + + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + + vars := mux.Vars(r) + log.Debug("registerediotplatformsByIdDELETE: vars: ", vars) + + iotPlatformIdParamStr := vars["registeredIotPlatformId"] + log.Debug("registerediotplatformsByIdDELETE: iotPlatformIdParamStr: ", iotPlatformIdParamStr) + + if _, ok := registeredIotPlatformsMap[iotPlatformIdParamStr]; !ok { + err := errors.New("Unknown iotPlatformId: " + iotPlatformIdParamStr) + errHandlerProblemDetails(w, err.Error(), http.StatusNotFound) + return + } + + err := sbi.DeregisterIotPlatformInfo(iotPlatformIdParamStr) + if err != nil { + log.Error("Failed to de-register IotPlatformInfo: ", err) + errHandlerProblemDetails(w, err.Error(), http.StatusBadRequest) + return + } + log.Info("De-registration succeed") + + delete(registeredIotPlatformsMap, iotPlatformIdParamStr) + + w.WriteHeader(http.StatusNoContent) +} + +func registerediotplatformsByIdGET(w http.ResponseWriter, r *http.Request) { + log.Debug(">>> registerediotplatformsByIdGET: ", r) + + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + + vars := mux.Vars(r) + log.Debug("registerediotplatformsByIdGET: vars: ", vars) + iotPlatformIdParamStr := vars["registeredIotPlatformId}"] + log.Debug("systeminfoByIdGET: registerediotplatformsByIdGET: ", iotPlatformIdParamStr) + + // Validate query parameters + u, _ := url.Parse(r.URL.String()) + q := u.Query() + err := validateQueryParams(q, validParams) + if err != nil { + errHandlerProblemDetails(w, err.Error(), http.StatusBadRequest) + return + } + + userTransportInfo := q["userTransportInfo"] + log.Debug("systeminfoByIdGET: userTransportInfo: ", userTransportInfo) + customServiceTransportInfo := q["customServiceTransportInfo"] + log.Debug("systeminfoByIdGET: customServiceTransportInfo: ", customServiceTransportInfo) + noFilter := len(userTransportInfo) == 0 && len(customServiceTransportInfo) == 0 + log.Debug("systeminfoByIdGET: noFilter: ", noFilter) + + val, ok := registeredIotPlatformsMap[iotPlatformIdParamStr] + if len(registeredIotPlatformsMap) == 0 || !ok { + w.WriteHeader(http.StatusNotFound) + } else { + var iotPlatformInfo IotPlatformInfo + if noFilter { + iotPlatformInfo = convertFromSbi(val) + } else { + // FIXME FSCOM To be done + http.Error(w, "Filtering not implemented yet", http.StatusNotImplemented) + return + } + jsonResponse, err := json.Marshal(iotPlatformInfo) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + fmt.Fprint(w, string(jsonResponse)) + w.WriteHeader(http.StatusOK) + } +} + +func registerediotplatformsByIdPUT(w http.ResponseWriter, r *http.Request) { + log.Debug(">>> registerediotplatformsByIdPUT: ", r) + + // FIXME FSCOM Todo + errHandlerProblemDetails(w, "Not implemented yet", http.StatusBadRequest) +} + +func registerediotplatformsGET(w http.ResponseWriter, r *http.Request) { + log.Debug(">>> registerediotplatformsGET: ", r) + + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + + // Validate query parameters + u, _ := url.Parse(r.URL.String()) + q := u.Query() + validParams := []string{"iotPlatformId", "enabled"} + err := validateQueryParams(q, validParams) + if err != nil { + errHandlerProblemDetails(w, err.Error(), http.StatusBadRequest) + return + } + + iotPlatformId := q.Get("iotPlatformId") + enabled := q.Get("enabled") + noFilter := iotPlatformId == "" && enabled == "" + log.Debug("registerediotplatformsGET: noFilter: ", noFilter) + + log.Debug("registerediotplatformsGET: len(registeredIotPlatformsMap): ", len(registeredIotPlatformsMap)) + if len(registeredIotPlatformsMap) == 0 { + w.WriteHeader(http.StatusNotFound) + } else { + l := []sbi.IotPlatformInfo{} + for _, val := range registeredIotPlatformsMap { + if noFilter { + l = append(l, val) + } else if iotPlatformId != "" && val.IotPlatformId == iotPlatformId || enabled != "" && strconv.FormatBool(val.Enabled) == enabled { + l = append(l, val) + } // else skip this item + } + log.Debug("registerediotplatformsGET: len(l): ", len(l)) + if len(l) == 0 { + w.WriteHeader(http.StatusNotFound) + return + } + var iotPlatformInfos = []IotPlatformInfo{} + for _, val := range l { + item := convertFromSbi(val) + iotPlatformInfos = append(iotPlatformInfos, item) + } + jsonResponse, err := json.Marshal(iotPlatformInfos) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + fmt.Fprint(w, string(jsonResponse)) + w.WriteHeader(http.StatusOK) + } +} + +func registerediotplatformsPOST(w http.ResponseWriter, r *http.Request) { + log.Debug(">>> registerediotplatformsPOST: ", r) + + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + var requestData IotPlatformInfo + decoder := json.NewDecoder(r.Body) + err := decoder.Decode(&requestData) + if err != nil { + log.Error(err.Error()) + errHandlerProblemDetails(w, err.Error(), http.StatusBadRequest) + return + } + log.Debug("registerediotplatformsPOST: requestData: ", requestData) + + // Validating mandatory parameters in request + if requestData.IotPlatformId == "" { + log.Error("Mandatory iotPlatformId parameter shall be absent") + errHandlerProblemDetails(w, "Mandatory attribute iotPlatformId shall be present in the request body.", http.StatusBadRequest) + return + } + + if len(requestData.UserTransportInfo) == 0 { + log.Error("Mandatory UserTransportInfo parameter not present") + errHandlerProblemDetails(w, "Mandatory attribute UserTransportInfo is missing in the request body.", http.StatusBadRequest) + return + } else { + for _, v := range requestData.UserTransportInfo { + if v.Id == "" { + log.Error("Mandatory Id parameter shall be absent") + errHandlerProblemDetails(w, "Mandatory attribute Id shall be absent in the request body.", http.StatusBadRequest) + return + } + if v.Name == "" { + log.Error("Mandatory Name parameter shall be absent") + errHandlerProblemDetails(w, "Mandatory attribute Name shall be absent in the request body.", http.StatusBadRequest) + return + } + if v.Type_ == nil || *v.Type_ != "MB_TOPIC_BASED" { + log.Error("Mandatory Type_ parameter shall be set to MB_TOPIC_BASED") + errHandlerProblemDetails(w, "Mandatory attribute Type_ shall be set to MB_TOPIC_BASED in the request body.", http.StatusBadRequest) + return + } + if v.Protocol != "MQTT" && v.Protocol != "AMQP" { + log.Error("Mandatory Protocol parameter shall be set to MQTT or AMQP") + errHandlerProblemDetails(w, "Mandatory attribute Protocol shall be set to MQTT or AMQP in the request body.", http.StatusBadRequest) + return + } + if v.Version == "" { + log.Error("Mandatory Version parameter shall be absent") + errHandlerProblemDetails(w, "Mandatory attribute Version shall be absent in the request body.", http.StatusBadRequest) + return + } + if v.Endpoint == nil { + log.Error("Mandatory Endpoint parameter shall be absent") + errHandlerProblemDetails(w, "Mandatory attribute Endpoint shall be absent in the request body.", http.StatusBadRequest) + return + } + if v.Security == nil { + log.Error("Mandatory Security parameter shall be absent") + errHandlerProblemDetails(w, "Mandatory attribute Security shall be absent in the request body.", http.StatusBadRequest) + return + } + if v.ImplSpecificInfo == nil { + log.Error("Mandatory ImplSpecificInfo parameter shall be absent") + errHandlerProblemDetails(w, "Mandatory attribute ImplSpecificInfo shall be absent in the request body.", http.StatusBadRequest) + return + } + } + } + + if requestData.CustomServicesTransportInfo == nil || len(requestData.CustomServicesTransportInfo) == 0 { + log.Error("No information to register IoT platform") + errHandlerProblemDetails(w, "No information to register IoT platform.", http.StatusInternalServerError) + return + } + + _, ok := registeredIotPlatformsMap[requestData.IotPlatformId] + if ok { + log.Error("IoT platform already created") + errHandlerProblemDetails(w, "IoT platform already created.", http.StatusBadRequest) + return + } + + // Populate registeredIotPlatformsMap + s := convertToSbi(requestData) + responseData, err := sbi.RegisterIotPlatformInfo(s) + if err != nil { + log.Error("Failed to register IotPlatformInfo: ", err) + errHandlerProblemDetails(w, err.Error(), http.StatusInternalServerError) + return + } + registeredIotPlatformsMap[responseData.IotPlatformId] = responseData + log.Debug("registerediotplatformsPOST: new registeredIotPlatformsMap: ", registeredIotPlatformsMap) + + // Prepare & send response + c := convertFromSbi(responseData) + jsonResponse := convertIoTPlatformInfotoJson(&c) + w.WriteHeader(http.StatusCreated) + fmt.Fprint(w, jsonResponse) +} + +func registereddevicesByIdDELETE(w http.ResponseWriter, r *http.Request) { + log.Debug(">>> registereddevicesByIdDELETE: ", r) + + errHandlerProblemDetails(w, "Not implemented yet", http.StatusBadRequest) +} + +func registereddevicesByIdGET(w http.ResponseWriter, r *http.Request) { + log.Debug(">>> registereddevicesByIdGET: ", r) + + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + + vars := mux.Vars(r) + log.Debug("registereddevicesByIdGET: vars: ", vars) + + registeredDeviceIdParamStr := vars["registeredDeviceId"] + log.Debug("registereddevicesByIdGET: registeredDeviceIdParamStr: ", registeredDeviceIdParamStr) + + _, err := sbi.GetDevice(registeredDeviceIdParamStr) + if err != nil { + errHandlerProblemDetails(w, err.Error(), http.StatusNotFound) + return + } + + // FIXME FSCOM To do + w.WriteHeader(http.StatusOK) +} + +func registereddevicesByIdPUT(w http.ResponseWriter, r *http.Request) { + log.Debug(">>> registereddevicesByIdPUT: ", r) + + errHandlerProblemDetails(w, "Not implemented yet", http.StatusBadRequest) +} + +func registereddevicesGET(w http.ResponseWriter, r *http.Request) { + log.Debug(">>> registereddevicesGET: ", r) + + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + + // Validate query parameters + u, _ := url.Parse(r.URL.String()) + q := u.Query() + log.Debug("registereddevicesGET: q=", q) + validParams := []string{"filter"} + err := validateQueryParams(q, validParams) + if err != nil { + errHandlerProblemDetails(w, err.Error(), http.StatusBadRequest) + return + } + err = validateFilter(q["filter"], validParams) + if err != nil { + errHandlerProblemDetails(w, err.Error(), http.StatusBadRequest) + return + } + + devicesList, err := sbi.GetDevices() + if err != nil { + errHandlerProblemDetails(w, err.Error(), http.StatusInternalServerError) + return + } + if len(devicesList) == 0 { + w.WriteHeader(http.StatusNotFound) + return + } + devices, err := applyFiltering(devicesList) + if err != nil { + errHandlerProblemDetails(w, err.Error(), http.StatusInternalServerError) + return + } + if len(devices) == 0 { + w.WriteHeader(http.StatusNotFound) + return + } + + w.WriteHeader(http.StatusOK) +} + +func applyFiltering(devicesList []sbi.DeviceInfo) (devices []DeviceInfo, err error) { + + return devices, nil +} + +func registereddevicesPOST(w http.ResponseWriter, r *http.Request) { + log.Debug(">>> registereddevicesPOST: ", r) + + errHandlerProblemDetails(w, "Not implemented yet", http.StatusBadRequest) +} + +func validateQueryParams(params url.Values, validParams []string) error { + for param := range params { + found := false + for _, validParam := range validParams { + if param == validParam { + found = true + break + } + } + if !found { + err := errors.New("Invalid query param: " + param) + log.Error(err.Error()) + return err + } + } + return nil +} + +func validateFilter(filter []string, validParams []string) error { + log.Debug(">>> validateFilter: ", filter) + + for _, val := range filter { + log.Debug("validateFilter: Processing ", val) + val := strings.Trim(val, "()") + f := strings.Split(val, ",") + if len(f) != 3 { + return errors.New("validateFilter: Invalid filter structure: " + val) + } + if _, ok := visitedOp[f[0]]; !ok { + return errors.New("validateFilter: Invalid filter operator value: " + f[0]) + } + if _, ok := visitedFilter[f[1]]; !ok { + return errors.New("validateFilter: Invalid filter field value: " + f[1]) + } + } // End of 'for' statement + + return nil +} + +func convertFromSbi(val sbi.IotPlatformInfo) (item IotPlatformInfo) { + item.IotPlatformId = val.IotPlatformId + item.Enabled = val.Enabled + + for _, userTransportInfo := range val.UserTransportInfo { + v := MbTransportInfo{ + Id: userTransportInfo.Id, + Name: userTransportInfo.Name, + Description: userTransportInfo.Description, + Protocol: userTransportInfo.Protocol, + Version: userTransportInfo.Version, + } + if userTransportInfo.Type_ != nil { + s := TransportType(*userTransportInfo.Type_) + v.Type_ = &s + } + if userTransportInfo.Endpoint != nil { + e := EndPointInfo{ + Uris: userTransportInfo.Endpoint.Uris, + Fqdn: userTransportInfo.Endpoint.Fqdn, + Alternative: userTransportInfo.Endpoint.Alternative, + } + if len(userTransportInfo.Endpoint.Addresses) != 0 { + for _, a := range userTransportInfo.Endpoint.Addresses { + e.Addresses = append(e.Addresses, Addresses{Host: a.Host, Port: a.Port}) + } + } + v.Endpoint = &e + } + if userTransportInfo.Security != nil { + e := SecurityInfo{} + if userTransportInfo.Security.OAuth2Info != nil { + e.OAuth2Info = &OAuth2Info{ + GrantTypes: userTransportInfo.Security.OAuth2Info.GrantTypes, + TokenEndpoint: userTransportInfo.Security.OAuth2Info.TokenEndpoint, + } + } + e.Extensions = userTransportInfo.Security.Extensions + } + if userTransportInfo.ImplSpecificInfo != nil { + v.ImplSpecificInfo = &ImplSpecificInfo{ + EventTopics: userTransportInfo.ImplSpecificInfo.EventTopics, + UplinkTopics: userTransportInfo.ImplSpecificInfo.UplinkTopics, + DownlinkTopics: userTransportInfo.ImplSpecificInfo.DownlinkTopics, + } + } + item.UserTransportInfo = append(item.UserTransportInfo, v) + } + if val.CustomServicesTransportInfo != nil && len(val.CustomServicesTransportInfo) != 0 { + item.CustomServicesTransportInfo = make([]TransportInfo, 0) + for _, customServicesTransportInfo := range val.CustomServicesTransportInfo { + v := TransportInfo{ + Id: customServicesTransportInfo.Id, + Name: customServicesTransportInfo.Name, + Description: customServicesTransportInfo.Description, + Protocol: customServicesTransportInfo.Protocol, + Version: customServicesTransportInfo.Version, + } + if customServicesTransportInfo.Type_ != nil { + s := TransportType(*customServicesTransportInfo.Type_) + v.Type_ = &s + } + if customServicesTransportInfo.Endpoint != nil { + e := EndPointInfo{ + Uris: customServicesTransportInfo.Endpoint.Uris, + Fqdn: customServicesTransportInfo.Endpoint.Fqdn, + Alternative: customServicesTransportInfo.Endpoint.Alternative, + } + if len(customServicesTransportInfo.Endpoint.Addresses) != 0 { + for _, a := range customServicesTransportInfo.Endpoint.Addresses { + e.Addresses = append(e.Addresses, Addresses{Host: a.Host, Port: a.Port}) + } + } + v.Endpoint = &e + } + item.CustomServicesTransportInfo = append(item.CustomServicesTransportInfo, v) + } + } + + return item +} + +func convertToSbi(val IotPlatformInfo) (item sbi.IotPlatformInfo) { + item.IotPlatformId = val.IotPlatformId + item.Enabled = val.Enabled + for _, userTransportInfo := range val.UserTransportInfo { + v := sbi.MbTransportInfo{ + Id: userTransportInfo.Id, + Name: userTransportInfo.Name, + Description: userTransportInfo.Description, + Protocol: userTransportInfo.Protocol, + Version: userTransportInfo.Version, + } + if userTransportInfo.Type_ != nil { + s := string(*userTransportInfo.Type_) + v.Type_ = &s + } + if userTransportInfo.Endpoint != nil { + e := sbi.EndPointInfo{ + Uris: userTransportInfo.Endpoint.Uris, + Fqdn: userTransportInfo.Endpoint.Fqdn, + Alternative: userTransportInfo.Endpoint.Alternative, + } + if len(userTransportInfo.Endpoint.Addresses) != 0 { + for _, a := range userTransportInfo.Endpoint.Addresses { + e.Addresses = append(e.Addresses, sbi.Addresses{Host: a.Host, Port: a.Port}) + } + } + v.Endpoint = &e + } + if userTransportInfo.Security != nil { + e := sbi.SecurityInfo{} + if userTransportInfo.Security.OAuth2Info != nil { + e.OAuth2Info = &sbi.OAuth2Info{ + GrantTypes: userTransportInfo.Security.OAuth2Info.GrantTypes, + TokenEndpoint: userTransportInfo.Security.OAuth2Info.TokenEndpoint, + } + } + e.Extensions = userTransportInfo.Security.Extensions + } + if userTransportInfo.ImplSpecificInfo != nil { + v.ImplSpecificInfo = &sbi.ImplSpecificInfo{ + EventTopics: userTransportInfo.ImplSpecificInfo.EventTopics, + UplinkTopics: userTransportInfo.ImplSpecificInfo.UplinkTopics, + DownlinkTopics: userTransportInfo.ImplSpecificInfo.DownlinkTopics, + } + } + item.UserTransportInfo = append(item.UserTransportInfo, v) + } + if val.CustomServicesTransportInfo != nil && len(val.CustomServicesTransportInfo) != 0 { + item.CustomServicesTransportInfo = make([]sbi.TransportInfo, 0) + for _, customServicesTransportInfo := range val.CustomServicesTransportInfo { + v := sbi.TransportInfo{ + Id: customServicesTransportInfo.Id, + Name: customServicesTransportInfo.Name, + Description: customServicesTransportInfo.Description, + Protocol: customServicesTransportInfo.Protocol, + Version: customServicesTransportInfo.Version, + } + if customServicesTransportInfo.Type_ != nil { + s := string(*customServicesTransportInfo.Type_) + v.Type_ = &s + } + if customServicesTransportInfo.Endpoint != nil { + e := sbi.EndPointInfo{ + Uris: customServicesTransportInfo.Endpoint.Uris, + Fqdn: customServicesTransportInfo.Endpoint.Fqdn, + Alternative: customServicesTransportInfo.Endpoint.Alternative, + } + if len(customServicesTransportInfo.Endpoint.Addresses) != 0 { + for _, a := range customServicesTransportInfo.Endpoint.Addresses { + e.Addresses = append(e.Addresses, sbi.Addresses{Host: a.Host, Port: a.Port}) + } + } + v.Endpoint = &e + } + item.CustomServicesTransportInfo = append(item.CustomServicesTransportInfo, v) + } + } + + return item +} diff --git a/go-apps/meep-iot/server/model_addresses.go b/go-apps/meep-iot/server/model_addresses.go new file mode 100644 index 0000000000000000000000000000000000000000..40cce24c0b770196a2fbd0d8744a69900e8f8de1 --- /dev/null +++ b/go-apps/meep-iot/server/model_addresses.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// Entry point information of the service as one or more pairs of IP address and port. See note. +type Addresses struct { + // Host portion of the address. + Host string `json:"host"` + // Port portion of the address. + Port int32 `json:"port"` +} diff --git a/go-apps/meep-iot/server/model_app_termination_notification.go b/go-apps/meep-iot/server/model_app_termination_notification.go new file mode 100644 index 0000000000000000000000000000000000000000..8b0cf34074f876472e77fca963873956d91d8fd4 --- /dev/null +++ b/go-apps/meep-iot/server/model_app_termination_notification.go @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2022 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * AdvantEDGE Radio Network Information API + * + * Radio Network Information Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC012 RNI API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/012/02.02.01_60/gs_MEC012v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-rnis](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-rnis)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of RNI API endpoints (see below) and a subset of subscription types.

Supported subscriptions:

- CellChangeSubscription

- RabEstSubscription

- RabRelSubscription

- MeasRepUeSubscription

- NrMeasRepUeSubscription + * + * API version: 2.2.1 + * Contact: AdvantEDGE@InterDigital.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// This type represents the information that the MEC platform notifies the subscribed application instance about the corresponding application instance termination/stop. +type AppTerminationNotification struct { + // Shall be set to AppTerminationNotification. + NotificationType string `json:"notificationType"` + + OperationAction *OperationActionType `json:"operationAction"` + // Maximum timeout value in seconds for graceful termination or graceful stop of an application instance. + MaxGracefulTimeout int32 `json:"maxGracefulTimeout"` + + Links *AppTerminationNotificationLinks `json:"_links"` +} diff --git a/go-apps/meep-iot/server/model_app_termination_notification__links.go b/go-apps/meep-iot/server/model_app_termination_notification__links.go new file mode 100644 index 0000000000000000000000000000000000000000..95a54b838e47320c1f04695d8f95ae6c92c18c36 --- /dev/null +++ b/go-apps/meep-iot/server/model_app_termination_notification__links.go @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2022 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * AdvantEDGE Radio Network Information API + * + * Radio Network Information Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC012 RNI API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/012/02.02.01_60/gs_MEC012v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-rnis](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-rnis)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of RNI API endpoints (see below) and a subset of subscription types.

Supported subscriptions:

- CellChangeSubscription

- RabEstSubscription

- RabRelSubscription

- MeasRepUeSubscription

- NrMeasRepUeSubscription + * + * API version: 2.2.1 + * Contact: AdvantEDGE@InterDigital.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// Object containing hyperlinks related to the resource. +type AppTerminationNotificationLinks struct { + Subscription *LinkType `json:"subscription"` + + ConfirmTermination *LinkType `json:"confirmTermination,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_device_info.go b/go-apps/meep-iot/server/model_device_info.go new file mode 100644 index 0000000000000000000000000000000000000000..2bbcaf4e0bd0540c6c0727a4d5669e6698551a19 --- /dev/null +++ b/go-apps/meep-iot/server/model_device_info.go @@ -0,0 +1,48 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// NOTE 1: At least one attribute among gpsi, pei, supi, msisdn, imei, imsi, and iccid should be provided. Sufficient security measures shall be put in place when any attribute among PEI, SUPI, IMEI, and IMSI is disclosed over the API. NOTE 2: Until a valid traffic rule is not provided, the device will not be able to use the IoTS. A valid traffic rule is provided by one of the following options: • the requestedMecTrafficRule attribute; • the requestedIotPlatformId attribute when the IoT platform offers only one user transport; • the combination of requestedIotPlatformId and requestedUserTransportId. NOTE 3: Enabled is a pseudo-attribute which needs to be maintained by the IoTS based on the presence or not of a valid traffic rule associated to the device. It cannot be set directly by the service consumer. +type DeviceInfo struct { + // Information needed for secondary authentication of the IoT device to the data network - see ETSI TS 129 561 [i.4] and ETSI TS 129 061 [i.5] for 5G and LTE procedures, respectively. This attribute is implementation dependent and should be logically linked to the identifiers of the IoT device listed hereafter. + DeviceAuthenticationInfo string `json:"deviceAuthenticationInfo"` + // Additional information about the IoT device. This attribute is implementation dependent and may be expressed as an array of keyvalue pairs. + DeviceMetadata []KeyValuePair `json:"deviceMetadata,omitempty"` + // GPSI of the IoT device if 5G-enabled (see note 1). + Gpsi string `json:"gpsi,omitempty"` + // PEI of the IoT device if 5G-enabled (see note 1). + Pei string `json:"pei,omitempty"` + // SUPI of the IoT device if 5G-enabled (see note 1). + Supi string `json:"supi,omitempty"` + // MSISDN of the IoT device if LTE-enabled (see note 1). + Msisdn string `json:"msisdn,omitempty"` + // IMEI of the IoT device if LTE-enabled (see note 1). + Imei string `json:"imei,omitempty"` + // IMSI of the IoT device if LTE-enabled (see note 1). + Imsi string `json:"imsi,omitempty"` + // ICCID of the IoT device (see note 1). + Iccid string `json:"iccid,omitempty"` + // Human-readable identifier of the IoT device. + DeviceId string `json:"deviceId"` + // MEC traffic rules the IoT device is requested to be associated to (see note 2). The data type definition is as per ETSI GS MEC 010-2 [i.6]. + RequestedMecTrafficRule []TrafficRuleDescriptor `json:"requestedMecTrafficRule,omitempty"` + // IoT platform to which the IoT device is requested to be associated to (see note 2). + RequestedIotPlatformId string `json:"requestedIotPlatformId,omitempty"` + // User transport to which the IoT device is requested to be associated to (see note 2). + RequestedUserTransportId string `json:"requestedUserTransportId,omitempty"` + + DeviceSpecificMessageFormats *DeviceSpecificMessageFormats `json:"deviceSpecificMessageFormats,omitempty"` + + DownlinkInfo *DownlinkInfo `json:"downlinkInfo,omitempty"` + // Client-side SSL/TLS certificate to be used by the MEC IoTS to interact with the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device. + ClientCertificate string `json:"clientCertificate,omitempty"` + // Indication whether the IoT device has a valid associated traffic rule (TRUE) or not (FALSE). See note 3. + Enabled bool `json:"enabled"` +} diff --git a/go-apps/meep-iot/server/model_device_specific_message_formats.go b/go-apps/meep-iot/server/model_device_specific_message_formats.go new file mode 100644 index 0000000000000000000000000000000000000000..62747bccebc3b86efc5dbb176ec4d7ace9218aad --- /dev/null +++ b/go-apps/meep-iot/server/model_device_specific_message_formats.go @@ -0,0 +1,17 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// Format of the messages to be published by the MEC IoTS on the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device. +type DeviceSpecificMessageFormats struct { + EventMsgFormat *EventMsg `json:"eventMsgFormat,omitempty"` + + UplinkMsgFormat *UplinkMsg `json:"uplinkMsgFormat,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_downlink_info.go b/go-apps/meep-iot/server/model_downlink_info.go new file mode 100644 index 0000000000000000000000000000000000000000..407efcd146932dd57858b1201f9fa8b44070dd9d --- /dev/null +++ b/go-apps/meep-iot/server/model_downlink_info.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// Downlink communication configuration of the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device. +type DownlinkInfo struct { + // Topic associated to the IoT device. This topic should be used by an end IoT application to send downlink data to the IoT device. + DownlinkTopic string `json:"downlinkTopic,omitempty"` + // UDP port to be used by the MEC IoTS for the outgoing downlink packets towards the IoT device. In case a default value is used, this attribute is optional. + DevicePort int32 `json:"devicePort,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_end_point_info.go b/go-apps/meep-iot/server/model_end_point_info.go new file mode 100644 index 0000000000000000000000000000000000000000..049aa5fb19c144893d31713230996922018d5377 --- /dev/null +++ b/go-apps/meep-iot/server/model_end_point_info.go @@ -0,0 +1,22 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// NOTE: Exactly one of \"uris\", \"fqdn\", \"addresses\" or \"alternative\" shall be present. +type EndPointInfo struct { + // Entry point information of the service as string, formatted according to URI syntax (see IETF RFC 3986 [8]). Shall be used for REST APIs. See note. + Uris []string `json:"uris,omitempty"` + // Fully Qualified Domain Name of the service. See note. + Fqdn []string `json:"fqdn,omitempty"` + + Addresses []Addresses `json:"addresses,omitempty"` + // Entry point information of the service in a format defined by an implementation, or in an external specification. See note. + Alternative string `json:"alternative,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_event_msg.go b/go-apps/meep-iot/server/model_event_msg.go new file mode 100644 index 0000000000000000000000000000000000000000..b7694d6de8bfe2d5821d72eb7e74de27af5970fe --- /dev/null +++ b/go-apps/meep-iot/server/model_event_msg.go @@ -0,0 +1,33 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type EventMsg struct { + // Topic where the message containing application-specific information should be published. + EventTopic string `json:"eventTopic"` + + SelectedSerializer *SerializerType `json:"selectedSerializer"` + // Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE). + IncludeDeviceAddr bool `json:"includeDeviceAddr,omitempty"` + // Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE). + IncludeDeviceMetadata bool `json:"includeDeviceMetadata,omitempty"` + // Indication whether to include the PEI of the IoT device (TRUE) or not (FALSE). + IncludePei bool `json:"includePei,omitempty"` + // Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE). + IncludeSupi bool `json:"includeSupi,omitempty"` + // Indication whether to include the IMEI of the IoT device (TRUE) or not (FALSE). + IncludeImei bool `json:"includeImei,omitempty"` + // Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE). + IncludeImsi bool `json:"includeImsi,omitempty"` + // Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE). + IncludeIccid bool `json:"includeIccid,omitempty"` + // Indication whether to include the human-readable identified of the IoT device (TRUE) or not (FALSE). + IncludeDeviceId bool `json:"includeDeviceId,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_impl_specific_info.go b/go-apps/meep-iot/server/model_impl_specific_info.go new file mode 100644 index 0000000000000000000000000000000000000000..7fb40d7488bb7a65d19fb67db12978e2b75d744a --- /dev/null +++ b/go-apps/meep-iot/server/model_impl_specific_info.go @@ -0,0 +1,20 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// Additional implementation specific details of the transport. +type ImplSpecificInfo struct { + // Topics used to publish events related to the established session between the IoT device(s) and the end IoT application(s) on the user transport. + EventTopics []string `json:"eventTopics,omitempty"` + // Topics used to publish data generated by the IoT device(s) on the user transport, in order to be consumed by the end IoT application(s). + UplinkTopics []string `json:"uplinkTopics,omitempty"` + // Topics used to publish data generated by the IoT applications(s) on the user transport, in order to be consumed by the end IoT device(s). + DownlinkTopics []string `json:"downlinkTopics,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_inline_response_200.go b/go-apps/meep-iot/server/model_inline_response_200.go new file mode 100644 index 0000000000000000000000000000000000000000..dfe0b48cd75ad41a6b8829580740a6f3ac804b09 --- /dev/null +++ b/go-apps/meep-iot/server/model_inline_response_200.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type InlineResponse200 struct { + Items *DeviceInfo `json:"items,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_inline_response_200_1.go b/go-apps/meep-iot/server/model_inline_response_200_1.go new file mode 100644 index 0000000000000000000000000000000000000000..629c9e4bab45d0dc57cd6dca6bb850369f64d582 --- /dev/null +++ b/go-apps/meep-iot/server/model_inline_response_200_1.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type InlineResponse2001 struct { + IotPlatformInfo *IotPlatformInfo `json:"IotPlatformInfo,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_interface_descriptor.go b/go-apps/meep-iot/server/model_interface_descriptor.go new file mode 100644 index 0000000000000000000000000000000000000000..8dec0babf6b9c5f25723dec7f114a25bc5364466 --- /dev/null +++ b/go-apps/meep-iot/server/model_interface_descriptor.go @@ -0,0 +1,23 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type InterfaceDescriptor struct { + // Type of interface: TUNNEL, MAC, IP, etc. + InterfaceType string `json:"interfaceType"` + + TunnelInfo *TunnelInfo `json:"tunnelInfo,omitempty"` + // If the interface type is MAC, the source address identifies the MAC address of the interface. + SrcMACAddress string `json:"srcMACAddress,omitempty"` + // If the interface type is MAC, the destination address identifies the MAC address of the destination. Only used for dstInterface. + DstMACAddress string `json:"dstMACAddress,omitempty"` + // If the interface type is IP, the destination address identifies the IP address of the destination. Only used for dstInterface. + DstIPAddress string `json:"dstIPAddress,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_iot_platform_info.go b/go-apps/meep-iot/server/model_iot_platform_info.go new file mode 100644 index 0000000000000000000000000000000000000000..3a4fe7b91c9cb773683d9b624ad137807be1aec3 --- /dev/null +++ b/go-apps/meep-iot/server/model_iot_platform_info.go @@ -0,0 +1,21 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type IotPlatformInfo struct { + // Identifier of the IoT platform. + IotPlatformId string `json:"iotPlatformId"` + // Information about the user transport(s) provided by the IoT platform. + UserTransportInfo []MbTransportInfo `json:"userTransportInfo"` + // Transport enabling access to vendor-specific services provided by the IoT platform. The data type definition is as per ETSI GS MEC 011 [i.2]. + CustomServicesTransportInfo []TransportInfo `json:"customServicesTransportInfo,omitempty"` + // Indication whether the IoT platform is capable of providing user transports and vendor-specific services (TRUE) or not (FALSE). + Enabled bool `json:"enabled"` +} diff --git a/go-apps/meep-iot/server/model_key_value_pair.go b/go-apps/meep-iot/server/model_key_value_pair.go new file mode 100644 index 0000000000000000000000000000000000000000..2fb36fd444c935b72841eae9fbb26ea612b59bdb --- /dev/null +++ b/go-apps/meep-iot/server/model_key_value_pair.go @@ -0,0 +1,17 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// Key-value pairs for device metadata +type KeyValuePair struct { + Key string `json:"key,omitempty"` + + Value string `json:"value,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_link_type.go b/go-apps/meep-iot/server/model_link_type.go new file mode 100644 index 0000000000000000000000000000000000000000..0dd2f7366fa714d18ac7fbce3411f078708b78ab --- /dev/null +++ b/go-apps/meep-iot/server/model_link_type.go @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2022 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * AdvantEDGE Radio Network Information API + * + * Radio Network Information Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC012 RNI API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/012/02.02.01_60/gs_MEC012v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-rnis](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-rnis)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of RNI API endpoints (see below) and a subset of subscription types.

Supported subscriptions:

- CellChangeSubscription

- RabEstSubscription

- RabRelSubscription

- MeasRepUeSubscription

- NrMeasRepUeSubscription + * + * API version: 2.2.1 + * Contact: AdvantEDGE@InterDigital.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type LinkType struct { + // URI referring to a resource + Href string `json:"href"` +} diff --git a/go-apps/meep-iot/server/model_mb_transport_info.go b/go-apps/meep-iot/server/model_mb_transport_info.go new file mode 100644 index 0000000000000000000000000000000000000000..a879d064483c5104b55a00c4adb0e81743fb6f34 --- /dev/null +++ b/go-apps/meep-iot/server/model_mb_transport_info.go @@ -0,0 +1,31 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type MbTransportInfo struct { + // The identifier of this transport as per ETSI GS MEC 011 [i.2]. + Id string `json:"id"` + // The name of this transport as per ETSI GS MEC 011 [i.2]. + Name string `json:"name"` + // Human-readable description of this transport as per ETSI GS MEC 011 [i.2]. + Description string `json:"description,omitempty"` + + Type_ *TransportType `json:"type"` + // The name of the protocol used. Being the transport of MB_TOPIC_BASED type, this attribute should be typically set to \"MQTT\" or \"AMQP.\" + Protocol string `json:"protocol"` + // The version of the protocol used as per ETSI GS MEC 011 [i.2]. + Version string `json:"version"` + + Endpoint *EndPointInfo `json:"endpoint"` + + Security *SecurityInfo `json:"security"` + + ImplSpecificInfo *ImplSpecificInfo `json:"implSpecificInfo"` +} diff --git a/go-apps/meep-iot/server/model_o_auth2_info.go b/go-apps/meep-iot/server/model_o_auth2_info.go new file mode 100644 index 0000000000000000000000000000000000000000..d91f1dcb3b9d3bc42f76e796121d0f794a2870fb --- /dev/null +++ b/go-apps/meep-iot/server/model_o_auth2_info.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// Parameters related to use of OAuth 2.0. Shall be present in case OAuth 2.0 (see IETF RFC 6749 [13]) is supported to secure the provision of the service over the transport. +type OAuth2Info struct { + // List of supported OAuth 2.0 grant types. Each entry shall be one of the following permitted values: - OAUTH2_AUTHORIZATION_CODE: Authorization code grant type - OAUTH2_IMPLICIT_GRANT: Implicit grant type - OAUTH2_RESOURCE_OWNER: Resource owner password credentials grant type - OAUTH2_CLIENT_CREDENTIALS: Client credentials grant type Only the value \"OAUTH2_CLIENT_CREDENTIALS\" is supported in the present document. + GrantTypes []string `json:"grantTypes"` + // The token endpoint. Shall be present unless the grant type is OAUTH2_IMPLICIT_GRANT. + TokenEndpoint string `json:"tokenEndpoint,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_operation_action_type.go b/go-apps/meep-iot/server/model_operation_action_type.go new file mode 100644 index 0000000000000000000000000000000000000000..2388a81964975a66806c8dfe0c318d82a7b5415a --- /dev/null +++ b/go-apps/meep-iot/server/model_operation_action_type.go @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2022 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * AdvantEDGE Radio Network Information API + * + * Radio Network Information Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC012 RNI API](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/012/02.02.01_60/gs_MEC012v020201p.pdf)

[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-rnis](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-rnis)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of RNI API endpoints (see below) and a subset of subscription types.

Supported subscriptions:

- CellChangeSubscription

- RabEstSubscription

- RabRelSubscription

- MeasRepUeSubscription

- NrMeasRepUeSubscription + * + * API version: 2.2.1 + * Contact: AdvantEDGE@InterDigital.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// OperationActionType : Operation that is being performed on the MEC application instance. +type OperationActionType string + +// List of OperationActionType +const ( + STOPPING_OperationActionType OperationActionType = "STOPPING" + TERMINATING_OperationActionType OperationActionType = "TERMINATING" +) diff --git a/go-apps/meep-iot/server/model_problem_details.go b/go-apps/meep-iot/server/model_problem_details.go new file mode 100644 index 0000000000000000000000000000000000000000..5d82796edd46af38b371fcb7645de7c1ddd6613d --- /dev/null +++ b/go-apps/meep-iot/server/model_problem_details.go @@ -0,0 +1,23 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type ProblemDetails struct { + // A URI reference according to IETF RFC 3986 that identifies the problem type + Type_ string `json:"type,omitempty"` + // A short, human-readable summary of the problem type + Title string `json:"title,omitempty"` + // The HTTP status code for this occurrence of the problem + Status int32 `json:"status,omitempty"` + // A human-readable explanation specific to this occurrence of the problem + Detail string `json:"detail,omitempty"` + // A URI reference that identifies the specific occurrence of the problem + Instance string `json:"instance,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_registered_devices_body.go b/go-apps/meep-iot/server/model_registered_devices_body.go new file mode 100644 index 0000000000000000000000000000000000000000..daa0d9857ead90b2d6703d535bb9d575074804a2 --- /dev/null +++ b/go-apps/meep-iot/server/model_registered_devices_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type RegisteredDevicesBody struct { + DeviceInfo *DeviceInfo `json:"DeviceInfo,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_registered_devices_registered_device_id_body.go b/go-apps/meep-iot/server/model_registered_devices_registered_device_id_body.go new file mode 100644 index 0000000000000000000000000000000000000000..e805b3492271f2f937999eb37c3b5f5c6b4a09fb --- /dev/null +++ b/go-apps/meep-iot/server/model_registered_devices_registered_device_id_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type RegisteredDevicesRegisteredDeviceIdBody struct { + DeviceInfo *DeviceInfo `json:"DeviceInfo,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_registered_iot_platforms_body.go b/go-apps/meep-iot/server/model_registered_iot_platforms_body.go new file mode 100644 index 0000000000000000000000000000000000000000..c2c5771ace6bfa8370464c1a15054a05fb586139 --- /dev/null +++ b/go-apps/meep-iot/server/model_registered_iot_platforms_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type RegisteredIotPlatformsBody struct { + IoTPlatformInfo *IotPlatformInfo `json:"IoTPlatformInfo,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_registered_iot_platforms_registered_iot_platform_id_body.go b/go-apps/meep-iot/server/model_registered_iot_platforms_registered_iot_platform_id_body.go new file mode 100644 index 0000000000000000000000000000000000000000..2e090150ece3f2220bfbfce9013420652dd23aaf --- /dev/null +++ b/go-apps/meep-iot/server/model_registered_iot_platforms_registered_iot_platform_id_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type RegisteredIotPlatformsRegisteredIotPlatformIdBody struct { + IotPlatformInfo *IotPlatformInfo `json:"IotPlatformInfo,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_security_info.go b/go-apps/meep-iot/server/model_security_info.go new file mode 100644 index 0000000000000000000000000000000000000000..4ebc3b1753cc16002321cc8da92e7dcf1a51843e --- /dev/null +++ b/go-apps/meep-iot/server/model_security_info.go @@ -0,0 +1,16 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SecurityInfo struct { + OAuth2Info *OAuth2Info `json:"oAuth2Info,omitempty"` + // Extensions for alternative transport mechanisms. These extensions depend on the actual transport and are out of scope of the present document. For instance, such extensions may be used to signal the necessary parameters for the client to use TLS-based authorization defined for alternative transports (see ETSI GS MEC 009 [5] for more information). + Extensions string `json:"extensions,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_serializer_type.go b/go-apps/meep-iot/server/model_serializer_type.go new file mode 100644 index 0000000000000000000000000000000000000000..d83c0672c6e4c6abec3dd9d94d49c953e7d526b9 --- /dev/null +++ b/go-apps/meep-iot/server/model_serializer_type.go @@ -0,0 +1,20 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// SerializerType : The enumeration SerializerType represents types of serializers. +type SerializerType string + +// List of SerializerType +const ( + JSON SerializerType = "JSON" + XML SerializerType = "XML" + PROTOBUF3 SerializerType = "PROTOBUF3" +) diff --git a/go-apps/meep-iot/server/model_traffic_filter.go b/go-apps/meep-iot/server/model_traffic_filter.go new file mode 100644 index 0000000000000000000000000000000000000000..c7f171dacd8c7ff02719353f7d8be7c27528177a --- /dev/null +++ b/go-apps/meep-iot/server/model_traffic_filter.go @@ -0,0 +1,43 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type TrafficFilter struct { + // An IP address or a range of IP addresses. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes. + SrcAddress []string `json:"srcAddress,omitempty"` + // An IP address or a range of IP addresses. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes. + DstAddress []string `json:"dstAddress,omitempty"` + // A port or a range of ports. + SrcPort []string `json:"srcPort,omitempty"` + // A port or a range of ports. + DstPort []string `json:"dstPort,omitempty"` + // Specify the protocol of the traffic filter. + Protocol []string `json:"protocol,omitempty"` + // Used for tag based traffic rule. + Tag []string `json:"tag,omitempty"` + // An URI label, in application layer, i.e. in HTTP message, is used to filter the traffic. + Uri []string `json:"uri,omitempty"` + // A customized packet label in network layer, as defined by the owner of the MEC platform, is used to filter the traffic. + PacketLabel []string `json:"packetLabel,omitempty"` + // Used for GTP tunnel based traffic rule. + SrcTunnelAddress []string `json:"srcTunnelAddress,omitempty"` + // Used for GTP tunnel based traffic rule. + TgtTunnelAddress []string `json:"tgtTunnelAddress,omitempty"` + // Used for GTP tunnel based traffic rule. + SrcTunnelPort []string `json:"srcTunnelPort,omitempty"` + // Used for GTP tunnel based traffic rule. + DstTunnelPort []string `json:"dstTunnelPort,omitempty"` + // Used to match all packets that have the same QCI. + QCI int32 `json:"qCI,omitempty"` + // Used to match all IPv4 packets that have the same DSCP. + DSCP int32 `json:"dSCP,omitempty"` + // Used to match all IPv6 packets that have the same TC. + TC int32 `json:"tC,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_traffic_rule_descriptor.go b/go-apps/meep-iot/server/model_traffic_rule_descriptor.go new file mode 100644 index 0000000000000000000000000000000000000000..2865ef57f38636300f9e7c6b790faa8317c79d1f --- /dev/null +++ b/go-apps/meep-iot/server/model_traffic_rule_descriptor.go @@ -0,0 +1,26 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// NOTE 1: Value indicates the priority in descending order, i.e. with 0 as the highest priority and 255 as the lowest priority. NOTE 2: Some applications (like inline/tap) require two interfaces. The first interface in the case of inline/tap is on the client (e.g. UE) side and the second on the core network (e.g. EPC) side. +type TrafficRuleDescriptor struct { + // Identifies the traffic rule. + TrafficRuleId string `json:"trafficRuleId"` + // Definition of filter type: per FLOW or PACKET If it is per FLOW, the filter matches upstream (e.g. UE->EPC) packets and downstream (e.g. EPC->UE) packets are handled by the same context. + FilterType string `json:"filterType"` + // Priority of this traffic rule within the range 0 to 255. If traffic rule conflicts, the one with higher priority take precedence. See note 1. + Priority int32 `json:"priority"` + // The filter used to identify specific flow/packets that need to be handled by the MEC host. + TrafficFilter []TrafficFilter `json:"trafficFilter"` + // Identifies the action of the MEC host data plane, when a packet matches the trafficFilter, the example actions include: DROP, FORWARD_DECAPSULATED, FORWARD_ENCAPSULATED, PASSTHROUGH, DUPLICATE_DECAPSULATED, DUPLICATE_ENCAPSULATED + Action string `json:"action"` + + DstInterface *InterfaceDescriptor `json:"dstInterface,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_transport_info.go b/go-apps/meep-iot/server/model_transport_info.go new file mode 100644 index 0000000000000000000000000000000000000000..681e22609fe998dc4da25132ab93623fa91c1f96 --- /dev/null +++ b/go-apps/meep-iot/server/model_transport_info.go @@ -0,0 +1,31 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type TransportInfo struct { + // The identifier of this transport. + Id string `json:"id"` + // The name of this transport. + Name string `json:"name"` + // Human-readable description of this transport. + Description string `json:"description,omitempty"` + + Type_ *TransportType `json:"type"` + // The name of the protocol used. Shall be set to \"HTTP\" for a REST API. + Protocol string `json:"protocol"` + // The version of the protocol used. + Version string `json:"version"` + + Endpoint *EndPointInfo `json:"endpoint"` + + Security *SecurityInfo `json:"security"` + // Additional implementation specific details of the transport. + ImplSpecificInfo string `json:"implSpecificInfo,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_transport_type.go b/go-apps/meep-iot/server/model_transport_type.go new file mode 100644 index 0000000000000000000000000000000000000000..6b9ec89f6f8b69b36b69a3527f6742908db43bc9 --- /dev/null +++ b/go-apps/meep-iot/server/model_transport_type.go @@ -0,0 +1,24 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// TransportType : Enumeration representing types of transports. +type TransportType string + +// List of TransportType +const ( + REST_HTTP TransportType = "REST_HTTP" + MB_TOPIC_BASED TransportType = "MB_TOPIC_BASED" + MB_ROUTING TransportType = "MB_ROUTING" + MB_PUBSUB TransportType = "MB_PUBSUB" + RPC TransportType = "RPC" + RPC_STREAMING TransportType = "RPC_STREAMING" + WEBSOCKET TransportType = "WEBSOCKET" +) diff --git a/go-apps/meep-iot/server/model_tunnel_info.go b/go-apps/meep-iot/server/model_tunnel_info.go new file mode 100644 index 0000000000000000000000000000000000000000..3fda6d8c19e6715197a3692e3692acac23c7a9b7 --- /dev/null +++ b/go-apps/meep-iot/server/model_tunnel_info.go @@ -0,0 +1,21 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type TunnelInfo struct { + // Type of tunnel: GTP-U, GRE, etc. + TunnelType string `json:"tunnelType"` + // Destination address of the tunnel. + TunnelDstAddress string `json:"tunnelDstAddress"` + // Source address of the tunnel. + TunnelSrcAddress string `json:"tunnelSrcAddress"` + // Parameters specific to the tunnel. + TunnelSpecificData string `json:"tunnelSpecificData,omitempty"` +} diff --git a/go-apps/meep-iot/server/model_uplink_msg.go b/go-apps/meep-iot/server/model_uplink_msg.go new file mode 100644 index 0000000000000000000000000000000000000000..bbe02980f25fc457d682c45eaad97577f98142c9 --- /dev/null +++ b/go-apps/meep-iot/server/model_uplink_msg.go @@ -0,0 +1,35 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type UplinkMsg struct { + // Topic where the message containing the data generated by the IoT device(s) should be published, in order to be consumed by the end IoT application(s). + UplinkTopic string `json:"uplinkTopic"` + + SelectedSerializer *SerializerType `json:"selectedSerializer"` + // Indication whether to include the UDP port of the remote IoT device (TRUE) or not (FALSE). + IncludeDevicePort bool `json:"includeDevicePort,omitempty"` + // Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE). + IncludeDeviceAddr bool `json:"includeDeviceAddr,omitempty"` + // Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE). + IncludeDeviceMetadata bool `json:"includeDeviceMetadata,omitempty"` + // Indication whether to include the PEI of the IoT device (TRUE) or not (FALSE). + IncludePei bool `json:"includePei,omitempty"` + // Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE). + IncludeSupi bool `json:"includeSupi,omitempty"` + // Indication whether to include the IMEI of the IoT device (TRUE) or not (FALSE). + IncludeImei bool `json:"includeImei,omitempty"` + // Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE). + IncludeImsi bool `json:"includeImsi,omitempty"` + // Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE). + IncludeIccid bool `json:"includeIccid,omitempty"` + // Indication whether to include the human-readable identified of the IoT device (TRUE) or not (FALSE). + IncludeDeviceId bool `json:"includeDeviceId,omitempty"` +} diff --git a/go-apps/meep-iot/server/routers.go b/go-apps/meep-iot/server/routers.go new file mode 100644 index 0000000000000000000000000000000000000000..ffbd1480cabb910bf7a99c201a77a292be05006c --- /dev/null +++ b/go-apps/meep-iot/server/routers.go @@ -0,0 +1,166 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "fmt" + "net/http" + "strings" + + httpLog "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-http-logger" + met "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-metrics" + + "github.com/gorilla/mux" +) + +type HttpRoute struct { + Name string + Method string + Pattern string + HandlerFunc http.HandlerFunc +} + +type HttpRoutes []HttpRoute + +func NewRouter() *mux.Router { + var handler http.Handler + router := mux.NewRouter().StrictSlash(true) + for _, route := range routes { + handler = route.HandlerFunc + handler = Logger(handler, route.Name) + handler = met.MetricsHandler(handler, sandboxName, serviceName) + handler = httpLog.LogRx(handler) + router. + Methods(route.Method). + Path(route.Pattern). + Name(route.Name). + Handler(handler) + } + + // Path prefix router order is important + // Service Api files + handler = http.StripPrefix("/iots/v1/api/", http.FileServer(http.Dir("./api/"))) + router. + PathPrefix("/iots/v1/api/"). + Name("Api"). + Handler(handler) + // User supplied service API files + handler = http.StripPrefix("/iots/v1/user-api/", http.FileServer(http.Dir("./user-api/"))) + router. + PathPrefix("/iots/v1/user-api/"). + Name("UserApi"). + Handler(handler) + + return router +} + +func Index(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Hello World from MEC 033!") +} + +var routes = HttpRoutes{ + HttpRoute{ + "Index", + "GET", + "/iots/v1/", + Index, + }, + + HttpRoute{ + "RegistereddevicesByIdDELETE", + strings.ToUpper("Delete"), + "/iots/v1/registered_devices/{registeredDeviceId}", + RegistereddevicesByIdDELETE, + }, + + HttpRoute{ + "RegistereddevicesByIdGET", + strings.ToUpper("Get"), + "/iots/v1/registered_devices/{registeredDeviceId}", + RegistereddevicesByIdGET, + }, + + HttpRoute{ + "RegistereddevicesByIdPUT", + strings.ToUpper("Put"), + "/iots/v1/registered_devices/{registeredDeviceId}", + RegistereddevicesByIdPUT, + }, + + HttpRoute{ + "RegistereddevicesGET", + strings.ToUpper("Get"), + "/iots/v1/registered_devices", + RegistereddevicesGET, + }, + + HttpRoute{ + "RegistereddevicesPOST", + strings.ToUpper("Post"), + "/iots/v1/registered_devices", + RegistereddevicesPOST, + }, + + HttpRoute{ + "RegisterediotplatformsByIdDELETE", + strings.ToUpper("Delete"), + "/iots/v1/registered_iot_platforms/{registeredIotPlatformId}", + RegisterediotplatformsByIdDELETE, + }, + + HttpRoute{ + "RegisterediotplatformsByIdGET", + strings.ToUpper("Get"), + "/iots/v1/registered_iot_platforms/{registeredIotPlatformId}", + RegisterediotplatformsByIdGET, + }, + + HttpRoute{ + "RegisterediotplatformsByIdPUT", + strings.ToUpper("Put"), + "/iots/v1/registered_iot_platforms/{registeredIotPlatformId}", + RegisterediotplatformsByIdPUT, + }, + + HttpRoute{ + "RegisterediotplatformsGET", + strings.ToUpper("Get"), + "/iots/v1/registered_iot_platforms", + RegisterediotplatformsGET, + }, + + HttpRoute{ + "RegisterediotplatformsPOST", + strings.ToUpper("Post"), + "/iots/v1/registered_iot_platforms", + RegisterediotplatformsPOST, + }, + + HttpRoute{ + "Mec011AppTerminationPOST", + strings.ToUpper("Post"), + "/iots/v1/notifications/mec011/appTermination", + Mec011AppTerminationPOST, + }, +} diff --git a/go-apps/meep-sandbox-api/server/sandbox_api.go b/go-apps/meep-sandbox-api/server/sandbox_api.go index 0ef826953855dc283a753e3e5485d925ede952ca..1c609eb4d4f03dad2ee2e531e47b502fd7abbdf9 100644 --- a/go-apps/meep-sandbox-api/server/sandbox_api.go +++ b/go-apps/meep-sandbox-api/server/sandbox_api.go @@ -552,6 +552,20 @@ func login(w http.ResponseWriter, r *http.Request) { return } + // Connect to GIS engine + gisClientCfg := gis.NewConfiguration() + gisClientCfg.BasePath = sandboxApiConnectors.uri.String() + "/" + sandboxName + "/gis/v1" + log.Info("gisClientCfg.BasePath: ", gisClientCfg.BasePath) + gisClientCfg.HTTPClient = &http.Client{Transport: tr} + log.Info("gisClientCfg.HTTPClient: ", gisClientCfg.HTTPClient) + sandboxApiConnectors.gisClient[sandboxName] = gis.NewAPIClient(gisClientCfg) + if sandboxApiConnectors.gisClient[sandboxName] == nil { + log.Error("Failed to create Sandbox GIS REST API client") + _ = processLogout(sandboxName, w, r) + w.WriteHeader(http.StatusInternalServerError) + return + } + metricSessionSuccess.Inc() if isNew { metricSessionActive.Inc() diff --git a/go-apps/meep-sss/.swagger-codegen-ignore b/go-apps/meep-sss/.swagger-codegen-ignore new file mode 100644 index 0000000000000000000000000000000000000000..c5fa491b4c557bf997d5dd21797de782545dc9e5 --- /dev/null +++ b/go-apps/meep-sss/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/go-apps/meep-sss/.swagger-codegen/VERSION b/go-apps/meep-sss/.swagger-codegen/VERSION new file mode 100644 index 0000000000000000000000000000000000000000..6187fa53f3d79636a7b3e6f59c36a1f4273d08b5 --- /dev/null +++ b/go-apps/meep-sss/.swagger-codegen/VERSION @@ -0,0 +1 @@ +3.0.66 \ No newline at end of file diff --git a/go-apps/meep-sss/Dockerfile b/go-apps/meep-sss/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..7a36e2fe12360c0376916db7540359fd35be7eb2 --- /dev/null +++ b/go-apps/meep-sss/Dockerfile @@ -0,0 +1,23 @@ +# Copyright (c) 2024 The AdvantEDGE Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM debian:11.7-slim +COPY ./meep-sss /meep-sss +COPY ./api /api +COPY ./user-api /user-api +COPY ./data / + +RUN chmod +x /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/go-apps/meep-sss/api/swagger.yaml b/go-apps/meep-sss/api/swagger.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8811273650723525123182e37b0ae0ab5352f9d8 --- /dev/null +++ b/go-apps/meep-sss/api/swagger.yaml @@ -0,0 +1,1581 @@ +openapi: 3.0.0 +info: + title: ETSI GS MEC 046 Sensors Sharing Service APIs + description: GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + contact: + name: ETSI Forge + url: https://forge.etsi.org/rep/mec/gs046-ss-api + email: cti_support@etsi.org + license: + name: BSD-3-Clause + url: https://forge.etsi.org/legal-matters + version: 3.1.1 +externalDocs: + description: "GS MEC 046 Sensors Sharing Service APIs, v3.3.1" + url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_mec046v030101p.pdf +servers: +- url: https://localhost/sandboxname/sens/v1 +tags: +- name: sensor-discovery-lookup + description: The Sensor Discovery Lookup is the procedure for applications acquiring + the sensor(s) currently available and the related characteristics +- name: sensor-discovery-subscription + description: The Sensor Discovery Subscription is the procedure for applications + to request to receive notifications about sensors when sensor information changes +- name: sensor-status-lookup + description: The Sensor Status Lookup is the procedure for applications acquiring + the status (e.g. active or error state) of sensor(s) +- name: sensor-status-subscription + description: The Sensor Status Subscription is the procedure for applications to + request to receive notifications about sensors when they change their status +- name: sensor-data-lookup + description: The Sensor Data Lookup is the procedure for applications to acquire + the last data collected by the sensor(s) +- name: sensor-data-subscription + description: The Sensor Data Subscription is the procedure for applications to request + to receive notifications every time new data are collected from the sensor(s) +- name: sensor-management + description: The Sensor Management is the procedure for a MEC application to configure + specific parameter(s) on the sensor(s) +paths: + /queries/sensor_discovery: + get: + tags: + - sensor-discovery-lookup + summary: The GET method is used to query the available sensors + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.3.3.1-1\ + \ and 7.3.3.1-2." + operationId: SensorDiscoveryLookupGET + parameters: + - name: sensorInfo + in: query + description: Object containing the characteristics of the sensor(s) to be + selected for the query + required: false + style: form + explode: true + schema: + $ref: '#/components/schemas/SensorInfo' + responses: + "200": + description: "Upon success, a response body containing the available sensors\ + \ is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorDiscoveryInfo' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /subscriptions/sensor_discovery: + get: + tags: + - sensor-discovery-subscription + summary: The GET method is used to request information about the subscriptions + related to sensor discovery for this requestor + description: "This method shall support the URI query parameter, request and\ + \ response data structures, and response codes, as specified in Tables 7.4.3.1-1\ + \ and 7.4.3.1-2." + operationId: SensorDiscoverySubscriptionGET + parameters: + - name: subscriptionId + in: query + description: Object containing the characteristics of the sensor(s) to be + selected for the query + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: "Upon success, a response body containing the list of links\ + \ to requestor's sensor discovery subscriptions is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - sensor-discovery-subscription + summary: The POST method is used to create a new subscription to sensor discovery + notifications + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Table 7.4.3.4-1" + operationId: SensorDiscoverySubscriptionPOST + requestBody: + description: This type represents a subscription to notifications from the + Sensor-sharing Service regarding events related to changes in sensor information + content: + application/json: + schema: + $ref: '#/components/schemas/subscriptions_sensor_discovery_body' + required: true + responses: + "201": + description: "Indicates successful resource creation, where the resource\ + \ URI shall be returned in the HTTP Location header field" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorDiscoveryEventSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /subscriptions/sensor_discovery/{subscriptionId}: + get: + tags: + - sensor-discovery-subscription + summary: The GET method is used to request information about the subscriptions + related to sensor status for this requestor + description: "This method shall support the URI query parameter, request and\ + \ response data structures, and response codes, as specified in Tables 7.7.3.1-1\ + \ and 7.7.3.1-2." + operationId: SensorDiscoveryIndividualSubscriptionGET + parameters: + - name: subscriptionId + in: path + description: Unique identifiers of the subscription + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: "Upon success, a response body containing the list of links\ + \ to requestor's sensor status subscriptions is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - sensor-discovery-subscription + summary: The POST method is used to create a new subscription to sensor discovery + notifications + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Table 7.4.3.4-1" + operationId: SensorDiscoverySubscriptionPUT + parameters: + - name: subscriptionId + in: path + description: It uniquely identifies the created individual application mobility + service + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: New SensorDiscoveryEventSubscription is included as entity body + of the request + content: + application/json: + schema: + $ref: '#/components/schemas/sensor_discovery_subscriptionId_body' + required: true + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the updated sensor discovery subscription is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - sensor-discovery-subscription + summary: The DELETE method is used to cancel the existing subscription. Cancellation + can be made by deleting the resource that represents existing sensor discovery + subscription + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Tables 7.5.3.5-1 and 7.5.3.5-2" + operationId: SensorDiscoverySubscriptionDELETE + parameters: + - name: subscriptionId + in: path + description: It uniquely identifies the created individual application mobility + service + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: "Upon success, a response 204 No Content without any response\ + \ body is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /queries/sensor_status: + get: + tags: + - sensor-status-lookup + summary: The GET method is used to query the available status + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.6.3.1-1\ + \ and 7.6.3.1-2" + operationId: SensorStatusLookupGET + parameters: + - name: sensorIdentifier + in: query + description: It uniquely identifies the created individual application mobility + service + required: true + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the status information\ + \ of specific sensors is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorStatusInfo' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /subscriptions/sensor_status: + get: + tags: + - sensor-status-subscription + summary: The GET method is used to request information about the subscriptions + related to sensor status for this requestor + description: "This method shall support the URI query parameter, request and\ + \ response data structures, and response codes, as specified in Tables 7.7.3.1-1\ + \ and 7.7.3.1-2" + operationId: SensorStatusIndividualSubscriptionGET + parameters: + - name: sensorIdentifier + in: query + description: Unique identifiers of the sensors + required: false + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the list of links\ + \ to requestor's sensor status subscriptions is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - status-status-subscription + summary: The POST method is used to create a new subscription to sensor status + notifications + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Table 7.7.3.4-1" + operationId: SensorStatusSubscriptionPOST + requestBody: + description: The entity body in the request contains data type of the specific + sensor status subscription that is to be created + content: + application/json: + schema: + $ref: '#/components/schemas/subscriptions_sensor_status_body' + required: true + responses: + "201": + description: "Indicates successful resource creation, where the resource\ + \ URI shall be returned in the HTTP Location header field." + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorStatusSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /subscriptions/sensor_status/{subscriptionId}: + get: + tags: + - sensor-status-subscription + summary: The GET method is used to retrieve information about this subscription + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Tables 7.8.3.1-1 and 7.8.3.1-2" + operationId: SensorSatusIndividualSubscriptionGET + parameters: + - name: subscriptionId + in: path + description: Unique identifiers of the subscription + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the specific sensor status subscription is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorStatusSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - sensor-status-subscription + summary: The PUT method is used to update the existing subscription + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.8.3.2-1\ + \ and 7.8.3.2-2" + operationId: SensorStatusSubscriptionPUT + parameters: + - name: subscriptionId + in: path + description: It uniquely identifies the created individual application mobility + service + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: New SensorStatusSubscription is included as entity body of the + request + content: + application/json: + schema: + $ref: '#/components/schemas/sensor_status_subscriptionId_body' + required: true + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the updated sensor status subscription is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorStatusSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - sensor-status-subscription + summary: The DELETE method is used to cancel the existing subscription + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Tables 7.8.3.5-1 and 7.8.3.5-2" + operationId: SensorStatusSubscriptionDELETE + parameters: + - name: subscriptionId + in: path + description: It uniquely identifies a subscription + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: "Upon success, a response 204 No Content without any response\ + \ body is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /queries/status_data: + get: + tags: + - sensor-data-lookup + summary: The GET method is used to query the last sensor data from specific + sensors + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.9.3.1-1\ + \ and 7.9.3.1-2" + operationId: SensorDataLookupGET + parameters: + - name: sensorIdentifier + in: query + description: It uniquely identifies the created individual application mobility + service + required: true + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the last sensor data\ + \ measured by the sensors is returned" + content: + application/json: + schema: + minItems: 1 + type: array + items: + $ref: '#/components/schemas/SensorData' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /subscriptions/sensor_data: + get: + tags: + - sensor-data-subscription + summary: The GET method is used to request information about the subscriptions + related to sensor data for this requestor + description: "This method shall support the URI query parameter, request and\ + \ response data structures, and response codes, as specified in Tables 7.10.3.1-1\ + \ and 7.10.3.1-2" + operationId: SensorDataSubscriptionGET + parameters: + - name: sensorIdentifier + in: query + description: Unique identifiers of the sensors + required: true + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the list of links\ + \ to requestor's sensor status subscriptions is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - sensor-data-subscription + summary: The POST method is used to create a new subscription to sensor status + notifications + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Table 7.7.3.4-1" + operationId: SensorDataSubscriptionPOST + requestBody: + description: The entity body in the request contains data type of the specific + sensor status subscription that is to be created + content: + application/json: + schema: + $ref: '#/components/schemas/subscriptions_sensor_data_body' + required: true + responses: + "201": + description: "Indicates successful resource creation, where the resource\ + \ URI shall be returned in the HTTP Location header field." + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorStatusSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /queries/status_data/{subscriptionId}: + get: + tags: + - sensor-data-subscription + summary: The GET method is used to retrieve information about this subscription + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Tables 7.11.3.1-1 and 7.11.3.1-2" + operationId: SensorDataIndividualSubscriptionGET + parameters: + - name: subscriptionId + in: path + description: Unique identifiers of a subscription + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the specific sensor data subscription is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorDataSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - sensor-data-subscription + summary: The PUT method is used to update the existing subscription + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.11.3.2-1\ + \ and 7.11.3.2-2" + operationId: SensorDataSubscriptionPUT + parameters: + - name: subscriptionId + in: path + description: Unique identifiers of a subscription + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: New SensorDataSubscription is included as entity body of the + request + content: + application/json: + schema: + $ref: '#/components/schemas/status_data_subscriptionId_body' + required: true + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the updated sensor data subscription is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorDataSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - sensor-data-subscription + summary: The DELETE method is used to cancel the existing subscription + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Tables 7.11.3.5-1 and 7.11.3.5-2" + operationId: SensorDataSubscriptionDELETE + parameters: + - name: subscriptionId + in: path + description: It uniquely identifies a subscription + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: "Upon success, a response 204 No Content without any response\ + \ body is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /sensor_management: + get: + tags: + - sensor-management + summary: The GET method is used to receive the sensor characteristics that can + be modified on specific sensors + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.12.3.1-1\ + \ and 7.12.3.1-2" + operationId: SensorMgmtGET + parameters: + - name: sensorIdentifier + in: query + description: It uniquely identifies the created individual application mobility + service + required: true + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the characteristics\ + \ that can be set on the specific sensors are returned" + content: + application/json: + schema: + minItems: 1 + type: array + items: + $ref: '#/components/schemas/SensorCharacteristic' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - managementn + summary: The PUT method is used to update the value of the characteristics that + can be set on a sensor or on a group of sensors + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.12.3.2-1\ + \ and 7.12.3.2-2" + operationId: SensorMgmtPUT + requestBody: + description: "The list of sensor characteristics to be updated, with the new\ + \ values to set, is included as entity body of the request" + content: + application/json: + schema: + minItems: 1 + type: array + items: + $ref: '#/components/schemas/SensorCharacteristic' + required: true + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the updated sensor characteristics is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorCharacteristic' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' +components: + schemas: + SensorStatusInfo: + required: + - sensorIdentifier + - sensorStatusType + type: object + properties: + sensorIdentifier: + type: string + description: Unique identifier of the sensor + sensorStatusType: + type: string + description: The status of the sensor + errorInformation: + type: string + description: String explaining the error of the sensor + example: + errorInformation: errorInformation + sensorIdentifier: sensorIdentifier + sensorStatusType: sensorStatusType + SensorData: + required: + - data + - dataFormat + - dataUnitOfMeasure + - sensorIdentifier + type: object + properties: + sensorIdentifier: + type: string + description: Unique identifier of the sensor + data: + type: string + description: The status of the sensor + dataFormat: + type: string + description: String explaining the error of the sensor + dataUnitOfMeasure: + type: string + description: String explaining the error of the sensor + dataTimestamp: + $ref: '#/components/schemas/TimeStamp' + example: + dataTimestamp: + seconds: 1 + nanoSeconds: 5 + data: data + dataUnitOfMeasure: dataUnitOfMeasure + dataFormat: dataFormat + sensorIdentifier: sensorIdentifier + SensorInfo: + required: + - sensorPropertyList + - type + type: object + properties: + type: + type: string + description: Type of the sensor + sensorPropertyList: + type: array + description: "It indicates the list of properties that the sensor can sense\ + \ (see saref:Property in ETSI TS 103 264 [4], clause 4.3.8)." + items: + minItems: 1 + type: string + sensorCharacteristicList: + minItems: 0 + type: array + description: The sensor' characteristics to be matched + items: + $ref: '#/components/schemas/SensorCharacteristic' + geographicalArea: + minItems: 0 + type: array + description: The parameters describing the area + items: + $ref: '#/components/schemas/AreaInfo' + SensorDiscoveryInfo: + required: + - sensorIdentifier + - sensorPropertyList + - sensorType + type: object + properties: + sensorIdentifier: + type: string + description: Unique identifier of the sensor + sensorType: + type: string + description: Type of the Sensor + sensorPropertyList: + minItems: 1 + type: array + description: It indicates the list of properties that the sensor can sense + items: + type: string + sensorCharacteristicList: + minItems: 0 + type: array + description: The sensor' characteristics + items: + $ref: '#/components/schemas/SensorCharacteristic' + sensorPosition: + $ref: '#/components/schemas/Point' + example: + sensorPosition: + latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + sensorPropertyList: + - sensorPropertyList + - sensorPropertyList + sensorType: sensorType + sensorCharacteristicList: + - characteristicName: characteristicName + characteristicUnitOfMeasure: characteristicUnitOfMeasure + characteristicValue: characteristicValue + - characteristicName: characteristicName + characteristicUnitOfMeasure: characteristicUnitOfMeasure + characteristicValue: characteristicValue + sensorIdentifier: sensorIdentifier + SensorDiscoveryEventSubscription: + title: SensorDiscoveryEventSubscription + required: + - subscriptionType + type: object + properties: + subscriptionType: + $ref: '#/components/schemas/SubscriptionType' + callbackReference: + type: string + description: URI exposed by the client on which to receive notifications + via HTTP + format: uri + requestTestNotification: + type: boolean + description: "Set to TRUE by the MEC application to request a test notification\ + \ via HTTP on the callbackReference URI," + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + _links: + $ref: '#/components/schemas/SubscriptionLinks' + sensorInfoList: + type: array + description: Object containing the characteristics of the sensor(s) to be + selected for the subscription + items: + type: string + geographicalArea: + type: array + description: The parameters describing the area to subscribe + items: + $ref: '#/components/schemas/AreaInfo' + expiryDeadline: + $ref: '#/components/schemas/TimeStamp' + example: + sensorInfoList: + - sensorInfoList + - sensorInfoList + subscriptionType: SensorDiscoveryEventSubscription + _links: + self: + href: href + callbackReference: http://example.com/aeiou + expiryDeadline: + seconds: 1 + nanoSeconds: 5 + websockNotifConfig: + requestWebsocketUri: true + websocketUri: http://example.com/aeiou + requestTestNotification: true + geographicalArea: + - shape: 0 + radius: 6 + points: + - latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + - latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + - shape: 0 + radius: 6 + points: + - latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + - latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + SensorStatusSubscription: + title: SensorStatusSubscription + required: + - subscriptionType + type: object + properties: + subscriptionType: + $ref: '#/components/schemas/SubscriptionType' + callbackReference: + type: string + description: URI exposed by the client on which to receive notifications + via HTTP + format: uri + requestTestNotification: + type: boolean + description: "Set to TRUE by the MEC application to request a test notification\ + \ via HTTP on the callbackReference URI," + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + _links: + $ref: '#/components/schemas/SubscriptionLinks' + expiryDeadline: + $ref: '#/components/schemas/TimeStamp' + example: + subscriptionType: SensorDiscoveryEventSubscription + _links: + self: + href: href + callbackReference: http://example.com/aeiou + expiryDeadline: + seconds: 1 + nanoSeconds: 5 + websockNotifConfig: + requestWebsocketUri: true + websocketUri: http://example.com/aeiou + requestTestNotification: true + SensorDataSubscription: + title: SensorDataSubscription + required: + - subscriptionType + type: object + properties: + subscriptionType: + $ref: '#/components/schemas/SubscriptionType' + callbackReference: + type: string + description: URI exposed by the client on which to receive notifications + via HTTP + format: uri + requestTestNotification: + type: boolean + description: "Set to TRUE by the MEC application to request a test notification\ + \ via HTTP on the callbackReference URI," + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + _links: + $ref: '#/components/schemas/SubscriptionLinks' + expiryDeadline: + $ref: '#/components/schemas/TimeStamp' + example: + subscriptionType: SensorDiscoveryEventSubscription + _links: + self: + href: href + callbackReference: http://example.com/aeiou + expiryDeadline: + seconds: 1 + nanoSeconds: 5 + websockNotifConfig: + requestWebsocketUri: true + websocketUri: http://example.com/aeiou + requestTestNotification: true + SubscriptionType: + title: SubscriptionType + type: string + enum: + - SensorDiscoveryEventSubscription + - SensorStatusSubscription + - SensorDataSubscription + WebsockNotifConfig: + type: object + properties: + websocketUri: + type: string + description: Set by AMS to indicate to the service consumer the Websocket + URI to be used for delivering notifications. + format: uri + requestWebsocketUri: + type: boolean + description: Set to true by the service consumer to indicate that Websocket + delivery is requested. + example: + requestWebsocketUri: true + websocketUri: http://example.com/aeiou + SensorCharacteristic: + required: + - characteristicName + - characteristicValue + type: object + properties: + characteristicName: + type: string + description: The name of the characteristic + characteristicValue: + type: string + description: The value of the characteristic. + characteristicUnitOfMeasure: + type: string + description: "The unit of measure of the characteristic (see saref:UnitOfMeasure\ + \ in ETSI TS 103 264 [4], clause 4.3.8)." + description: "This type represents a sensor' characteristic which details the\ + \ type of sensor and its working functionalities, such as the model of the\ + \ sensor, the sampling frequency, the operating range, the accuracy" + example: + characteristicName: characteristicName + characteristicUnitOfMeasure: characteristicUnitOfMeasure + characteristicValue: characteristicValue + Point: + required: + - latitude + - longitude + type: object + properties: + latitude: + type: number + description: "Location latitude, expressed in the range -90° to +90°" + longitude: + type: number + description: "Location longitude, expressed in the range -180° to +180°." + description: This type represents the geographical location of a point + example: + latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + SubscriptionLinks: + title: SubscriptionLinks + required: + - self + type: object + properties: + self: + $ref: '#/components/schemas/LinkType' + example: + self: + href: href + SubscriptionLinkList.links: + title: SubscriptionLinkList.links + required: + - self + type: object + properties: + self: + $ref: '#/components/schemas/LinkType' + subscriptions: + type: array + description: The MEC application's subscriptions + items: + $ref: '#/components/schemas/SubscriptionLinkList.subscription' + description: List of hyperlinks related to the resource. + example: + subscriptions: + - subscriptionType: subscriptionType + href: href + - subscriptionType: subscriptionType + href: href + self: + href: href + SubscriptionLinkList.subscription: + title: SubscriptionLinkList.subscription + required: + - href + - subscriptionType + type: object + properties: + href: + type: string + description: The URI referring to the subscription + subscriptionType: + type: string + description: Type of the subscription + example: + subscriptionType: subscriptionType + href: href + SubscriptionLinkList: + title: SubscriptionLinkList + required: + - _links + type: object + properties: + _links: + $ref: '#/components/schemas/SubscriptionLinkList.links' + example: + _links: + subscriptions: + - subscriptionType: subscriptionType + href: href + - subscriptionType: subscriptionType + href: href + self: + href: href + ProblemDetails: + type: object + properties: + type: + type: string + description: A URI reference according to IETF RFC 3986 that identifies + the problem type + format: uri + title: + type: string + description: "A short, human-readable summary of the problem type" + status: + type: integer + description: The HTTP status code for this occurrence of the problem + format: uint32 + detail: + type: string + description: A human-readable explanation specific to this occurrence of + the problem + instance: + type: string + description: A URI reference that identifies the specific occurrence of + the problem + format: uri + LinkType: + title: LinkType + required: + - href + type: object + properties: + href: + type: string + description: The URI referring to the subscription. + description: '''This data type represents a type of link''' + example: + href: href + TimeStamp: + title: TimeStamp + required: + - nanoSeconds + - seconds + type: object + properties: + seconds: + type: integer + description: "'The seconds part of the Time. Time is defined as Unix-time\ + \ since January 1, 1970, 00:00:00 UTC.'" + nanoSeconds: + type: integer + description: "'The nanoseconds part of the Time. Time is defined as Unix-time\ + \ since January 1, 1970, 00:00:00 UTC.'" + description: "'This data type represents the time stamp as Unix-time since January\ + \ 1, 1970, 00:00:00 UTC'" + example: + seconds: 1 + nanoSeconds: 5 + ShapeType: + title: ShapeType + type: integer + enum: + - null + - null + AreaInfo: + title: AreaInfo + required: + - points + - shape + type: object + properties: + shape: + $ref: '#/components/schemas/ShapeType' + points: + type: array + description: Shall include one point if the shape is CIRCLE. Shall include + 3-15 points if the shape is POLYGON + items: + $ref: '#/components/schemas/Point' + radius: + type: integer + description: Shall be present if the shape is CIRCLE + example: + shape: 0 + radius: 6 + points: + - latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + - latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + subscriptions_sensor_discovery_body: + type: object + properties: + SensorDiscoveryEventSubscription: + $ref: '#/components/schemas/SensorDiscoveryEventSubscription' + sensor_discovery_subscriptionId_body: + type: object + properties: + SensorDiscoveryEventSubscription: + $ref: '#/components/schemas/SensorDiscoveryEventSubscription' + subscriptions_sensor_status_body: + type: object + properties: + SensorStatusSubscription: + $ref: '#/components/schemas/SensorStatusSubscription' + sensor_status_subscriptionId_body: + type: object + properties: + SensorStatusSubscription: + $ref: '#/components/schemas/SensorStatusSubscription' + subscriptions_sensor_data_body: + type: object + properties: + SensorDataSubscription: + $ref: '#/components/schemas/SensorDataSubscription' + status_data_subscriptionId_body: + type: object + properties: + SensorStatusSubscription: + $ref: '#/components/schemas/SensorDataSubscription' diff --git a/go-apps/meep-sss/entrypoint.sh b/go-apps/meep-sss/entrypoint.sh new file mode 100755 index 0000000000000000000000000000000000000000..f8d612d6d9d89f27dc7f8f03fbcbe7e7cd8bb73a --- /dev/null +++ b/go-apps/meep-sss/entrypoint.sh @@ -0,0 +1,48 @@ +#!/bin/bash +set -e + +echo "MEEP_HOST_URL: ${MEEP_HOST_URL}" +echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" +echo "MEEP_MEP_NAME: ${MEEP_MEP_NAME}" +echo "MEEP_CODECOV: ${MEEP_CODECOV}" +if [[ ! -z "${MEEP_MEP_NAME}" ]]; then + svcPath="${MEEP_SANDBOX_NAME}/${MEEP_MEP_NAME}" +else + svcPath="${MEEP_SANDBOX_NAME}" +fi + +# Update API yaml basepaths to enable "Try-it-out" feature +# OAS2: Set relative path to sandbox name + endpoint path (origin will be derived from browser URL) +# OAS3: Set full path to provided Host URL + sandbox name + endpoint path +setBasepath() { + # OAS3 + hostName=$(echo "${MEEP_HOST_URL}" | sed -E 's/^\s*.*:\/\///g') + echo "Replacing [localhost] with ${hostName} to url in: '$1'" + sed -i "s,localhost,${hostName},g" "$1"; + + # OAS2 and OAS3 + echo "Replacing [sandboxname] with ${svcPath} to basepath or url in: '$1'" + sed -i "s,sandboxname,${svcPath},g" "$1"; +} + +# Set basepath for API files +for file in /api/*; do + if [[ ! -e "$file" ]]; then continue; fi + setBasepath "$file" +done + +# Set basepath for user-supplied API files +for file in /user-api/*; do + if [[ ! -e "$file" ]]; then continue; fi + setBasepath "$file" +done + +# Start service +currenttime=`date "+%Y%m%d-%H%M%S"` +filepath="/codecov/codecov-meep-sss-" +filename=$filepath$currenttime".out" +if [ "$MEEP_CODECOV" = 'true' ]; then + exec /meep-sss -test.coverprofile=$filename __DEVEL--code-cov +else + exec /meep-sss +fi diff --git a/go-apps/meep-sss/go.mod b/go-apps/meep-sss/go.mod new file mode 100644 index 0000000000000000000000000000000000000000..682557e6ad7ed527a68017ab12d8162307a22f4d --- /dev/null +++ b/go-apps/meep-sss/go.mod @@ -0,0 +1,43 @@ +module github.com/InterDigitalInc/AdvantEDGE/go-apps/meep-sss + +go 1.12 + +require ( + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-app-support-client v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-key-mgr v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-model v0.0.0 // indirect + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-engine-client v0.0.0 // indirect + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-http-logger v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-iot-mgr v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-metrics v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-model v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-mq v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-redis v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-sandbox-ctrl-client v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-service-mgmt-client v0.0.0 + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-subscriptions v0.0.0 // indirect + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-swagger-api-mgr v0.0.0 + github.com/gorilla/handlers v1.5.1 + github.com/gorilla/mux v1.8.1 + github.com/prometheus/client_golang v1.9.0 +) + +replace ( + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-app-support-client => ../../go-packages/meep-app-support-client + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-key-mgr => ../../go-packages/meep-data-key-mgr + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-model => ../../go-packages/meep-data-model + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-gis-engine-client => ../../go-packages/meep-gis-engine-client + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-http-logger => ../../go-packages/meep-http-logger + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-iot-mgr => ../../go-packages/meep-iot-mgr + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger => ../../go-packages/meep-logger + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-metrics => ../../go-packages/meep-metrics + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-model => ../../go-packages/meep-model + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-mq => ../../go-packages/meep-mq + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-redis => ../../go-packages/meep-redis + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-sandbox-ctrl-client => ../../go-packages/meep-sandbox-ctrl-client + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-service-mgmt-client => ../../go-packages/meep-service-mgmt-client + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-subscriptions => ../../go-packages/meep-subscriptions + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-swagger-api-mgr => ../../go-packages/meep-swagger-api-mgr + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-websocket => ../../go-packages/meep-websocket +) diff --git a/go-apps/meep-sss/go.sum b/go-apps/meep-sss/go.sum new file mode 100644 index 0000000000000000000000000000000000000000..d2eacd2e5c2eaef6bcf0775f09b7b004b9fb2d35 --- /dev/null +++ b/go-apps/meep-sss/go.sum @@ -0,0 +1,505 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/InterDigitalInc/AdvantEDGE v1.9.2 h1:CAcF+bn5m0Va2mHFL2lE4awU/kjuF6CjC05phiz8vnk= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/RyanCarrier/dijkstra v0.0.0-20190726134004-b51cadb5ae52 h1:trnwuu/Q8T59kgRjXcSDBODnyZP9wes+bnLn0lx4PgM= +github.com/RyanCarrier/dijkstra v0.0.0-20190726134004-b51cadb5ae52/go.mod h1:DdR6ymcLl8+sN/XOVNjnYO1NDYfgHskGjreZUDuQCTY= +github.com/RyanCarrier/dijkstra-1 v0.0.0-20170512020943-0e5801a26345/go.mod h1:OK4EvWJ441LQqGzed5NGB6vKBAE34n3z7iayPcEwr30= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/albertorestifo/dijkstra v0.0.0-20160910063646-aba76f725f72/go.mod h1:o+JdB7VetTHjLhU0N57x18B9voDBQe0paApdEAEoEfw= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/eclipse/paho.mqtt.golang v1.4.2 h1:66wOzfUHSSI1zamx7jR6yMEI5EuHnT1G6rNA5PM12m4= +github.com/eclipse/paho.mqtt.golang v1.4.2/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-redis/redis v6.15.2+incompatible h1:9SpNVG76gr6InJGxoZ6IuuxaCOQwDAhzyXg+Bs+0Sb4= +github.com/go-redis/redis v6.15.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattomatic/dijkstra v0.0.0-20130617153013-6f6d134eb237/go.mod h1:UOnLAUmVG5paym8pD3C4B9BQylUDC2vXFJJpT7JrlEA= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= +github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/roymx/viper v1.3.3-0.20190416163942-b9a223fc58a3 h1:lBNvYUFo7d4fHs8BXUmoTzbdUo4usq6PlP5qn894sGA= +github.com/roymx/viper v1.3.3-0.20190416163942-b9a223fc58a3/go.mod h1:jo59Sv6xirZtbxbaZbCtrQd1CSufmcxJZIC8hm2tepw= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v1.1.0 h1:py12iX8XSyI7aN/3dUT8DFIDJazNJsVJdxNVEpnQTZM= +github.com/streadway/amqp v1.1.0/go.mod h1:WYSrTEYHOXHd0nwFeUXAe2G2hRnQT+deZJJf88uS9Bg= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/go-apps/meep-sss/main.go b/go-apps/meep-sss/main.go new file mode 100644 index 0000000000000000000000000000000000000000..029675a8a9773ca17872ab42c3802028fffeca99 --- /dev/null +++ b/go-apps/meep-sss/main.go @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "net/http" + "os" + "os/signal" + "syscall" + "time" + + server "github.com/InterDigitalInc/AdvantEDGE/go-apps/meep-sss/server" + log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" + "github.com/prometheus/client_golang/prometheus/promhttp" + + "github.com/gorilla/handlers" +) + +func init() { + // Log as JSON instead of the default ASCII formatter. + log.MeepJSONLogInit("meep-sss") +} + +func main() { + log.Info(os.Args) + + log.Info("Starting SENSORS SHARING Service") + + run := true + go func() { + sigchan := make(chan os.Signal, 10) + signal.Notify(sigchan, syscall.SIGINT, syscall.SIGTERM) + <-sigchan + log.Info("Program killed !") + // do last actions and wait for all write operations to end + run = false + }() + + go func() { + // Initialize SENSORS SHARING + err := server.Init() + if err != nil { + log.Error("Failed to initialize SENSORS SHARING Service") + run = false + return + } + + // Start SENSORS SHARING Event Handler thread + err = server.Run() + if err != nil { + log.Error("Failed to start SENSORS SHARING Service") + run = false + return + } + + // Start SENSORS SHARING REST API Server + router := server.NewRouter() + methods := handlers.AllowedMethods([]string{"OPTIONS", "DELETE", "GET", "HEAD", "POST", "PUT"}) + header := handlers.AllowedHeaders([]string{"content-type"}) + log.Fatal(http.ListenAndServe(":80", handlers.CORS(methods, header)(router))) + run = false + }() + + go func() { + // Initialize Metrics Endpoint + http.Handle("/metrics", promhttp.Handler()) + log.Fatal(http.ListenAndServe(":9000", nil)) + run = false + }() + + count := 0 + for { + if !run { + _ = server.Stop() + log.Info("Ran for ", count, " seconds") + break + } + time.Sleep(time.Second) + count++ + } + +} diff --git a/go-apps/meep-sss/main_test.go b/go-apps/meep-sss/main_test.go new file mode 100644 index 0000000000000000000000000000000000000000..5e054c3f011cf7b40f026148c216fe1a0f08a525 --- /dev/null +++ b/go-apps/meep-sss/main_test.go @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "os" + "strings" + "testing" + + log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" +) + +// Build: +// $ go test -covermode=count -coverpkg=./... -c -o +// Run: +// $ ./ -test.coverprofile=cover.out __DEVEL--code-cov + +// TestMain is a hack that allows us to figure out what the coverage is during +// integration tests. I would not recommend that you use a binary built using +// this hack outside of a test suite. +func TestMain(t *testing.T) { + var ( + args []string + run bool + ) + + log.Info(os.Args) + for _, arg := range os.Args { + switch { + case arg == "__DEVEL--code-cov": + run = true + case strings.HasPrefix(arg, "-test"): + case strings.HasPrefix(arg, "__DEVEL"): + default: + args = append(args, arg) + } + } + os.Args = args + log.Info(os.Args) + + if run { + main() + } +} diff --git a/go-apps/meep-sss/sbi/sss-sbi.go b/go-apps/meep-sss/sbi/sss-sbi.go new file mode 100644 index 0000000000000000000000000000000000000000..7612d96481a942ac32c6fd162a008835aaf164db --- /dev/null +++ b/go-apps/meep-sss/sbi/sss-sbi.go @@ -0,0 +1,247 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package sbi + +import ( + "sync" + + tm "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-iot-mgr" + log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" + mod "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-model" + mq "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-mq" + sam "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-swagger-api-mgr" +) + +const moduleName string = "meep-sss-sbi" + +// var redisAddr string = "meep-redis-master.default.svc.cluster.local:6379" +// var influxAddr string = "http://meep-influxdb.default.svc.cluster.local:8086" + +type SbiCfg struct { + ModuleName string + SandboxName string + IotBroker string + IotTopic string + MepName string + RedisAddr string + InfluxAddr string + Locality []string + IotNotify func(string, string) + ScenarioNameCb func(string) + CleanUpCb func() +} + +type SssSbi struct { + moduleName string + sandboxName string + mepName string + scenarioName string + localityEnabled bool + locality map[string]bool + mqLocal *mq.MsgQueue + handlerId int + apiMgr *sam.SwaggerApiMgr + activeModel *mod.Model + iotMgr *tm.IotMgr + updateScenarioNameCB func(string) + cleanUpCB func() + mutex sync.Mutex +} + +var sbi *SssSbi + +// Init - IOT Service SBI initialization +func Init(cfg SbiCfg) (err error) { + + // Create new SBI instance + if sbi != nil { + sbi = nil + } + sbi = new(SssSbi) + sbi.moduleName = cfg.ModuleName + sbi.sandboxName = cfg.SandboxName + sbi.mepName = cfg.MepName + sbi.scenarioName = "" + sbi.updateScenarioNameCB = cfg.ScenarioNameCb + sbi.cleanUpCB = cfg.CleanUpCb + + // Fill locality map + if len(cfg.Locality) > 0 { + sbi.locality = make(map[string]bool) + for _, locality := range cfg.Locality { + sbi.locality[locality] = true + } + sbi.localityEnabled = true + } else { + sbi.localityEnabled = false + } + + // Create message queue + sbi.mqLocal, err = mq.NewMsgQueue(mq.GetLocalName(sbi.sandboxName), moduleName, sbi.sandboxName, cfg.RedisAddr) + if err != nil { + log.Error("Failed to create Message Queue with error: ", err) + return err + } + log.Info("Message Queue created") + + // Create Swagger API Manager + sbi.apiMgr, err = sam.NewSwaggerApiMgr(sbi.moduleName, sbi.sandboxName, sbi.mepName, sbi.mqLocal) + if err != nil { + log.Error("Failed to create Swagger API Manager. Error: ", err) + return err + } + log.Info("Swagger API Manager created") + + // Create new active scenario model + modelCfg := mod.ModelCfg{ + Name: "activeScenario", + Namespace: sbi.sandboxName, + Module: moduleName, + UpdateCb: nil, + DbAddr: cfg.RedisAddr, + } + sbi.activeModel, err = mod.NewModel(modelCfg) + if err != nil { + log.Error("Failed to create model: ", err.Error()) + return err + } + + // Connect to IOT Manager + sbi.iotMgr, err = tm.NewIotMgr(sbi.moduleName, sbi.sandboxName) + if err != nil { + log.Error("Failed connection to IOT Manager: ", err) + return err + } + log.Info("Connected to IOT Manager") + + // Initialize service + processActiveScenarioUpdate() + + return nil +} + +// Run - MEEP IOT execution +func Run() (err error) { + + // Start Swagger API Manager (provider) + err = sbi.apiMgr.Start(true, false) + if err != nil { + log.Error("Failed to start Swagger API Manager with error: ", err.Error()) + return err + } + log.Info("Swagger API Manager started") + + // Add module Swagger APIs + err = sbi.apiMgr.AddApis() + if err != nil { + log.Error("Failed to add Swagger APIs with error: ", err.Error()) + return err + } + log.Info("Swagger APIs successfully added") + + // Register Message Queue handler + handler := mq.MsgHandler{Handler: msgHandler, UserData: nil} + sbi.handlerId, err = sbi.mqLocal.RegisterHandler(handler) + if err != nil { + log.Error("Failed to register message queue handler: ", err.Error()) + return err + } + + return nil +} + +func Stop() (err error) { + if sbi == nil { + return + } + + if sbi.mqLocal != nil { + sbi.mqLocal.UnregisterHandler(sbi.handlerId) + } + + if sbi.apiMgr != nil { + // Remove APIs + err = sbi.apiMgr.RemoveApis() + if err != nil { + log.Error("Failed to remove APIs with err: ", err.Error()) + return err + } + } + + // Delete IOT Manager + if sbi.iotMgr != nil { + err = sbi.iotMgr.DeleteIotMgr() + if err != nil { + log.Error(err.Error()) + return err + } + } + + return nil +} + +// Message Queue handler +func msgHandler(msg *mq.Msg, userData interface{}) { + switch msg.Message { + case mq.MsgScenarioActivate: + log.Debug("RX MSG: ", mq.PrintMsg(msg)) + processActiveScenarioUpdate() + case mq.MsgScenarioUpdate: + log.Debug("RX MSG: ", mq.PrintMsg(msg)) + processActiveScenarioUpdate() + case mq.MsgScenarioTerminate: + log.Debug("RX MSG: ", mq.PrintMsg(msg)) + processActiveScenarioTerminate() + default: + log.Trace("Ignoring unsupported message: ", mq.PrintMsg(msg)) + } +} + +func processActiveScenarioTerminate() { + log.Debug("processActiveScenarioTerminate") + + // Sync with active scenario store + sbi.activeModel.UpdateScenario() + + // Update scenario name + sbi.scenarioName = "" + + sbi.cleanUpCB() +} + +func processActiveScenarioUpdate() { + sbi.mutex.Lock() + defer sbi.mutex.Unlock() + + log.Debug("processActiveScenarioUpdate") + sbi.activeModel.UpdateScenario() + + // Process new scenario + var scenarioName = sbi.activeModel.GetScenarioName() + if scenarioName != sbi.scenarioName { + log.Info("processActiveScenarioUpdate: Entering in then") + // Update scenario name + sbi.scenarioName = scenarioName + sbi.updateScenarioNameCB(sbi.scenarioName) + + // err := initializeIotMessageDistribution() + // if err != nil { + // log.Error("Failed to initialize V2X message distribution: ", err) + // return + // } + } +} diff --git a/go-apps/meep-sss/server/README.md b/go-apps/meep-sss/server/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8287eccc13b1964ff6e384c321eeeaf455eaad6b --- /dev/null +++ b/go-apps/meep-sss/server/README.md @@ -0,0 +1,26 @@ +# Go API Server for swagger + +GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + +## Overview +This server was generated by the [swagger-codegen] +(https://github.com/swagger-api/swagger-codegen) project. +By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. +- + +To see how to make this your own, look here: + +[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md) + +- API version: 3.1.1 +- Build date: 2025-01-19T15:36:44.282355504Z[GMT] +For more information, please visit [https://forge.etsi.org/rep/mec/gs046-ss-api](https://forge.etsi.org/rep/mec/gs046-ss-api) + + +### Running the server +To run the server, follow these simple steps: + +``` +go run main.go +``` + diff --git a/go-apps/meep-sss/server/api_managementn.go b/go-apps/meep-sss/server/api_managementn.go new file mode 100644 index 0000000000000000000000000000000000000000..f871c0d2f7db09846d210af018ea8a3f3e056237 --- /dev/null +++ b/go-apps/meep-sss/server/api_managementn.go @@ -0,0 +1,19 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "net/http" +) + +func SensorMgmtPUT(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/go-apps/meep-sss/server/api_sensor_data_lookup.go b/go-apps/meep-sss/server/api_sensor_data_lookup.go new file mode 100644 index 0000000000000000000000000000000000000000..191b7a8a65f79479b8fdc54e489f558711f37d1c --- /dev/null +++ b/go-apps/meep-sss/server/api_sensor_data_lookup.go @@ -0,0 +1,19 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "net/http" +) + +func SensorDataLookupGET(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/go-apps/meep-sss/server/api_sensor_data_subscription.go b/go-apps/meep-sss/server/api_sensor_data_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..8f63d00de39acc0a169e61e9b90d9063f9257faf --- /dev/null +++ b/go-apps/meep-sss/server/api_sensor_data_subscription.go @@ -0,0 +1,39 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "net/http" +) + +func SensorDataIndividualSubscriptionGET(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SensorDataSubscriptionDELETE(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SensorDataSubscriptionGET(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SensorDataSubscriptionPOST(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SensorDataSubscriptionPUT(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/go-apps/meep-sss/server/api_sensor_discovery_lookup.go b/go-apps/meep-sss/server/api_sensor_discovery_lookup.go new file mode 100644 index 0000000000000000000000000000000000000000..f43d966035e995cfccf0aa5be897530c3d4537db --- /dev/null +++ b/go-apps/meep-sss/server/api_sensor_discovery_lookup.go @@ -0,0 +1,22 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "net/http" +) + +func SensorDiscoveryLookupGET(w http.ResponseWriter, r *http.Request) { + sensorDiscoveryLookupGET(w, r) +} + +func Mec011AppTerminationPOST(w http.ResponseWriter, r *http.Request) { + mec011AppTerminationPost(w, r) +} diff --git a/go-apps/meep-sss/server/api_sensor_discovery_subscription.go b/go-apps/meep-sss/server/api_sensor_discovery_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..3f551787d77a438bdce164f0f1d326fa2f8bb28a --- /dev/null +++ b/go-apps/meep-sss/server/api_sensor_discovery_subscription.go @@ -0,0 +1,38 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "net/http" +) + +func SensorDiscoveryIndividualSubscriptionGET(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SensorDiscoverySubscriptionDELETE(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SensorDiscoverySubscriptionGET(w http.ResponseWriter, r *http.Request) { + sensorDiscoverySubscriptionGET(w, r) +} + +func SensorDiscoverySubscriptionPOST(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SensorDiscoverySubscriptionPUT(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/go-apps/meep-sss/server/api_sensor_management.go b/go-apps/meep-sss/server/api_sensor_management.go new file mode 100644 index 0000000000000000000000000000000000000000..f3864b8580672556cdc0191c9b9726d47050b092 --- /dev/null +++ b/go-apps/meep-sss/server/api_sensor_management.go @@ -0,0 +1,19 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "net/http" +) + +func SensorMgmtGET(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/go-apps/meep-sss/server/api_sensor_status_lookup.go b/go-apps/meep-sss/server/api_sensor_status_lookup.go new file mode 100644 index 0000000000000000000000000000000000000000..4ca30c59f2b5eba2b20fa85ca087eed312bd5f66 --- /dev/null +++ b/go-apps/meep-sss/server/api_sensor_status_lookup.go @@ -0,0 +1,19 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "net/http" +) + +func SensorStatusLookupGET(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/go-apps/meep-sss/server/api_sensor_status_subscription.go b/go-apps/meep-sss/server/api_sensor_status_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..9e0cae6e3f1ad336ce56160b9c84ab114a604093 --- /dev/null +++ b/go-apps/meep-sss/server/api_sensor_status_subscription.go @@ -0,0 +1,34 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "net/http" +) + +func SensorSatusIndividualSubscriptionGET(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SensorStatusIndividualSubscriptionGET(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SensorStatusSubscriptionDELETE(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SensorStatusSubscriptionPUT(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/go-apps/meep-sss/server/api_status_status_subscription.go b/go-apps/meep-sss/server/api_status_status_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..17b96aed6f9eb23f71dad1cc6d07ed795b019c45 --- /dev/null +++ b/go-apps/meep-sss/server/api_status_status_subscription.go @@ -0,0 +1,19 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "net/http" +) + +func SensorStatusSubscriptionPOST(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/go-apps/meep-sss/server/convert.go b/go-apps/meep-sss/server/convert.go new file mode 100644 index 0000000000000000000000000000000000000000..9afb971f2a91b8cd38e636442662fd5e22ec2efb --- /dev/null +++ b/go-apps/meep-sss/server/convert.go @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package server + +import ( + "encoding/json" + //"fmt" + + log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" +) + +func convertProblemDetailstoJson(probdetails *ProblemDetails) string { + jsonInfo, err := json.Marshal(*probdetails) + if err != nil { + log.Error(err.Error()) + return "" + } + return string(jsonInfo) +} diff --git a/go-apps/meep-sss/server/logger.go b/go-apps/meep-sss/server/logger.go new file mode 100644 index 0000000000000000000000000000000000000000..2d1fb72bf379e2307184fa5c56db31edb79158df --- /dev/null +++ b/go-apps/meep-sss/server/logger.go @@ -0,0 +1,32 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "log" + "net/http" + "time" +) + +func Logger(inner http.Handler, name string) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + start := time.Now() + + inner.ServeHTTP(w, r) + + log.Printf( + "%s %s %s %s", + r.Method, + r.RequestURI, + name, + time.Since(start), + ) + }) +} diff --git a/go-apps/meep-sss/server/meep-sss.go b/go-apps/meep-sss/server/meep-sss.go new file mode 100644 index 0000000000000000000000000000000000000000..dd03e04775309d5da3f2045fb9c79198a8d8e7e9 --- /dev/null +++ b/go-apps/meep-sss/server/meep-sss.go @@ -0,0 +1,568 @@ +/* + * Copyright (c) 2025 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package server + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "net/http" + "net/url" + "os" + "strconv" + "strings" + "time" + + sbi "github.com/InterDigitalInc/AdvantEDGE/go-apps/meep-sss/sbi" + asc "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-app-support-client" + dkm "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-data-key-mgr" + httpLog "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-http-logger" + log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" + redis "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-redis" + scc "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-sandbox-ctrl-client" + smc "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-service-mgmt-client" + "github.com/gorilla/mux" + //uuid "github.com/google/uuid" +) + +const moduleName = "meep-sss" +const sssBasePath = "sens/v1/" +const sssKey = "sens" + +const serviceName = "IOT Service" +const serviceCategory = "IOT" +const defaultMepName = "global" +const defaultScopeOfLocality = "MEC_SYSTEM" +const defaultConsumedLocalOnly = true +const appTerminationPath = "notifications/mec011/appTermination" + +var redisAddr string = "meep-redis-master.default.svc.cluster.local:6379" +var influxAddr string = "http://meep-influxdb.default.svc.cluster.local:8086" +var sbxCtrlUrl string = "http://meep-sandbox-ctrl" + +var currentStoreName = "" + +var IOT_DB = 0 + +var rc *redis.Connector +var hostUrl *url.URL +var instanceId string +var instanceName string +var sandboxName string +var mepName string = defaultMepName +var scopeOfLocality string = defaultScopeOfLocality +var consumedLocalOnly bool = defaultConsumedLocalOnly +var locality []string +var basePath string +var baseKey string + +const serviceAppVersion = "3.1.1" + +var serviceAppInstanceId string + +var appEnablementUrl string +var appEnablementEnabled bool +var sendAppTerminationWhenDone bool = false +var appTermSubId string +var appEnablementServiceId string +var appSupportClient *asc.APIClient +var svcMgmtClient *smc.APIClient +var sbxCtrlClient *scc.APIClient + +var registrationTicker *time.Ticker + +func getAppInstanceId() (id string, err error) { + var appInfo scc.ApplicationInfo + appInfo.Id = instanceId + appInfo.Name = serviceCategory + appInfo.Type_ = "SYSTEM" + appInfo.NodeName = mepName + if mepName == defaultMepName { + appInfo.Persist = true + } else { + appInfo.Persist = false + } + response, _, err := sbxCtrlClient.ApplicationsApi.ApplicationsPOST(context.TODO(), appInfo) + if err != nil { + log.Error("Failed to get App Instance ID with error: ", err) + return "", err + } + return response.Id, nil +} + +func deregisterService(appInstanceId string, serviceId string) error { + _, err := svcMgmtClient.MecServiceMgmtApi.AppServicesServiceIdDELETE(context.TODO(), appInstanceId, serviceId) + if err != nil { + log.Error("Failed to unregister the service to app enablement registry: ", err) + return err + } + return nil +} + +func registerService(appInstanceId string) error { + // Build Service Info + state := smc.ACTIVE_ServiceState + serializer := smc.JSON_SerializerType + transportType := smc.REST_HTTP_TransportType + localityType := smc.LocalityType(scopeOfLocality) + srvInfo := smc.ServiceInfo{ + SerName: instanceName, + Version: serviceAppVersion, + State: &state, + Serializer: &serializer, + ScopeOfLocality: &localityType, + ConsumedLocalOnly: consumedLocalOnly, + TransportInfo: &smc.TransportInfo{ + Id: "sandboxTransport", + Name: "REST", + Type_: &transportType, + Protocol: "HTTP", + Version: "2.0", + Endpoint: &smc.OneOfTransportInfoEndpoint{}, + }, + SerCategory: &smc.CategoryRef{ + Href: "catalogueHref", + Id: "sssId", + Name: serviceCategory, + Version: "v1", + }, + } + srvInfo.TransportInfo.Endpoint.Uris = append(srvInfo.TransportInfo.Endpoint.Uris, hostUrl.String()+basePath) + + appServicesPostResponse, _, err := svcMgmtClient.MecServiceMgmtApi.AppServicesPOST(context.TODO(), srvInfo, appInstanceId) + if err != nil { + log.Error("Failed to register the service to app enablement registry: ", err) + return err + } + log.Info("Application Enablement Service instance Id: ", appServicesPostResponse.SerInstanceId) + appEnablementServiceId = appServicesPostResponse.SerInstanceId + return nil +} + +func sendReadyConfirmation(appInstanceId string) error { + var appReady asc.AppReadyConfirmation + appReady.Indication = "READY" + _, err := appSupportClient.MecAppSupportApi.ApplicationsConfirmReadyPOST(context.TODO(), appReady, appInstanceId) + if err != nil { + log.Error("Failed to send a ready confirm acknowlegement: ", err) + return err + } + return nil +} + +func sendTerminationConfirmation(appInstanceId string) error { + var appTermination asc.AppTerminationConfirmation + operationAction := asc.TERMINATING_OperationActionType + appTermination.OperationAction = &operationAction + _, err := appSupportClient.MecAppSupportApi.ApplicationsConfirmTerminationPOST(context.TODO(), appTermination, appInstanceId) + if err != nil { + log.Error("Failed to send a confirm termination acknowlegement: ", err) + return err + } + return nil +} + +func subscribeAppTermination(appInstanceId string) error { + var sub asc.AppTerminationNotificationSubscription + sub.SubscriptionType = "AppTerminationNotificationSubscription" + sub.AppInstanceId = appInstanceId + if mepName == defaultMepName { + sub.CallbackReference = "http://" + moduleName + "/" + sssBasePath + appTerminationPath + } else { + sub.CallbackReference = "http://" + mepName + "-" + moduleName + "/" + sssBasePath + appTerminationPath + } + subscription, _, err := appSupportClient.MecAppSupportApi.ApplicationsSubscriptionsPOST(context.TODO(), sub, appInstanceId) + if err != nil { + log.Error("Failed to register to App Support subscription: ", err) + return err + } + appTermSubLink := subscription.Links.Self.Href + appTermSubId = appTermSubLink[strings.LastIndex(appTermSubLink, "/")+1:] + return nil +} + +func unsubscribeAppTermination(appInstanceId string, subId string) error { + //only subscribe to one subscription, so we force number to be one, couldn't be anything else + _, err := appSupportClient.MecAppSupportApi.ApplicationsSubscriptionDELETE(context.TODO(), appInstanceId, subId) + if err != nil { + log.Error("Failed to unregister to App Support subscription: ", err) + return err + } + return nil +} + +func mec011AppTerminationPost(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + + var notification AppTerminationNotification + decoder := json.NewDecoder(r.Body) + err := decoder.Decode(¬ification) + if err != nil { + log.Error(err.Error()) + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + if !appEnablementEnabled { + //just ignore the message + w.WriteHeader(http.StatusNoContent) + return + } + + go func() { + // Wait to allow app termination response to be sent + time.Sleep(20 * time.Millisecond) + + // Deregister service + _ = deregisterService(serviceAppInstanceId, appEnablementServiceId) + + // Delete subscriptions + _ = unsubscribeAppTermination(serviceAppInstanceId, appTermSubId) + + // Confirm App termination if necessary + if sendAppTerminationWhenDone { + _ = sendTerminationConfirmation(serviceAppInstanceId) + } + }() + + w.WriteHeader(http.StatusNoContent) +} + +// Init - IOT Service initialization +func Init() (err error) { + + // Retrieve Instance ID from environment variable if present + instanceIdEnv := strings.TrimSpace(os.Getenv("MEEP_INSTANCE_ID")) + if instanceIdEnv != "" { + instanceId = instanceIdEnv + } + log.Info("MEEP_INSTANCE_ID: ", instanceId) + + // Retrieve Instance Name from environment variable + instanceName = moduleName + instanceNameEnv := strings.TrimSpace(os.Getenv("MEEP_POD_NAME")) + if instanceNameEnv != "" { + instanceName = instanceNameEnv + } + log.Info("MEEP_POD_NAME: ", instanceName) + + // Retrieve Sandbox name from environment variable + sandboxNameEnv := strings.TrimSpace(os.Getenv("MEEP_SANDBOX_NAME")) + if sandboxNameEnv != "" { + sandboxName = sandboxNameEnv + } + if sandboxName == "" { + err = errors.New("MEEP_SANDBOX_NAME env variable not set") + log.Error(err.Error()) + return err + } + log.Info("MEEP_SANDBOX_NAME: ", sandboxName) + + // hostUrl is the url of the node serving the resourceURL + // Retrieve public url address where service is reachable, if not present, use Host URL environment variable + hostUrl, err = url.Parse(strings.TrimSpace(os.Getenv("MEEP_PUBLIC_URL"))) + if err != nil || hostUrl == nil || hostUrl.String() == "" { + hostUrl, err = url.Parse(strings.TrimSpace(os.Getenv("MEEP_HOST_URL"))) + if err != nil { + hostUrl = new(url.URL) + } + } + log.Info("MEEP_HOST_URL: ", hostUrl) + + // Get MEP name + mepNameEnv := strings.TrimSpace(os.Getenv("MEEP_MEP_NAME")) + if mepNameEnv != "" { + mepName = mepNameEnv + } + log.Info("MEEP_MEP_NAME: ", mepName) + + // Get App Enablement URL + appEnablementEnabled = false + appEnablementEnv := strings.TrimSpace(os.Getenv("MEEP_APP_ENABLEMENT")) + if appEnablementEnv != "" { + appEnablementUrl = "http://" + appEnablementEnv + appEnablementEnabled = true + } + log.Info("MEEP_APP_ENABLEMENT: ", appEnablementUrl) + + // Get scope of locality + scopeOfLocalityEnv := strings.TrimSpace(os.Getenv("MEEP_SCOPE_OF_LOCALITY")) + if scopeOfLocalityEnv != "" { + scopeOfLocality = scopeOfLocalityEnv + } + log.Info("MEEP_SCOPE_OF_LOCALITY: ", scopeOfLocality) + + // Get local consumption + consumedLocalOnlyEnv := strings.TrimSpace(os.Getenv("MEEP_CONSUMED_LOCAL_ONLY")) + if consumedLocalOnlyEnv != "" { + value, err := strconv.ParseBool(consumedLocalOnlyEnv) + if err == nil { + consumedLocalOnly = value + } + } + log.Info("MEEP_CONSUMED_LOCAL_ONLY: ", consumedLocalOnly) + + // Get locality + localityEnv := strings.TrimSpace(os.Getenv("MEEP_LOCALITY")) + if localityEnv != "" { + locality = strings.Split(localityEnv, ":") + } + log.Info("MEEP_LOCALITY: ", locality) + + // Set base path + if mepName == defaultMepName { + basePath = "/" + sandboxName + "/" + sssBasePath + } else { + basePath = "/" + sandboxName + "/" + mepName + "/" + sssBasePath + } + + // Set base storage key + baseKey = dkm.GetKeyRoot(sandboxName) + sssKey + ":mep:" + mepName + ":" + + // Connect to Redis DB (IOT_DB) + rc, err = redis.NewConnector(redisAddr, IOT_DB) + if err != nil { + log.Error("Failed connection to Redis DB (IOT_DB). Error: ", err) + return err + } + _ = rc.DBFlush(baseKey) + log.Info("Connected to Redis DB, IOT service table") + + // Initialize SBI + sbiCfg := sbi.SbiCfg{ + ModuleName: moduleName, + SandboxName: sandboxName, + RedisAddr: redisAddr, + Locality: locality, + ScenarioNameCb: updateStoreName, + CleanUpCb: cleanUp, + } + if mepName != defaultMepName { + sbiCfg.MepName = mepName + } + err = sbi.Init(sbiCfg) + if err != nil { + log.Error("Failed initialize SBI. Error: ", err) + return err + } + log.Info("SBI Initialized") + + // Create App Enablement REST clients + if appEnablementEnabled { + // Create Sandbox Controller client + sbxCtrlClientCfg := scc.NewConfiguration() + sbxCtrlClientCfg.BasePath = sbxCtrlUrl + "/sandbox-ctrl/v1" + sbxCtrlClient = scc.NewAPIClient(sbxCtrlClientCfg) + if sbxCtrlClient == nil { + return errors.New("Failed to create Sandbox Controller REST API client") + } + log.Info("Create Sandbox Controller REST API client") + + // Create App Support client + appSupportClientCfg := asc.NewConfiguration() + appSupportClientCfg.BasePath = appEnablementUrl + "/mec_app_support/v2" + appSupportClient = asc.NewAPIClient(appSupportClientCfg) + if appSupportClient == nil { + return errors.New("Failed to create App Enablement App Support REST API client") + } + log.Info("Create App Enablement App Support REST API client") + + // Create App Info client + srvMgmtClientCfg := smc.NewConfiguration() + srvMgmtClientCfg.BasePath = appEnablementUrl + "/mec_service_mgmt/v1" + svcMgmtClient = smc.NewAPIClient(srvMgmtClientCfg) + if svcMgmtClient == nil { + return errors.New("Failed to create App Enablement Service Management REST API client") + } + log.Info("Create App Enablement Service Management REST API client") + } + + log.Info("IOT successfully initialized") + return nil +} + +// Run - Start IOT +func Run() (err error) { + // Start MEC Service registration ticker + if appEnablementEnabled { + startRegistrationTicker() + } + return sbi.Run() +} + +// Stop - Stop IOT +func Stop() (err error) { + // Stop MEC Service registration ticker + if appEnablementEnabled { + stopRegistrationTicker() + } + return sbi.Stop() +} + +func startRegistrationTicker() { + // Make sure ticker is not running + if registrationTicker != nil { + log.Warn("Registration ticker already running") + return + } + + // Wait a few seconds to allow App Enablement Service to start. + // This is done to avoid the default 20 second TCP socket connect timeout + // if the App Enablement Service is not yet running. + log.Info("Waiting for App Enablement Service to start") + time.Sleep(5 * time.Second) + + // Start registration ticker + registrationTicker = time.NewTicker(5 * time.Second) + go func() { + mecAppReadySent := false + registrationSent := false + subscriptionSent := false + for range registrationTicker.C { + // Get Application instance ID + if serviceAppInstanceId == "" { + // If a sandbox service, request an app instance ID from Sandbox Controller + // Otherwise use the scenario-proiotioned instance ID + if mepName == defaultMepName { + var err error + serviceAppInstanceId, err = getAppInstanceId() + if err != nil || serviceAppInstanceId == "" { + continue + } + } else { + serviceAppInstanceId = instanceId + } + } + + // Send App Ready message + if !mecAppReadySent { + err := sendReadyConfirmation(serviceAppInstanceId) + if err != nil { + log.Error("Failure when sending the MecAppReady message. Error: ", err) + continue + } + mecAppReadySent = true + } + + // Register service instance + if !registrationSent { + err := registerService(serviceAppInstanceId) + if err != nil { + log.Error("Failed to register to appEnablement DB, keep trying. Error: ", err) + continue + } + registrationSent = true + } + + // Register for graceful termination + if !subscriptionSent { + err := subscribeAppTermination(serviceAppInstanceId) + if err != nil { + log.Error("Failed to subscribe to graceful termination. Error: ", err) + continue + } + sendAppTerminationWhenDone = true + subscriptionSent = true + } + + if mecAppReadySent && registrationSent && subscriptionSent { + + // Registration complete + log.Info("Successfully registered with App Enablement Service") + stopRegistrationTicker() + return + } + } + }() +} + +func stopRegistrationTicker() { + if registrationTicker != nil { + log.Info("Stopping App Enablement registration ticker") + registrationTicker.Stop() + registrationTicker = nil + } +} + +func cleanUp() { + log.Info("Terminate all") + + // Flush all service data + rc.DBFlush(baseKey) + + // Reset metrics store name + updateStoreName("") +} + +func updateStoreName(storeName string) { + log.Debug(">>> updateStoreName: ", storeName) + + if currentStoreName != storeName { + currentStoreName = storeName + + logComponent := moduleName + if mepName != defaultMepName { + logComponent = moduleName + "-" + mepName + } + err := httpLog.ReInit(logComponent, sandboxName, storeName, redisAddr, influxAddr) + if err != nil { + log.Error("Failed to initialise httpLog: ", err) + return + } + } +} + +/* + * errHandlerProblemDetails sends an error message + * @param {struct} HTTP write reference + * @param {string} error contains the error message + * @param {int} code contains the error code + */ +func errHandlerProblemDetails(w http.ResponseWriter, error string, code int) { + var pb ProblemDetails + pb.Detail = error + pb.Status = int32(code) + + jsonResponse := convertProblemDetailstoJson(&pb) + + w.WriteHeader(code) + fmt.Fprint(w, jsonResponse) +} + +func sensorDiscoveryLookupGET(w http.ResponseWriter, r *http.Request) { + log.Debug(">>> sensorDiscoveryLookupGET: ", r) + + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + + vars := mux.Vars(r) + log.Debug("sensorDiscoveryLookupGET: vars: ", vars) + + iotPlatformIdParamStr := vars["registeredIotPlatformId"] + log.Debug("sensorDiscoveryLookupGET: iotPlatformIdParamStr: ", iotPlatformIdParamStr) + + w.WriteHeader(http.StatusOK) +} + +func sensorDiscoverySubscriptionGET(w http.ResponseWriter, r *http.Request) { + log.Debug(">>> sensorDiscoverySubscriptionGET: ", r) + + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + + err := errors.New("Not implemented") + errHandlerProblemDetails(w, err.Error(), http.StatusNotImplemented) +} diff --git a/go-apps/meep-sss/server/model_app_termination_notification.go b/go-apps/meep-sss/server/model_app_termination_notification.go new file mode 100644 index 0000000000000000000000000000000000000000..50ded34cc8b9d7b998e0cac7823cc733575294cf --- /dev/null +++ b/go-apps/meep-sss/server/model_app_termination_notification.go @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * AdvantEDGE V2X Information Service REST API + * + * V2X Information Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC030 V2XI API](.https://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/03.02.01_60/yright (c) ETSI 2024](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-vis](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-vis)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of VIS API endpoints (see below) and a subset of subscription types. + * + * API version: 3.2.2 + * Contact: AdvantEDGE@InterDigital.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// This type represents the information that the MEC platform notifies the subscribed application instance about the corresponding application instance termination/stop. +type AppTerminationNotification struct { + // Shall be set to AppTerminationNotification. + NotificationType string `json:"notificationType"` + + OperationAction *OperationActionType `json:"operationAction"` + // Maximum timeout value in seconds for graceful termination or graceful stop of an application instance. + MaxGracefulTimeout int32 `json:"maxGracefulTimeout"` + + Links *AppTerminationNotificationLinks `json:"_links"` +} diff --git a/go-apps/meep-sss/server/model_app_termination_notification__links.go b/go-apps/meep-sss/server/model_app_termination_notification__links.go new file mode 100644 index 0000000000000000000000000000000000000000..8cefa51894114feb0184996c12c7f95d94b8cb66 --- /dev/null +++ b/go-apps/meep-sss/server/model_app_termination_notification__links.go @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * AdvantEDGE V2X Information Service REST API + * + * V2X Information Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC030 V2XI API](.https://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/03.02.01_60/) ETSI 2024](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-vis](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-vis)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of VIS API endpoints (see below) and a subset of subscription types. + * + * API version: 3.2.2 + * Contact: AdvantEDGE@InterDigital.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// Object containing hyperlinks related to the resource. +type AppTerminationNotificationLinks struct { + Subscription *LinkType `json:"subscription"` + + ConfirmTermination *LinkType `json:"confirmTermination,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_area_info.go b/go-apps/meep-sss/server/model_area_info.go new file mode 100644 index 0000000000000000000000000000000000000000..df29f04a2c142ba7b927211e1f6fd64faad9b9cc --- /dev/null +++ b/go-apps/meep-sss/server/model_area_info.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type AreaInfo struct { + Shape *ShapeType `json:"shape"` + // Shall include one point if the shape is CIRCLE. Shall include 3-15 points if the shape is POLYGON + Points []Point `json:"points"` + // Shall be present if the shape is CIRCLE + Radius int32 `json:"radius,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_link_type.go b/go-apps/meep-sss/server/model_link_type.go new file mode 100644 index 0000000000000000000000000000000000000000..711c5bfe311d6b4470404cc35f550cd2236e117a --- /dev/null +++ b/go-apps/meep-sss/server/model_link_type.go @@ -0,0 +1,16 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// 'This data type represents a type of link' +type LinkType struct { + // The URI referring to the subscription. + Href string `json:"href"` +} diff --git a/go-apps/meep-sss/server/model_operation_action_type.go b/go-apps/meep-sss/server/model_operation_action_type.go new file mode 100644 index 0000000000000000000000000000000000000000..17f93c981b27a80b22cdc85b5eeb6d2b77ffd9af --- /dev/null +++ b/go-apps/meep-sss/server/model_operation_action_type.go @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * AdvantEDGE V2X Information Service REST API + * + * V2X Information Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC030 V2XI API](.https://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/03.02.01_60/)

[Copyright (c) ETSI 2024](https://forge.etsi.org/etsi-forge-copyright-notice.txt)

**Micro-service**
[meep-vis](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-vis)

**Type & Usage**
Edge Service used by edge applications that want to get information about radio conditions in the network

**Note**
AdvantEDGE supports a selected subset of VIS API endpoints (see below) and a subset of subscription types. + * + * API version: 3.2.2 + * Contact: AdvantEDGE@InterDigital.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// OperationActionType : Operation that is being performed on the MEC application instance. +type OperationActionType string + +// List of OperationActionType +const ( + STOPPING_OperationActionType OperationActionType = "STOPPING" + TERMINATING_OperationActionType OperationActionType = "TERMINATING" +) diff --git a/go-apps/meep-sss/server/model_point.go b/go-apps/meep-sss/server/model_point.go new file mode 100644 index 0000000000000000000000000000000000000000..0478bf6da56b91935396e3ca4f0999be1ac4da12 --- /dev/null +++ b/go-apps/meep-sss/server/model_point.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// This type represents the geographical location of a point +type Point struct { + // Location latitude, expressed in the range -90° to +90° + Latitude float64 `json:"latitude"` + // Location longitude, expressed in the range -180° to +180°. + Longitude float64 `json:"longitude"` +} diff --git a/go-apps/meep-sss/server/model_problem_details.go b/go-apps/meep-sss/server/model_problem_details.go new file mode 100644 index 0000000000000000000000000000000000000000..3b2e107fb4509beec55f269d2436e3b7ae2077c8 --- /dev/null +++ b/go-apps/meep-sss/server/model_problem_details.go @@ -0,0 +1,23 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type ProblemDetails struct { + // A URI reference according to IETF RFC 3986 that identifies the problem type + Type_ string `json:"type,omitempty"` + // A short, human-readable summary of the problem type + Title string `json:"title,omitempty"` + // The HTTP status code for this occurrence of the problem + Status int32 `json:"status,omitempty"` + // A human-readable explanation specific to this occurrence of the problem + Detail string `json:"detail,omitempty"` + // A URI reference that identifies the specific occurrence of the problem + Instance string `json:"instance,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_sensor_characteristic.go b/go-apps/meep-sss/server/model_sensor_characteristic.go new file mode 100644 index 0000000000000000000000000000000000000000..6e49441512dc04b3ff489420c4aedd4e3c994793 --- /dev/null +++ b/go-apps/meep-sss/server/model_sensor_characteristic.go @@ -0,0 +1,20 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// This type represents a sensor' characteristic which details the type of sensor and its working functionalities, such as the model of the sensor, the sampling frequency, the operating range, the accuracy +type SensorCharacteristic struct { + // The name of the characteristic + CharacteristicName string `json:"characteristicName"` + // The value of the characteristic. + CharacteristicValue string `json:"characteristicValue"` + // The unit of measure of the characteristic (see saref:UnitOfMeasure in ETSI TS 103 264 [4], clause 4.3.8). + CharacteristicUnitOfMeasure string `json:"characteristicUnitOfMeasure,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_sensor_data.go b/go-apps/meep-sss/server/model_sensor_data.go new file mode 100644 index 0000000000000000000000000000000000000000..dbe6f942c99260ff3bb47f552623dae027da7cec --- /dev/null +++ b/go-apps/meep-sss/server/model_sensor_data.go @@ -0,0 +1,23 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SensorData struct { + // Unique identifier of the sensor + SensorIdentifier string `json:"sensorIdentifier"` + // The status of the sensor + Data string `json:"data"` + // String explaining the error of the sensor + DataFormat string `json:"dataFormat"` + // String explaining the error of the sensor + DataUnitOfMeasure string `json:"dataUnitOfMeasure"` + + DataTimestamp *TimeStamp `json:"dataTimestamp,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_sensor_data_subscription.go b/go-apps/meep-sss/server/model_sensor_data_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..168f6b43885e63555dd648f882395747e1f2ba86 --- /dev/null +++ b/go-apps/meep-sss/server/model_sensor_data_subscription.go @@ -0,0 +1,24 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SensorDataSubscription struct { + SubscriptionType *SubscriptionType `json:"subscriptionType"` + // URI exposed by the client on which to receive notifications via HTTP + CallbackReference string `json:"callbackReference,omitempty"` + // Set to TRUE by the MEC application to request a test notification via HTTP on the callbackReference URI, + RequestTestNotification bool `json:"requestTestNotification,omitempty"` + + WebsockNotifConfig *WebsockNotifConfig `json:"websockNotifConfig,omitempty"` + + Links *SubscriptionLinks `json:"_links,omitempty"` + + ExpiryDeadline *TimeStamp `json:"expiryDeadline,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_sensor_discovery_event_subscription.go b/go-apps/meep-sss/server/model_sensor_discovery_event_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..457d61c6a88ff9d74ff49c6d138a8c91815610ef --- /dev/null +++ b/go-apps/meep-sss/server/model_sensor_discovery_event_subscription.go @@ -0,0 +1,28 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SensorDiscoveryEventSubscription struct { + SubscriptionType *SubscriptionType `json:"subscriptionType"` + // URI exposed by the client on which to receive notifications via HTTP + CallbackReference string `json:"callbackReference,omitempty"` + // Set to TRUE by the MEC application to request a test notification via HTTP on the callbackReference URI, + RequestTestNotification bool `json:"requestTestNotification,omitempty"` + + WebsockNotifConfig *WebsockNotifConfig `json:"websockNotifConfig,omitempty"` + + Links *SubscriptionLinks `json:"_links,omitempty"` + // Object containing the characteristics of the sensor(s) to be selected for the subscription + SensorInfoList []string `json:"sensorInfoList,omitempty"` + // The parameters describing the area to subscribe + GeographicalArea []AreaInfo `json:"geographicalArea,omitempty"` + + ExpiryDeadline *TimeStamp `json:"expiryDeadline,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_sensor_discovery_info.go b/go-apps/meep-sss/server/model_sensor_discovery_info.go new file mode 100644 index 0000000000000000000000000000000000000000..b64da57abcec5f758c7da0f309136cd8fba58adf --- /dev/null +++ b/go-apps/meep-sss/server/model_sensor_discovery_info.go @@ -0,0 +1,23 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SensorDiscoveryInfo struct { + // Unique identifier of the sensor + SensorIdentifier string `json:"sensorIdentifier"` + // Type of the Sensor + SensorType string `json:"sensorType"` + // It indicates the list of properties that the sensor can sense + SensorPropertyList []string `json:"sensorPropertyList"` + // The sensor' characteristics + SensorCharacteristicList []SensorCharacteristic `json:"sensorCharacteristicList,omitempty"` + + SensorPosition *Point `json:"sensorPosition,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_sensor_discovery_subscription_id_body.go b/go-apps/meep-sss/server/model_sensor_discovery_subscription_id_body.go new file mode 100644 index 0000000000000000000000000000000000000000..7a854d77d74354e75132f9a166382c65e18b91f1 --- /dev/null +++ b/go-apps/meep-sss/server/model_sensor_discovery_subscription_id_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SensorDiscoverySubscriptionIdBody struct { + SensorDiscoveryEventSubscription *SensorDiscoveryEventSubscription `json:"SensorDiscoveryEventSubscription,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_sensor_info.go b/go-apps/meep-sss/server/model_sensor_info.go new file mode 100644 index 0000000000000000000000000000000000000000..ff90e2d520b20ef338d8890a1f90d2d965a84168 --- /dev/null +++ b/go-apps/meep-sss/server/model_sensor_info.go @@ -0,0 +1,21 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SensorInfo struct { + // Type of the sensor + Type_ string `json:"type"` + // It indicates the list of properties that the sensor can sense (see saref:Property in ETSI TS 103 264 [4], clause 4.3.8). + SensorPropertyList []string `json:"sensorPropertyList"` + // The sensor' characteristics to be matched + SensorCharacteristicList []SensorCharacteristic `json:"sensorCharacteristicList,omitempty"` + // The parameters describing the area + GeographicalArea []AreaInfo `json:"geographicalArea,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_sensor_status_info.go b/go-apps/meep-sss/server/model_sensor_status_info.go new file mode 100644 index 0000000000000000000000000000000000000000..1384d113a54116cac082039ad54e95b84d85ccda --- /dev/null +++ b/go-apps/meep-sss/server/model_sensor_status_info.go @@ -0,0 +1,19 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SensorStatusInfo struct { + // Unique identifier of the sensor + SensorIdentifier string `json:"sensorIdentifier"` + // The status of the sensor + SensorStatusType string `json:"sensorStatusType"` + // String explaining the error of the sensor + ErrorInformation string `json:"errorInformation,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_sensor_status_subscription.go b/go-apps/meep-sss/server/model_sensor_status_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..8b48fb5d6ff88b86bc3e9ba10e557395c0a30342 --- /dev/null +++ b/go-apps/meep-sss/server/model_sensor_status_subscription.go @@ -0,0 +1,24 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SensorStatusSubscription struct { + SubscriptionType *SubscriptionType `json:"subscriptionType"` + // URI exposed by the client on which to receive notifications via HTTP + CallbackReference string `json:"callbackReference,omitempty"` + // Set to TRUE by the MEC application to request a test notification via HTTP on the callbackReference URI, + RequestTestNotification bool `json:"requestTestNotification,omitempty"` + + WebsockNotifConfig *WebsockNotifConfig `json:"websockNotifConfig,omitempty"` + + Links *SubscriptionLinks `json:"_links,omitempty"` + + ExpiryDeadline *TimeStamp `json:"expiryDeadline,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_sensor_status_subscription_id_body.go b/go-apps/meep-sss/server/model_sensor_status_subscription_id_body.go new file mode 100644 index 0000000000000000000000000000000000000000..a0675e58a7af28d44b46ab9ad3d5c0a594bbe7c8 --- /dev/null +++ b/go-apps/meep-sss/server/model_sensor_status_subscription_id_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SensorStatusSubscriptionIdBody struct { + SensorStatusSubscription *SensorStatusSubscription `json:"SensorStatusSubscription,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_shape_type.go b/go-apps/meep-sss/server/model_shape_type.go new file mode 100644 index 0000000000000000000000000000000000000000..42eb43c68263ccc897a70a4c5fa86a599357d2a6 --- /dev/null +++ b/go-apps/meep-sss/server/model_shape_type.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type ShapeType int32 + +// List of ShapeType +const ( + CIRCLE_ShapeType ShapeType = 0 + POLYGON_ShapeType ShapeType = 0 +) diff --git a/go-apps/meep-sss/server/model_status_data_subscription_id_body.go b/go-apps/meep-sss/server/model_status_data_subscription_id_body.go new file mode 100644 index 0000000000000000000000000000000000000000..f6b6594b6a0a485869e7d20725293c33ad90228c --- /dev/null +++ b/go-apps/meep-sss/server/model_status_data_subscription_id_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type StatusDataSubscriptionIdBody struct { + SensorStatusSubscription *SensorDataSubscription `json:"SensorStatusSubscription,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_subscription_link_list.go b/go-apps/meep-sss/server/model_subscription_link_list.go new file mode 100644 index 0000000000000000000000000000000000000000..5511b21859b1def80c9669d0b42a98ff80962fba --- /dev/null +++ b/go-apps/meep-sss/server/model_subscription_link_list.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SubscriptionLinkList struct { + Links *SubscriptionLinkListLinks `json:"_links"` +} diff --git a/go-apps/meep-sss/server/model_subscription_link_list_links.go b/go-apps/meep-sss/server/model_subscription_link_list_links.go new file mode 100644 index 0000000000000000000000000000000000000000..a646573f50c66df31263899ad4348219919dfbbf --- /dev/null +++ b/go-apps/meep-sss/server/model_subscription_link_list_links.go @@ -0,0 +1,17 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// List of hyperlinks related to the resource. +type SubscriptionLinkListLinks struct { + Self *LinkType `json:"self"` + // The MEC application's subscriptions + Subscriptions []SubscriptionLinkListSubscription `json:"subscriptions,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_subscription_link_list_subscription.go b/go-apps/meep-sss/server/model_subscription_link_list_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..ca6adcac3f8028c3e3e61081a0e112207b71b1a5 --- /dev/null +++ b/go-apps/meep-sss/server/model_subscription_link_list_subscription.go @@ -0,0 +1,17 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SubscriptionLinkListSubscription struct { + // The URI referring to the subscription + Href string `json:"href"` + // Type of the subscription + SubscriptionType string `json:"subscriptionType"` +} diff --git a/go-apps/meep-sss/server/model_subscription_links.go b/go-apps/meep-sss/server/model_subscription_links.go new file mode 100644 index 0000000000000000000000000000000000000000..dacb811a1c3e2f8b5ee6b56b2e098063f500ae4a --- /dev/null +++ b/go-apps/meep-sss/server/model_subscription_links.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SubscriptionLinks struct { + Self *LinkType `json:"self"` +} diff --git a/go-apps/meep-sss/server/model_subscription_type.go b/go-apps/meep-sss/server/model_subscription_type.go new file mode 100644 index 0000000000000000000000000000000000000000..ca90c053ba4de0cc067cbddebca03635e48eada4 --- /dev/null +++ b/go-apps/meep-sss/server/model_subscription_type.go @@ -0,0 +1,19 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SubscriptionType string + +// List of SubscriptionType +const ( + SENSOR_DISCOVERY_EVENT_SUBSCRIPTION SubscriptionType = "SensorDiscoveryEventSubscription" + SENSOR_STATUS_SUBSCRIPTION SubscriptionType = "SensorStatusSubscription" + SENSOR_DATA_SUBSCRIPTION SubscriptionType = "SensorDataSubscription" +) diff --git a/go-apps/meep-sss/server/model_subscriptions_sensor_data_body.go b/go-apps/meep-sss/server/model_subscriptions_sensor_data_body.go new file mode 100644 index 0000000000000000000000000000000000000000..e1b819ba94c8eecf3313952b6a00b218f7a67c12 --- /dev/null +++ b/go-apps/meep-sss/server/model_subscriptions_sensor_data_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SubscriptionsSensorDataBody struct { + SensorDataSubscription *SensorDataSubscription `json:"SensorDataSubscription,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_subscriptions_sensor_discovery_body.go b/go-apps/meep-sss/server/model_subscriptions_sensor_discovery_body.go new file mode 100644 index 0000000000000000000000000000000000000000..721b853da74c83c8316160b985337f571d57ebe8 --- /dev/null +++ b/go-apps/meep-sss/server/model_subscriptions_sensor_discovery_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SubscriptionsSensorDiscoveryBody struct { + SensorDiscoveryEventSubscription *SensorDiscoveryEventSubscription `json:"SensorDiscoveryEventSubscription,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_subscriptions_sensor_status_body.go b/go-apps/meep-sss/server/model_subscriptions_sensor_status_body.go new file mode 100644 index 0000000000000000000000000000000000000000..a233916c5a6def42062c097c2dab81913b3f926f --- /dev/null +++ b/go-apps/meep-sss/server/model_subscriptions_sensor_status_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type SubscriptionsSensorStatusBody struct { + SensorStatusSubscription *SensorStatusSubscription `json:"SensorStatusSubscription,omitempty"` +} diff --git a/go-apps/meep-sss/server/model_time_stamp.go b/go-apps/meep-sss/server/model_time_stamp.go new file mode 100644 index 0000000000000000000000000000000000000000..079043c87a23b65e4f17ff0edfa6122302d3bd3f --- /dev/null +++ b/go-apps/meep-sss/server/model_time_stamp.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +// 'This data type represents the time stamp as Unix-time since January 1, 1970, 00:00:00 UTC' +type TimeStamp struct { + // 'The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.' + Seconds int32 `json:"seconds"` + // 'The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.' + NanoSeconds int32 `json:"nanoSeconds"` +} diff --git a/go-apps/meep-sss/server/model_websock_notif_config.go b/go-apps/meep-sss/server/model_websock_notif_config.go new file mode 100644 index 0000000000000000000000000000000000000000..dfa89d144bfe777e412d3abc9a9316b79d6b9e62 --- /dev/null +++ b/go-apps/meep-sss/server/model_websock_notif_config.go @@ -0,0 +1,17 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +type WebsockNotifConfig struct { + // Set by AMS to indicate to the service consumer the Websocket URI to be used for delivering notifications. + WebsocketUri string `json:"websocketUri,omitempty"` + // Set to true by the service consumer to indicate that Websocket delivery is requested. + RequestWebsocketUri bool `json:"requestWebsocketUri,omitempty"` +} diff --git a/go-apps/meep-sss/server/routers.go b/go-apps/meep-sss/server/routers.go new file mode 100644 index 0000000000000000000000000000000000000000..b45f68e95ef7d10b948b9cd4cbe6ecf6ecf3daf1 --- /dev/null +++ b/go-apps/meep-sss/server/routers.go @@ -0,0 +1,222 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package server + +import ( + "fmt" + "net/http" + "strings" + + httpLog "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-http-logger" + met "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-metrics" + + "github.com/gorilla/mux" +) + +type Route struct { + Name string + Method string + Pattern string + HandlerFunc http.HandlerFunc +} + +type Routes []Route + +func NewRouter() *mux.Router { + var handler http.Handler + router := mux.NewRouter().StrictSlash(true) + for _, route := range routes { + handler = route.HandlerFunc + handler = Logger(handler, route.Name) + handler = met.MetricsHandler(handler, sandboxName, serviceName) + handler = httpLog.LogRx(handler) + router. + Methods(route.Method). + Path(route.Pattern). + Name(route.Name). + Handler(handler) + } + + // Path prefix router order is important + // Service Api files + handler = http.StripPrefix("/sens/v1/api/", http.FileServer(http.Dir("./api/"))) + router. + PathPrefix("/sens/v1/api/"). + Name("Api"). + Handler(handler) + // User supplied service API files + handler = http.StripPrefix("/sens/v1/user-api/", http.FileServer(http.Dir("./user-api/"))) + router. + PathPrefix("/sens/v1/user-api/"). + Name("UserApi"). + Handler(handler) + + return router +} + +func Index(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Hello World!") +} + +var routes = Routes{ + Route{ + "Index", + "GET", + "/sandboxname/sens/v1/", + Index, + }, + + Route{ + "SensorMgmtPUT", + strings.ToUpper("Put"), + "/sandboxname/sens/v1/sensor_management", + SensorMgmtPUT, + }, + + Route{ + "SensorDataLookupGET", + strings.ToUpper("Get"), + "/sandboxname/sens/v1/queries/status_data", + SensorDataLookupGET, + }, + + Route{ + "SensorDataIndividualSubscriptionGET", + strings.ToUpper("Get"), + "/sandboxname/sens/v1/queries/status_data/{subscriptionId}", + SensorDataIndividualSubscriptionGET, + }, + + Route{ + "SensorDataSubscriptionDELETE", + strings.ToUpper("Delete"), + "/sandboxname/sens/v1/queries/status_data/{subscriptionId}", + SensorDataSubscriptionDELETE, + }, + + Route{ + "SensorDataSubscriptionGET", + strings.ToUpper("Get"), + "/sandboxname/sens/v1/subscriptions/sensor_data", + SensorDataSubscriptionGET, + }, + + Route{ + "SensorDataSubscriptionPOST", + strings.ToUpper("Post"), + "/sandboxname/sens/v1/subscriptions/sensor_data", + SensorDataSubscriptionPOST, + }, + + Route{ + "SensorDataSubscriptionPUT", + strings.ToUpper("Put"), + "/sandboxname/sens/v1/queries/status_data/{subscriptionId}", + SensorDataSubscriptionPUT, + }, + + Route{ + "SensorDiscoveryLookupGET", + strings.ToUpper("Get"), + "/sandboxname/sens/v1/queries/sensor_discovery", + SensorDiscoveryLookupGET, + }, + + Route{ + "SensorDiscoveryIndividualSubscriptionGET", + strings.ToUpper("Get"), + "/sandboxname/sens/v1/subscriptions/sensor_discovery/{subscriptionId}", + SensorDiscoveryIndividualSubscriptionGET, + }, + + Route{ + "SensorDiscoverySubscriptionDELETE", + strings.ToUpper("Delete"), + "/sandboxname/sens/v1/subscriptions/sensor_discovery/{subscriptionId}", + SensorDiscoverySubscriptionDELETE, + }, + + Route{ + "SensorDiscoverySubscriptionGET", + strings.ToUpper("Get"), + "/sandboxname/sens/v1/subscriptions/sensor_discovery", + SensorDiscoverySubscriptionGET, + }, + + Route{ + "SensorDiscoverySubscriptionPOST", + strings.ToUpper("Post"), + "/sandboxname/sens/v1/subscriptions/sensor_discovery", + SensorDiscoverySubscriptionPOST, + }, + + Route{ + "SensorDiscoverySubscriptionPUT", + strings.ToUpper("Put"), + "/sandboxname/sens/v1/subscriptions/sensor_discovery/{subscriptionId}", + SensorDiscoverySubscriptionPUT, + }, + + Route{ + "SensorMgmtGET", + strings.ToUpper("Get"), + "/sandboxname/sens/v1/sensor_management", + SensorMgmtGET, + }, + + Route{ + "SensorStatusLookupGET", + strings.ToUpper("Get"), + "/sandboxname/sens/v1/queries/sensor_status", + SensorStatusLookupGET, + }, + + Route{ + "SensorSatusIndividualSubscriptionGET", + strings.ToUpper("Get"), + "/sandboxname/sens/v1/subscriptions/sensor_status/{subscriptionId}", + SensorSatusIndividualSubscriptionGET, + }, + + Route{ + "SensorStatusIndividualSubscriptionGET", + strings.ToUpper("Get"), + "/sandboxname/sens/v1/subscriptions/sensor_status", + SensorStatusIndividualSubscriptionGET, + }, + + Route{ + "SensorStatusSubscriptionDELETE", + strings.ToUpper("Delete"), + "/sandboxname/sens/v1/subscriptions/sensor_status/{subscriptionId}", + SensorStatusSubscriptionDELETE, + }, + + Route{ + "SensorStatusSubscriptionPUT", + strings.ToUpper("Put"), + "/sandboxname/sens/v1/subscriptions/sensor_status/{subscriptionId}", + SensorStatusSubscriptionPUT, + }, + + Route{ + "SensorStatusSubscriptionPOST", + strings.ToUpper("Post"), + "/sandboxname/sens/v1/subscriptions/sensor_status", + SensorStatusSubscriptionPOST, + }, + + Route{ + "Mec011AppTerminationPOST", + strings.ToUpper("Post"), + "/sens/v1/notifications/mec046/appTermination", + Mec011AppTerminationPOST, + }, +} diff --git a/go-apps/meep-virt-engine/entrypoint.sh b/go-apps/meep-virt-engine/entrypoint.sh index 0eb84b7a20590a29dbb5ae78d33f3d4cbb634c81..b24fd7242ac98a1c440be02265fbe7ad2da3be4a 100755 --- a/go-apps/meep-virt-engine/entrypoint.sh +++ b/go-apps/meep-virt-engine/entrypoint.sh @@ -20,6 +20,8 @@ mv /meep-ams /templates/sandbox/meep-ams mv /meep-sandbox-ctrl /templates/sandbox/meep-sandbox-ctrl mv /meep-tc-engine /templates/sandbox/meep-tc-engine mv /meep-vis /templates/sandbox/meep-vis +mv /meep-iot /templates/sandbox/meep-iot +mv /meep-sss /templates/sandbox/meep-sss mv /meep-dai /templates/sandbox/meep-dai mv /meep-tm /templates/sandbox/meep-tm diff --git a/go-packages/meep-applications/application-store.go b/go-packages/meep-applications/application-store.go index a239ecd709bc7cdb8524a6ac4f920455c7d4f4fd..779c7184eecd0a58ddd18567239db575628e2d92 100644 --- a/go-packages/meep-applications/application-store.go +++ b/go-packages/meep-applications/application-store.go @@ -69,7 +69,7 @@ type ApplicationStore struct { mutex sync.Mutex } -var SysAppNames []string = []string{"meep-app-enablement", "meep-ams", "meep-loc-serv", "meep-dai", "meep-rnis", "meep-federation", "meep-wais", "meep-vis"} +var SysAppNames []string = []string{"meep-app-enablement", "meep-ams", "meep-loc-serv", "meep-dai", "meep-rnis", "meep-federation", "meep-wais", "meep-vis", "meep-iot", "meep-sss"} // NewApplicationStore - Creates and initialize an Application Store instance func NewApplicationStore(cfg *ApplicationStoreCfg) (as *ApplicationStore, err error) { diff --git a/go-packages/meep-iot-client/.gitignore b/go-packages/meep-iot-client/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..daf913b1b347aae6de6f48d599bc89ef8c8693d6 --- /dev/null +++ b/go-packages/meep-iot-client/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/go-packages/meep-iot-client/.swagger-codegen-ignore b/go-packages/meep-iot-client/.swagger-codegen-ignore new file mode 100644 index 0000000000000000000000000000000000000000..c5fa491b4c557bf997d5dd21797de782545dc9e5 --- /dev/null +++ b/go-packages/meep-iot-client/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/go-packages/meep-iot-client/.swagger-codegen/VERSION b/go-packages/meep-iot-client/.swagger-codegen/VERSION new file mode 100644 index 0000000000000000000000000000000000000000..0667b5ffc7ae803493efb90a1f4ee6224b1f6a17 --- /dev/null +++ b/go-packages/meep-iot-client/.swagger-codegen/VERSION @@ -0,0 +1 @@ +3.0.29 \ No newline at end of file diff --git a/go-packages/meep-iot-client/.travis.yml b/go-packages/meep-iot-client/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..f5cb2ce9a5aad73c57eed886e845d2e79c2899d1 --- /dev/null +++ b/go-packages/meep-iot-client/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/go-packages/meep-iot-client/README.md b/go-packages/meep-iot-client/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b7c10a4112b6f85fb27010d77121ba44bf74257c --- /dev/null +++ b/go-packages/meep-iot-client/README.md @@ -0,0 +1,72 @@ +# Go API client for swagger + +ETSI GS MEC 033 IoT API described using OpenAPI. + +## Overview +This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. + +- API version: 3.1.1 +- Package version: 1.0.0 +- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen +For more information, please visit [https://forge.etsi.org/rep/mec/gs021-amsi-api](https://forge.etsi.org/rep/mec/gs021-amsi-api) + +## Installation +Put the package under your project folder and add the following in import: +```golang +import "./swagger" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://localhost/sandboxname/sandboxname/amsi/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*RegDevApi* | [**RegistereddevicesByIdDELETE**](docs/RegDevApi.md#registereddevicesbyiddelete) | **Delete** /registered_devices/{registeredDeviceId} | Deregister a device - see clause 5.2.6. +*RegDevApi* | [**RegistereddevicesByIdGET**](docs/RegDevApi.md#registereddevicesbyidget) | **Get** /registered_devices/{registeredDeviceId} | Retrieve information about a device - see clause 5.2.4. +*RegDevApi* | [**RegistereddevicesByIdPUT**](docs/RegDevApi.md#registereddevicesbyidput) | **Put** /registered_devices/{registeredDeviceId} | Update information about a device including its association to a valid traffic rule - see clauses 5.2.5 and 5.4.3. +*RegDevApi* | [**RegistereddevicesGET**](docs/RegDevApi.md#registereddevicesget) | **Get** /registered_devices | Retrieve information about all devices with a valid traffic rule association - see clause 5.2.2. +*RegDevApi* | [**RegistereddevicesPOST**](docs/RegDevApi.md#registereddevicespost) | **Post** /registered_devices | Register a new device - see clause 5.2.3. +*RegIotPlatApi* | [**RegisterediotplatformsByIdDELETE**](docs/RegIotPlatApi.md#registerediotplatformsbyiddelete) | **Delete** /registered_iot_platforms/{registeredIotPlatformId} | Deregister a IoT platform - see clause 5.3.6. +*RegIotPlatApi* | [**RegisterediotplatformsByIdGET**](docs/RegIotPlatApi.md#registerediotplatformsbyidget) | **Get** /registered_iot_platforms/{registeredIotPlatformId} | Discover native services and obtain information about user transports provided by a IoT platform - see clauses 5.3.3 and 5.4.2. +*RegIotPlatApi* | [**RegisterediotplatformsByIdPUT**](docs/RegIotPlatApi.md#registerediotplatformsbyidput) | **Put** /registered_iot_platforms/{registeredIotPlatformId} | Update information about a IoT platform - see clause 5.3.5. +*RegIotPlatApi* | [**RegisterediotplatformsGET**](docs/RegIotPlatApi.md#registerediotplatformsget) | **Get** /registered_iot_platforms | Retrieve information about all IoT platforms - see clause 5.3.2. +*RegIotPlatApi* | [**RegisterediotplatformsPOST**](docs/RegIotPlatApi.md#registerediotplatformspost) | **Post** /registered_iot_platforms | Register a IoT platform - see clause 5.3.4. + +## Documentation For Models + + - [Addresses](docs/Addresses.md) + - [DeviceInfo](docs/DeviceInfo.md) + - [DeviceSpecificMessageFormats](docs/DeviceSpecificMessageFormats.md) + - [DownlinkInfo](docs/DownlinkInfo.md) + - [EndPointInfo](docs/EndPointInfo.md) + - [EventMsg](docs/EventMsg.md) + - [ImplSpecificInfo](docs/ImplSpecificInfo.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [InlineResponse2001](docs/InlineResponse2001.md) + - [InterfaceDescriptor](docs/InterfaceDescriptor.md) + - [IotPlatformInfo](docs/IotPlatformInfo.md) + - [KeyValuePair](docs/KeyValuePair.md) + - [MbTransportInfo](docs/MbTransportInfo.md) + - [OAuth2Info](docs/OAuth2Info.md) + - [ProblemDetails](docs/ProblemDetails.md) + - [RegisteredDevicesBody](docs/RegisteredDevicesBody.md) + - [RegisteredDevicesRegisteredDeviceIdBody](docs/RegisteredDevicesRegisteredDeviceIdBody.md) + - [RegisteredIotPlatformsBody](docs/RegisteredIotPlatformsBody.md) + - [RegisteredIotPlatformsRegisteredIotPlatformIdBody](docs/RegisteredIotPlatformsRegisteredIotPlatformIdBody.md) + - [SecurityInfo](docs/SecurityInfo.md) + - [SerializerType](docs/SerializerType.md) + - [TrafficFilter](docs/TrafficFilter.md) + - [TrafficRuleDescriptor](docs/TrafficRuleDescriptor.md) + - [TransportInfo](docs/TransportInfo.md) + - [TransportType](docs/TransportType.md) + - [TunnelInfo](docs/TunnelInfo.md) + - [UplinkMsg](docs/UplinkMsg.md) + +## Documentation For Authorization + Endpoints do not require authorization. + + +## Author + +cti_support@etsi.org diff --git a/go-packages/meep-iot-client/api/swagger.yaml b/go-packages/meep-iot-client/api/swagger.yaml new file mode 100644 index 0000000000000000000000000000000000000000..14640b74bed7dd9cde653d5fd752a22dadeac288 --- /dev/null +++ b/go-packages/meep-iot-client/api/swagger.yaml @@ -0,0 +1,2858 @@ +openapi: 3.0.0 +info: + title: ETSI GS MEC 033 IoT API + description: ETSI GS MEC 033 IoT API described using OpenAPI. + contact: + name: ETSI Forge + url: https://forge.etsi.org/rep/mec/gs021-amsi-api + email: cti_support@etsi.org + license: + name: BSD-3-Clause + url: https://forge.etsi.org/legal-matters + version: 3.1.1 +externalDocs: + description: "ETSI GS MEC 033 IoT API, v3.3.1" + url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_mec033v030101p.pdf +servers: +- url: https://localhost/sandboxname/iots/v1 +tags: +- name: reg-dev + description: registered_devices +- name: reg-iot-plat + description: registered_iot_platforms +paths: + /registered_devices: + get: + tags: + - reg-dev + summary: Retrieve information about all devices with a valid traffic rule association + - see clause 5.2.2. + description: The GET method may be used by a service consumer to retrieve information + about all devices with a valid traffic rule association. This method is typically + used in the "registered devices query" procedure as described in clause 5.2.2. + operationId: registereddevicesGET + parameters: + - name: filter + in: query + description: "Attribute-based filtering parameters according to ETSI GS MEC\ + \ 009 [i.1]. The API producer shall support receiving the following filtering\ + \ parameters as part of the URI query string: \"(eq,enabled,TRUE)\".\n" + required: false + style: form + explode: true + schema: + type: string + - name: fields + in: query + description: | + The list may contain one or more of the following attributes from the DeviceInfo data type: + - deviceMetadata + - gpsi + - msisdn + - deviceId + - requestedMecTrafficRule + - requestedIotPlatformId + - requestedUserTransportId + required: false + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the list of registered\ + \ devices is returned. The response body shall contain a list of resources\ + \ that match the attribute filter." + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - reg-dev + summary: Register a new device - see clause 5.2.3. + description: The POST method may be used by a service consumer to register a + new device. This method is typically used in the "device registration" procedure + as described in clause 5.2.3. + operationId: registereddevicesPOST + requestBody: + description: Payload body in the request contains the information associated + to the IoT device to be registered. + content: + application/json: + schema: + $ref: '#/components/schemas/registered_devices_body' + required: true + responses: + "201": + description: "Upon success, the HTTP response shall include a \"Location\"\ + \ HTTP header that contains the resource URI of the registered device." + content: + application/json: + schema: + $ref: '#/components/schemas/registered_devices_body' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /registered_devices/{registeredDeviceId}: + get: + tags: + - reg-dev + summary: Retrieve information about a device - see clause 5.2.4. + description: The GET method may be used by a service consumer to retrieve information + about a device. This method is typically used in the "device registration + query" procedure as described in clause 5.2.4. + operationId: registereddevicesByIdGET + parameters: + - name: registeredDeviceId + in: path + description: The unique identifier of the registered device. + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: "Upon success, a response body containing information about\ + \ the registered device is returned." + content: + application/json: + schema: + $ref: '#/components/schemas/registered_devices_body' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - reg-dev + summary: Update information about a device including its association to a valid + traffic rule - see clauses 5.2.5 and 5.4.3. + description: The PUT method may be used by a service consumer to update a device + registration including its association to a valid traffic rule. This method + is typically used in the "device registration update" procedure as described + in clause 5.2.5 and in the "user transport assignment" procedure as described + in clause 5.4.3. + operationId: registereddevicesByIdPUT + parameters: + - name: registeredDeviceId + in: path + description: The unique identifier of the registered device. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: One or more updated attributes that are allowed to be changed + are included in the DeviceInfo data structure in the payload body of the + request. . + content: + application/json: + schema: + $ref: '#/components/schemas/registered_devices_registeredDeviceId_body' + required: true + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the updated DeviceInfo is returned." + content: + application/json: + schema: + $ref: '#/components/schemas/registered_devices_registeredDeviceId_body' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "412": + description: "Precondition failed: used when a condition has failed during\ + \ conditional requests, e.g. when using ETags to avoid write conflicts\ + \ when using PUT" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - reg-dev + summary: Deregister a device - see clause 5.2.6. + description: The DELETE method may be used by a service consumer to deregister + a device. This method is typically used in the "device deregistration" procedure + as described in clause 5.2.6. + operationId: registereddevicesByIdDELETE + parameters: + - name: registeredDeviceId + in: path + description: The unique identifier of the registered device. + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: No Content + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /registered_iot_platforms: + get: + tags: + - reg-iot-plat + summary: Retrieve information about all IoT platforms - see clause 5.3.2. + description: The GET method may be used by an authorized service consumer to + retrieve the information of all currently registered IoT platforms. This method + is typically used in the "registered IoT platforms query" procedure as described + in clause 5.3.2. + operationId: registerediotplatformsGET + parameters: + - name: fields + in: query + description: | + The list shall contain the following attributes from the IotPlatformInfo data type: + - iotPlatformId + - enabled + required: false + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the list of registered\ + \ IoT platforms is returned." + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IotPlatformInfo' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - reg-iot-plat + summary: Register a IoT platform - see clause 5.3.4. + description: The POST method may be used by a service consumer to register a + new IoT platform. This method is typically used in the "IoT platform registration" + procedure as described in clause 5.3.4. + operationId: registerediotplatformsPOST + requestBody: + description: Payload body in the request contains the information associated + to the IoT platform to be registered. + content: + application/json: + schema: + $ref: '#/components/schemas/registered_iot_platforms_body' + required: true + responses: + "201": + description: "Upon success, the HTTP response shall include a \"Location\"\ + \ HTTP header that contains the resource URI of the registered IoT platform." + content: + application/json: + schema: + $ref: '#/components/schemas/registered_iot_platforms_body' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /registered_iot_platforms/{registeredIotPlatformId}: + get: + tags: + - reg-iot-plat + summary: Discover native services and obtain information about user transports + provided by a IoT platform - see clauses 5.3.3 and 5.4.2. + description: 'The GET method may be used by a service consumer to obtain information + about a IoT platform. This method is typically used in the "IoT platform information + request" procedure as described in clause 5.3.3 and in the "user transport + query" procedure as described in clause 5.4.2. ' + operationId: registerediotplatformsByIdGET + parameters: + - name: registeredIotPlatformId + in: path + description: The unique identifier of the registered IoT platform. + required: true + style: simple + explode: false + schema: + type: string + - name: fields + in: query + description: | + The list may contain one or more of the following attributes from the IotPlatformInfo data type: + - userTransportInfo + - customServiceTransportInfo + required: false + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing information about\ + \ the registered IoT platform is returned." + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_1' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - reg-iot-plat + summary: Update information about a IoT platform - see clause 5.3.5. + description: The PUT method may be used by a service consumer to update a IoT + platform registration. This method is typically used in the "IoT platform + update" procedure as described in clause 5.3.5. + operationId: registerediotplatformsByIdPUT + parameters: + - name: registeredIotPlatformId + in: path + description: The unique identifier of the registered IoT platform. + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: One or more updated attributes that are allowed to be changed + are included in the IotPlatformInfo data structure in the payload body of + the request. . + content: + application/json: + schema: + $ref: '#/components/schemas/registered_iot_platforms_registeredIotPlatformId_body' + required: true + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the updated IotPlatformInfo is returned." + content: + application/json: + schema: + $ref: '#/components/schemas/registered_iot_platforms_registeredIotPlatformId_body' + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "412": + description: "Precondition failed: used when a condition has failed during\ + \ conditional requests, e.g. when using ETags to avoid write conflicts\ + \ when using PUT" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - reg-iot-plat + summary: Deregister a IoT platform - see clause 5.3.6. + description: The DELETE method may be used by a service consumer to deregister + a IoT platform. This method is typically used in the "IoT platform deregistration" + procedure as described in clause 5.3.6. + operationId: registerediotplatformsByIdDELETE + parameters: + - name: registeredIotPlatformId + in: path + description: The unique identifier of the registered IoT platform. + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: No Content + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' +components: + schemas: + ProblemDetails: + type: object + properties: + type: + type: string + description: A URI reference according to IETF RFC 3986 that identifies + the problem type + format: uri + title: + type: string + description: "A short, human-readable summary of the problem type" + status: + type: integer + description: The HTTP status code for this occurrence of the problem + format: uint32 + detail: + type: string + description: A human-readable explanation specific to this occurrence of + the problem + instance: + type: string + description: A URI reference that identifies the specific occurrence of + the problem + format: uri + DeviceInfo: + title: DeviceInfo + required: + - deviceAuthenticationInfo + - deviceId + - enabled + type: object + properties: + deviceAuthenticationInfo: + type: string + description: "Information needed for secondary authentication of the IoT\ + \ device to the data network - see ETSI TS 129 561 [i.4] and ETSI TS 129\ + \ 061 [i.5] for 5G and LTE procedures, respectively. This attribute is\ + \ implementation dependent and should be logically linked to the identifiers\ + \ of the IoT device listed hereafter." + deviceMetadata: + type: array + description: 'Additional information about the IoT device. This attribute + is implementation dependent and may be expressed as an array of keyvalue + pairs. ' + items: + $ref: '#/components/schemas/KeyValuePair' + gpsi: + type: string + description: GPSI of the IoT device if 5G-enabled (see note 1). + pei: + type: string + description: PEI of the IoT device if 5G-enabled (see note 1). + supi: + type: string + description: SUPI of the IoT device if 5G-enabled (see note 1). + msisdn: + type: string + description: MSISDN of the IoT device if LTE-enabled (see note 1). + imei: + type: string + description: IMEI of the IoT device if LTE-enabled (see note 1). + imsi: + type: string + description: IMSI of the IoT device if LTE-enabled (see note 1). + iccid: + type: string + description: ICCID of the IoT device (see note 1). + deviceId: + type: string + description: Human-readable identifier of the IoT device. + requestedMecTrafficRule: + type: array + description: "MEC traffic rules the IoT device is requested to be associated\ + \ to (see note 2). The data type definition is as per ETSI GS\_MEC 010-2\ + \ [i.6]." + items: + $ref: '#/components/schemas/TrafficRuleDescriptor' + requestedIotPlatformId: + type: string + description: IoT platform to which the IoT device is requested to be associated + to (see note 2). + requestedUserTransportId: + type: string + description: User transport to which the IoT device is requested to be associated + to (see note 2). + deviceSpecificMessageFormats: + $ref: '#/components/schemas/DeviceSpecificMessageFormats' + downlinkInfo: + $ref: '#/components/schemas/DownlinkInfo' + clientCertificate: + type: string + description: Client-side SSL/TLS certificate to be used by the MEC IoTS + to interact with the user transport provided by the associated IoT platform + in case the MEC IoTS acts on behalf of the IoT device. + enabled: + type: boolean + description: Indication whether the IoT device has a valid associated traffic + rule (TRUE) or not (FALSE). See note 3. + description: "NOTE 1: At least one attribute among gpsi, pei, supi, msisdn,\ + \ imei, imsi, and iccid should be provided. Sufficient security\n measures\ + \ shall be put in place when any attribute among PEI, SUPI, IMEI, and IMSI\ + \ is disclosed over the API.\nNOTE 2: Until a valid traffic rule is not provided,\ + \ the device will not be able to use the IoTS. A valid traffic rule is provided\n\ + \ by one of the following options:\n • the requestedMecTrafficRule\ + \ attribute;\n • the requestedIotPlatformId attribute when the IoT\ + \ platform offers only one user transport;\n • the combination of requestedIotPlatformId\ + \ and requestedUserTransportId.\nNOTE 3: Enabled is a pseudo-attribute which\ + \ needs to be maintained by the IoTS based on the presence or not of a valid\n\ + \ traffic rule associated to the device. It cannot be set directly\ + \ by the service consumer. \n" + example: + deviceSpecificMessageFormats: + eventMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + includeImsi: true + includeSupi: true + selectedSerializer: JSON + eventTopic: eventTopic + includeDeviceId: true + includePei: true + uplinkMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + uplinkTopic: uplinkTopic + includeImsi: true + includeSupi: true + selectedSerializer: null + includeDevicePort: true + includeDeviceId: true + includePei: true + clientCertificate: clientCertificate + downlinkInfo: + downlinkTopic: downlinkTopic + devicePort: 5 + imsi: imsi + supi: supi + deviceId: deviceId + requestedMecTrafficRule: + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + enabled: true + gpsi: gpsi + requestedUserTransportId: requestedUserTransportId + iccid: iccid + pei: pei + requestedIotPlatformId: requestedIotPlatformId + deviceMetadata: + - value: value + key: key + - value: value + key: key + deviceAuthenticationInfo: deviceAuthenticationInfo + imei: imei + msisdn: msisdn + IotPlatformInfo: + title: IotPlatformInfo + required: + - enabled + - iotPlatformId + - userTransportInfo + type: object + properties: + iotPlatformId: + type: string + description: Identifier of the IoT platform. + userTransportInfo: + minItems: 1 + type: array + description: Information about the user transport(s) provided by the IoT + platform. + items: + $ref: '#/components/schemas/MBTransportInfo' + customServicesTransportInfo: + minItems: 0 + type: array + description: "Transport enabling access to vendor-specific services provided\ + \ by the IoT platform. The data type definition is as per ETSI GS MEC\ + \ 011 [i.2]." + items: + $ref: '#/components/schemas/TransportInfo' + enabled: + type: boolean + description: Indication whether the IoT platform is capable of providing + user transports and vendor-specific services (TRUE) or not (FALSE). + example: + iotPlatformId: iotPlatformId + customServicesTransportInfo: + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + userTransportInfo: + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + enabled: true + MBTransportInfo: + title: MBTransportInfo + required: + - endpoint + - id + - implSpecificInfo + - name + - protocol + - security + - type + - version + type: object + properties: + id: + type: string + description: "The identifier of this transport as per ETSI GS\_MEC\_011\ + \ [i.2]." + name: + type: string + description: "The name of this transport as per ETSI GS\_MEC\_011\_[i.2]." + description: + type: string + description: "Human-readable description of this transport as per ETSI GS\_\ + MEC 011 [i.2]." + type: + $ref: '#/components/schemas/TransportType' + protocol: + type: string + description: "The name of the protocol used. Being the transport of MB_TOPIC_BASED\ + \ type, this attribute should be typically set to \"MQTT\" or \"AMQP.\"" + version: + type: string + description: "The version of the protocol used as per ETSI GS\_MEC\_011\_\ + [i.2]." + endpoint: + $ref: '#/components/schemas/EndPointInfo' + security: + $ref: '#/components/schemas/SecurityInfo' + implSpecificInfo: + $ref: '#/components/schemas/ImplSpecificInfo' + example: + implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + EventMsg: + title: EventMsg + required: + - eventTopic + - selectedSerializer + type: object + properties: + eventTopic: + type: string + description: 'Topic where the message containing application-specific information + should be published. ' + selectedSerializer: + $ref: '#/components/schemas/SerializerType' + includeDeviceAddr: + type: boolean + description: Indication whether to include the IP address of the IoT device + (TRUE) or not (FALSE). + includeDeviceMetadata: + type: boolean + description: Indication whether to include the metadata about the IoT device + (TRUE) or not (FALSE). + includePei: + type: boolean + description: Indication whether to include the PEI of the IoT device (TRUE) + or not (FALSE). + includeSupi: + type: boolean + description: Indication whether to include the SUPI of the IoT device (TRUE) + or not (FALSE). + includeImei: + type: boolean + description: Indication whether to include the IMEI of the IoT device (TRUE) + or not (FALSE). + includeImsi: + type: boolean + description: Indication whether to include the IMSI of the IoT device (TRUE) + or not (FALSE). + includeIccid: + type: boolean + description: Indication whether to include the ICCID of the IoT device (TRUE) + or not (FALSE). + includeDeviceId: + type: boolean + description: Indication whether to include the human-readable identified + of the IoT device (TRUE) or not (FALSE). + example: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + includeImsi: true + includeSupi: true + selectedSerializer: JSON + eventTopic: eventTopic + includeDeviceId: true + includePei: true + UplinkMsg: + title: UplinkMsg + required: + - selectedSerializer + - uplinkTopic + type: object + properties: + uplinkTopic: + type: string + description: "Topic where the message containing the data generated by the\ + \ IoT device(s) should be published, in order to be consumed by the end\ + \ IoT application(s)." + selectedSerializer: + $ref: '#/components/schemas/SerializerType' + includeDevicePort: + type: boolean + description: Indication whether to include the UDP port of the remote IoT + device (TRUE) or not (FALSE). + includeDeviceAddr: + type: boolean + description: Indication whether to include the IP address of the IoT device + (TRUE) or not (FALSE). + includeDeviceMetadata: + type: boolean + description: Indication whether to include the metadata about the IoT device + (TRUE) or not (FALSE). + includePei: + type: boolean + description: Indication whether to include the PEI of the IoT device (TRUE) + or not (FALSE). + includeSupi: + type: boolean + description: Indication whether to include the SUPI of the IoT device (TRUE) + or not (FALSE). + includeImei: + type: boolean + description: Indication whether to include the IMEI of the IoT device (TRUE) + or not (FALSE). + includeImsi: + type: boolean + description: Indication whether to include the IMSI of the IoT device (TRUE) + or not (FALSE). + includeIccid: + type: boolean + description: Indication whether to include the ICCID of the IoT device (TRUE) + or not (FALSE). + includeDeviceId: + type: boolean + description: Indication whether to include the human-readable identified + of the IoT device (TRUE) or not (FALSE). + example: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + uplinkTopic: uplinkTopic + includeImsi: true + includeSupi: true + selectedSerializer: null + includeDevicePort: true + includeDeviceId: true + includePei: true + DeviceSpecificMessageFormats: + type: object + properties: + eventMsgFormat: + $ref: '#/components/schemas/EventMsg' + uplinkMsgFormat: + $ref: '#/components/schemas/UplinkMsg' + description: Format of the messages to be published by the MEC IoTS on the user + transport provided by the associated IoT platform in case the MEC IoTS acts + on behalf of the IoT device. + example: + eventMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + includeImsi: true + includeSupi: true + selectedSerializer: JSON + eventTopic: eventTopic + includeDeviceId: true + includePei: true + uplinkMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + uplinkTopic: uplinkTopic + includeImsi: true + includeSupi: true + selectedSerializer: null + includeDevicePort: true + includeDeviceId: true + includePei: true + DownlinkInfo: + type: object + properties: + downlinkTopic: + type: string + description: Topic associated to the IoT device. This topic should be used + by an end IoT application to send downlink data to the IoT device. + devicePort: + type: integer + description: "UDP port to be used by the MEC IoTS for the outgoing downlink\ + \ packets towards the IoT device. In case a default value is used, this\ + \ attribute is optional." + description: Downlink communication configuration of the user transport provided + by the associated IoT platform in case the MEC IoTS acts on behalf of the + IoT device. + example: + downlinkTopic: downlinkTopic + devicePort: 5 + ImplSpecificInfo: + type: object + properties: + eventTopics: + minItems: 0 + type: array + description: Topics used to publish events related to the established session + between the IoT device(s) and the end IoT application(s) on the user transport. + items: + type: string + uplinkTopics: + type: array + description: "Topics used to publish data generated by the IoT device(s)\ + \ on the user transport, in order to be consumed by the end IoT application(s)." + items: + type: string + downlinkTopics: + type: array + description: "Topics used to publish data generated by the IoT applications(s)\ + \ on the user transport, in order to be consumed by the end IoT device(s)." + items: + type: string + description: Additional implementation specific details of the transport. + example: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + SerializerType: + type: string + description: The enumeration SerializerType represents types of serializers. + enum: + - JSON + - XML + - PROTOBUF3 + TransportInfo: + title: TransportInfo + required: + - endpoint + - id + - name + - protocol + - security + - type + - version + type: object + properties: + id: + type: string + description: The identifier of this transport. + name: + type: string + description: The name of this transport. + description: + type: string + description: Human-readable description of this transport. + type: + $ref: '#/components/schemas/TransportType' + protocol: + type: string + description: The name of the protocol used. Shall be set to "HTTP" for a + REST API. + version: + type: string + description: The version of the protocol used. + endpoint: + $ref: '#/components/schemas/EndPointInfo' + security: + $ref: '#/components/schemas/SecurityInfo' + implSpecificInfo: + type: string + description: Additional implementation specific details of the transport. + example: + implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + TransportType: + type: string + description: Enumeration representing types of transports. + enum: + - REST_HTTP + - MB_TOPIC_BASED + - MB_ROUTING + - MB_PUBSUB + - RPC + - RPC_STREAMING + - WEBSOCKET + EndPointInfo: + title: EndPointInfo + type: object + properties: + uris: + type: array + description: "Entry point information of the service as string, formatted\ + \ according to URI syntax (see IETF RFC 3986 [8]). Shall be used for REST\ + \ APIs. See note." + items: + type: string + fqdn: + type: array + description: Fully Qualified Domain Name of the service. See note. + items: + type: string + addresses: + type: array + items: + $ref: '#/components/schemas/Addresses' + alternative: + type: string + description: "Entry point information of the service in a format defined\ + \ by an implementation, or in an external specification. See\_note." + description: "NOTE: Exactly one of \"uris\", \"fqdn\", \"addresses\" or \"alternative\"\ + \ shall be present. \n" + example: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + SecurityInfo: + type: object + properties: + oAuth2Info: + $ref: '#/components/schemas/OAuth2Info' + extensions: + type: string + description: "Extensions for alternative transport mechanisms. These extensions\ + \ depend on the actual transport and are out of scope of the present document.\ + \ For instance, such extensions may be used to signal the necessary parameters\ + \ for the client to use TLS-based authorization defined for alternative\ + \ transports (see ETSI GS MEC 009 [5] for more information).\n" + example: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + Addresses: + required: + - host + - port + type: object + properties: + host: + type: string + description: Host portion of the address. + port: + type: integer + description: Port portion of the address. + description: Entry point information of the service as one or more pairs of + IP address and port. See note. + example: + port: 0 + host: host + OAuth2Info: + required: + - grantTypes + type: object + properties: + grantTypes: + type: array + description: "List of supported OAuth 2.0 grant types.\nEach entry shall\ + \ be one of the following permitted values:\n- OAUTH2_AUTHORIZATION_CODE:\ + \ Authorization code grant type\n- OAUTH2_IMPLICIT_GRANT: Implicit grant\ + \ type\n- OAUTH2_RESOURCE_OWNER: Resource owner password credentials grant\ + \ type\n- OAUTH2_CLIENT_CREDENTIALS: Client credentials grant type\nOnly\ + \ the value \"OAUTH2_CLIENT_CREDENTIALS\" is supported in the present\ + \ document.\n" + items: + type: string + enum: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_IMPLICIT_GRANT + - OAUTH2_RESOURCE_OWNER + - OAUTH2_CLIENT_CREDENTIALS + tokenEndpoint: + type: string + description: The token endpoint. Shall be present unless the grant type + is OAUTH2_IMPLICIT_GRANT. + format: uri + description: "Parameters related to use of OAuth 2.0. Shall be present in case\ + \ OAuth 2.0 (see IETF RFC 6749 [13]) is supported to secure the provision\ + \ of the service over the transport." + example: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + TrafficRuleDescriptor: + title: TrafficRuleDescriptor + required: + - action + - filterType + - priority + - trafficFilter + - trafficRuleId + type: object + properties: + trafficRuleId: + type: string + description: Identifies the traffic rule. + filterType: + type: string + description: "Definition of filter type: per FLOW or PACKET\n\nIf it is\ + \ per FLOW, the filter matches upstream (e.g. UE->EPC) packets and downstream\ + \ (e.g. EPC->UE) packets are handled by the same context.\n" + enum: + - per FLOW + - per PACKET + priority: + type: integer + description: "Priority of this traffic rule within the range 0 to 255. If\ + \ traffic rule conflicts, the one with higher priority take precedence.\ + \ See note\_1." + trafficFilter: + type: array + description: The filter used to identify specific flow/packets that need + to be handled by the MEC host. + items: + $ref: '#/components/schemas/TrafficFilter' + action: + type: string + description: "Identifies the action of the MEC host data plane, when a packet\ + \ matches the trafficFilter, the example actions include:\nDROP,\nFORWARD_DECAPSULATED,\n\ + FORWARD_ENCAPSULATED,\nPASSTHROUGH,\nDUPLICATE_DECAPSULATED,\nDUPLICATE_ENCAPSULATED " + enum: + - SEE_DESCRIPTION + dstInterface: + $ref: '#/components/schemas/InterfaceDescriptor' + description: "NOTE 1: Value indicates the priority in descending order, i.e.\ + \ with 0 as the highest priority and 255 as the lowest\n priority.\n\ + NOTE 2: Some applications (like inline/tap) require two interfaces. The first\ + \ interface in the case of inline/tap is on the\n client (e.g. UE)\ + \ side and the second on the core network (e.g. EPC) side. \n" + example: + action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + TrafficFilter: + title: TrafficFilter + type: object + properties: + srcAddress: + type: array + description: "An IP address or a range of IP addresses.\nFor IPv4, the IP\ + \ address could be an IP address plus mask, or an individual IP address,\ + \ or a range of IP addresses.\nFor IPv6, the IP address could be an IP\ + \ prefix, or a range of IP prefixes." + items: + type: string + dstAddress: + type: array + description: "An IP address or a range of IP addresses.\nFor IPv4, the IP\ + \ address could be an IP address plus mask, or an individual IP address,\ + \ or a range of IP addresses.\nFor IPv6, the IP address could be an IP\ + \ prefix, or a range of IP prefixes." + items: + type: string + srcPort: + type: array + description: A port or a range of ports. + items: + type: string + dstPort: + type: array + description: A port or a range of ports. + items: + type: string + protocol: + type: array + description: Specify the protocol of the traffic filter. + items: + type: string + tag: + type: array + description: Used for tag based traffic rule. + items: + type: string + uri: + type: array + description: "An URI label, in application layer, i.e. in HTTP message,\ + \ is used to filter the traffic." + items: + type: string + packetLabel: + type: array + description: "A customized packet label in network layer, as defined by\ + \ the owner of the MEC platform, is used to filter the traffic." + items: + type: string + srcTunnelAddress: + type: array + description: Used for GTP tunnel based traffic rule. + items: + type: string + tgtTunnelAddress: + type: array + description: Used for GTP tunnel based traffic rule. + items: + type: string + srcTunnelPort: + type: array + description: Used for GTP tunnel based traffic rule. + items: + type: string + dstTunnelPort: + type: array + description: Used for GTP tunnel based traffic rule. + items: + type: string + qCI: + type: integer + description: Used to match all packets that have the same QCI. + dSCP: + type: integer + description: Used to match all IPv4 packets that have the same DSCP. + tC: + type: integer + description: Used to match all IPv6 packets that have the same TC. + example: + srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + InterfaceDescriptor: + title: InterfaceDescriptor + required: + - interfaceType + type: object + properties: + interfaceType: + type: string + description: "Type of interface: TUNNEL, MAC, IP, etc." + enum: + - TUNNEL + - MAC + - IP + tunnelInfo: + $ref: '#/components/schemas/TunnelInfo' + srcMACAddress: + type: string + description: "If the interface type is MAC, the source address identifies\ + \ the MAC address of the interface." + dstMACAddress: + type: string + description: "If the interface type is MAC, the destination address identifies\ + \ the MAC address of the destination. Only used for dstInterface." + dstIPAddress: + type: string + description: "If the interface type is IP, the destination address identifies\ + \ the IP address of the destination. Only used for dstInterface." + example: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + TunnelInfo: + title: TunnelInfo + required: + - tunnelDstAddress + - tunnelSrcAddress + - tunnelType + type: object + properties: + tunnelType: + type: string + description: "Type of tunnel: GTP-U, GRE, etc." + enum: + - GTP-U + - GRE + tunnelDstAddress: + type: string + description: Destination address of the tunnel. + tunnelSrcAddress: + type: string + description: Source address of the tunnel. + tunnelSpecificData: + type: string + description: Parameters specific to the tunnel. + example: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + KeyValuePair: + type: object + properties: + key: + type: string + value: + type: string + description: Key-value pairs for device metadata + example: + value: value + key: key + inline_response_200: + type: object + properties: + items: + $ref: '#/components/schemas/DeviceInfo' + example: + items: + deviceSpecificMessageFormats: + eventMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + includeImsi: true + includeSupi: true + selectedSerializer: JSON + eventTopic: eventTopic + includeDeviceId: true + includePei: true + uplinkMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + uplinkTopic: uplinkTopic + includeImsi: true + includeSupi: true + selectedSerializer: null + includeDevicePort: true + includeDeviceId: true + includePei: true + clientCertificate: clientCertificate + downlinkInfo: + downlinkTopic: downlinkTopic + devicePort: 5 + imsi: imsi + supi: supi + deviceId: deviceId + requestedMecTrafficRule: + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + enabled: true + gpsi: gpsi + requestedUserTransportId: requestedUserTransportId + iccid: iccid + pei: pei + requestedIotPlatformId: requestedIotPlatformId + deviceMetadata: + - value: value + key: key + - value: value + key: key + deviceAuthenticationInfo: deviceAuthenticationInfo + imei: imei + msisdn: msisdn + registered_devices_body: + type: object + properties: + DeviceInfo: + $ref: '#/components/schemas/DeviceInfo' + example: + DeviceInfo: + deviceSpecificMessageFormats: + eventMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + includeImsi: true + includeSupi: true + selectedSerializer: JSON + eventTopic: eventTopic + includeDeviceId: true + includePei: true + uplinkMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + uplinkTopic: uplinkTopic + includeImsi: true + includeSupi: true + selectedSerializer: null + includeDevicePort: true + includeDeviceId: true + includePei: true + clientCertificate: clientCertificate + downlinkInfo: + downlinkTopic: downlinkTopic + devicePort: 5 + imsi: imsi + supi: supi + deviceId: deviceId + requestedMecTrafficRule: + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + enabled: true + gpsi: gpsi + requestedUserTransportId: requestedUserTransportId + iccid: iccid + pei: pei + requestedIotPlatformId: requestedIotPlatformId + deviceMetadata: + - value: value + key: key + - value: value + key: key + deviceAuthenticationInfo: deviceAuthenticationInfo + imei: imei + msisdn: msisdn + registered_devices_registeredDeviceId_body: + type: object + properties: + DeviceInfo: + $ref: '#/components/schemas/DeviceInfo' + example: + DeviceInfo: + deviceSpecificMessageFormats: + eventMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + includeImsi: true + includeSupi: true + selectedSerializer: JSON + eventTopic: eventTopic + includeDeviceId: true + includePei: true + uplinkMsgFormat: + includeDeviceMetadata: true + includeIccid: true + includeDeviceAddr: true + includeImei: true + uplinkTopic: uplinkTopic + includeImsi: true + includeSupi: true + selectedSerializer: null + includeDevicePort: true + includeDeviceId: true + includePei: true + clientCertificate: clientCertificate + downlinkInfo: + downlinkTopic: downlinkTopic + devicePort: 5 + imsi: imsi + supi: supi + deviceId: deviceId + requestedMecTrafficRule: + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - action: SEE_DESCRIPTION + trafficRuleId: trafficRuleId + dstInterface: + interfaceType: TUNNEL + dstIPAddress: dstIPAddress + srcMACAddress: srcMACAddress + dstMACAddress: dstMACAddress + tunnelInfo: + tunnelSrcAddress: tunnelSrcAddress + tunnelType: GTP-U + tunnelSpecificData: tunnelSpecificData + tunnelDstAddress: tunnelDstAddress + filterType: per FLOW + priority: 0 + trafficFilter: + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + - srcTunnelPort: + - srcTunnelPort + - srcTunnelPort + dstAddress: + - dstAddress + - dstAddress + srcAddress: + - srcAddress + - srcAddress + srcPort: + - srcPort + - srcPort + uri: + - uri + - uri + tC: 5 + protocol: + - protocol + - protocol + dstTunnelPort: + - dstTunnelPort + - dstTunnelPort + dSCP: 1 + dstPort: + - dstPort + - dstPort + packetLabel: + - packetLabel + - packetLabel + qCI: 6 + srcTunnelAddress: + - srcTunnelAddress + - srcTunnelAddress + tag: + - tag + - tag + tgtTunnelAddress: + - tgtTunnelAddress + - tgtTunnelAddress + enabled: true + gpsi: gpsi + requestedUserTransportId: requestedUserTransportId + iccid: iccid + pei: pei + requestedIotPlatformId: requestedIotPlatformId + deviceMetadata: + - value: value + key: key + - value: value + key: key + deviceAuthenticationInfo: deviceAuthenticationInfo + imei: imei + msisdn: msisdn + registered_iot_platforms_body: + type: object + properties: + IoTPlatformInfo: + $ref: '#/components/schemas/IotPlatformInfo' + example: + IoTPlatformInfo: + iotPlatformId: iotPlatformId + customServicesTransportInfo: + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + userTransportInfo: + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + enabled: true + inline_response_200_1: + type: object + properties: + IotPlatformInfo: + $ref: '#/components/schemas/IotPlatformInfo' + example: + IotPlatformInfo: + iotPlatformId: iotPlatformId + customServicesTransportInfo: + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + userTransportInfo: + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + enabled: true + registered_iot_platforms_registeredIotPlatformId_body: + type: object + properties: + IotPlatformInfo: + $ref: '#/components/schemas/IotPlatformInfo' + example: + IotPlatformInfo: + iotPlatformId: iotPlatformId + customServicesTransportInfo: + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + - implSpecificInfo: implSpecificInfo + protocol: protocol + endpoint: null + security: null + name: name + description: description + id: id + type: null + version: version + userTransportInfo: + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + - implSpecificInfo: + uplinkTopics: + - uplinkTopics + - uplinkTopics + downlinkTopics: + - downlinkTopics + - downlinkTopics + eventTopics: + - eventTopics + - eventTopics + protocol: protocol + endpoint: + uris: + - uris + - uris + addresses: + - port: 0 + host: host + - port: 0 + host: host + fqdn: + - fqdn + - fqdn + alternative: alternative + security: + extensions: extensions + oAuth2Info: + tokenEndpoint: http://example.com/aeiou + grantTypes: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_AUTHORIZATION_CODE + name: name + description: description + id: id + type: REST_HTTP + version: version + enabled: true + responses: + "200": + description: OK + "204": + description: No Content + "400": + description: "Bad Request: used to indicate that incorrect parameters were passed\ + \ to the request." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status of\ + \ the resource." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be mapped\ + \ to a valid resource URI." + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "412": + description: "Precondition failed: used when a condition has failed during conditional\ + \ requests, e.g. when using ETags to avoid write conflicts when using PUT" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' diff --git a/go-packages/meep-iot-client/api_reg_dev.go b/go-packages/meep-iot-client/api_reg_dev.go new file mode 100644 index 0000000000000000000000000000000000000000..a3b3ebf9994182cf4d4120dc45d12bfb0d0e2b26 --- /dev/null +++ b/go-packages/meep-iot-client/api_reg_dev.go @@ -0,0 +1,603 @@ + +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" + "fmt" + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type RegDevApiService service +/* +RegDevApiService Deregister a device - see clause 5.2.6. +The DELETE method may be used by a service consumer to deregister a device. This method is typically used in the \"device deregistration\" procedure as described in clause 5.2.6. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registeredDeviceId The unique identifier of the registered device. + +*/ +func (a *RegDevApiService) RegistereddevicesByIdDELETE(ctx context.Context, registeredDeviceId string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registered_devices/{registeredDeviceId}" + localVarPath = strings.Replace(localVarPath, "{"+"registeredDeviceId"+"}", fmt.Sprintf("%v", registeredDeviceId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} +/* +RegDevApiService Retrieve information about a device - see clause 5.2.4. +The GET method may be used by a service consumer to retrieve information about a device. This method is typically used in the \"device registration query\" procedure as described in clause 5.2.4. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registeredDeviceId The unique identifier of the registered device. +@return RegisteredDevicesBody +*/ +func (a *RegDevApiService) RegistereddevicesByIdGET(ctx context.Context, registeredDeviceId string) (RegisteredDevicesBody, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue RegisteredDevicesBody + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registered_devices/{registeredDeviceId}" + localVarPath = strings.Replace(localVarPath, "{"+"registeredDeviceId"+"}", fmt.Sprintf("%v", registeredDeviceId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v RegisteredDevicesBody + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* +RegDevApiService Update information about a device including its association to a valid traffic rule - see clauses 5.2.5 and 5.4.3. +The PUT method may be used by a service consumer to update a device registration including its association to a valid traffic rule. This method is typically used in the \"device registration update\" procedure as described in clause 5.2.5 and in the \"user transport assignment\" procedure as described in clause 5.4.3. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body One or more updated attributes that are allowed to be changed are included in the DeviceInfo data structure in the payload body of the request. . + * @param registeredDeviceId The unique identifier of the registered device. +@return RegisteredDevicesRegisteredDeviceIdBody +*/ +func (a *RegDevApiService) RegistereddevicesByIdPUT(ctx context.Context, body RegisteredDevicesRegisteredDeviceIdBody, registeredDeviceId string) (RegisteredDevicesRegisteredDeviceIdBody, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue RegisteredDevicesRegisteredDeviceIdBody + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registered_devices/{registeredDeviceId}" + localVarPath = strings.Replace(localVarPath, "{"+"registeredDeviceId"+"}", fmt.Sprintf("%v", registeredDeviceId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v RegisteredDevicesRegisteredDeviceIdBody + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 412 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* +RegDevApiService Retrieve information about all devices with a valid traffic rule association - see clause 5.2.2. +The GET method may be used by a service consumer to retrieve information about all devices with a valid traffic rule association. This method is typically used in the \"registered devices query\" procedure as described in clause 5.2.2. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *RegDevApiRegistereddevicesGETOpts - Optional Parameters: + * @param "Filter" (optional.String) - Attribute-based filtering parameters according to ETSI GS MEC 009 [i.1]. The API producer shall support receiving the following filtering parameters as part of the URI query string: \"(eq,enabled,TRUE)\". + * @param "Fields" (optional.Interface of []string) - The list may contain one or more of the following attributes from the DeviceInfo data type: - deviceMetadata - gpsi - msisdn - deviceId - requestedMecTrafficRule - requestedIotPlatformId - requestedUserTransportId +@return InlineResponse200 +*/ + +type RegDevApiRegistereddevicesGETOpts struct { + Filter optional.String + Fields optional.Interface +} + +func (a *RegDevApiService) RegistereddevicesGET(ctx context.Context, localVarOptionals *RegDevApiRegistereddevicesGETOpts) (InlineResponse200, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse200 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registered_devices" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Filter.IsSet() { + localVarQueryParams.Add("filter", parameterToString(localVarOptionals.Filter.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Fields.IsSet() { + localVarQueryParams.Add("fields", parameterToString(localVarOptionals.Fields.Value(), "multi")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse200 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* +RegDevApiService Register a new device - see clause 5.2.3. +The POST method may be used by a service consumer to register a new device. This method is typically used in the \"device registration\" procedure as described in clause 5.2.3. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Payload body in the request contains the information associated to the IoT device to be registered. +@return RegisteredDevicesBody +*/ +func (a *RegDevApiService) RegistereddevicesPOST(ctx context.Context, body RegisteredDevicesBody) (RegisteredDevicesBody, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue RegisteredDevicesBody + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registered_devices" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 201 { + var v RegisteredDevicesBody + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-iot-client/api_reg_iot_plat.go b/go-packages/meep-iot-client/api_reg_iot_plat.go new file mode 100644 index 0000000000000000000000000000000000000000..652d21c022576001be2468275d3b9d5d4f663660 --- /dev/null +++ b/go-packages/meep-iot-client/api_reg_iot_plat.go @@ -0,0 +1,608 @@ + +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" + "fmt" + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type RegIotPlatApiService service +/* +RegIotPlatApiService Deregister a IoT platform - see clause 5.3.6. +The DELETE method may be used by a service consumer to deregister a IoT platform. This method is typically used in the \"IoT platform deregistration\" procedure as described in clause 5.3.6. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registeredIotPlatformId The unique identifier of the registered IoT platform. + +*/ +func (a *RegIotPlatApiService) RegisterediotplatformsByIdDELETE(ctx context.Context, registeredIotPlatformId string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registered_iot_platforms/{registeredIotPlatformId}" + localVarPath = strings.Replace(localVarPath, "{"+"registeredIotPlatformId"+"}", fmt.Sprintf("%v", registeredIotPlatformId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} +/* +RegIotPlatApiService Discover native services and obtain information about user transports provided by a IoT platform - see clauses 5.3.3 and 5.4.2. +The GET method may be used by a service consumer to obtain information about a IoT platform. This method is typically used in the \"IoT platform information request\" procedure as described in clause 5.3.3 and in the \"user transport query\" procedure as described in clause 5.4.2. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param registeredIotPlatformId The unique identifier of the registered IoT platform. + * @param optional nil or *RegIotPlatApiRegisterediotplatformsByIdGETOpts - Optional Parameters: + * @param "Fields" (optional.Interface of []string) - The list may contain one or more of the following attributes from the IotPlatformInfo data type: - userTransportInfo - customServiceTransportInfo +@return InlineResponse2001 +*/ + +type RegIotPlatApiRegisterediotplatformsByIdGETOpts struct { + Fields optional.Interface +} + +func (a *RegIotPlatApiService) RegisterediotplatformsByIdGET(ctx context.Context, registeredIotPlatformId string, localVarOptionals *RegIotPlatApiRegisterediotplatformsByIdGETOpts) (InlineResponse2001, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2001 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registered_iot_platforms/{registeredIotPlatformId}" + localVarPath = strings.Replace(localVarPath, "{"+"registeredIotPlatformId"+"}", fmt.Sprintf("%v", registeredIotPlatformId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Fields.IsSet() { + localVarQueryParams.Add("fields", parameterToString(localVarOptionals.Fields.Value(), "multi")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2001 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* +RegIotPlatApiService Update information about a IoT platform - see clause 5.3.5. +The PUT method may be used by a service consumer to update a IoT platform registration. This method is typically used in the \"IoT platform update\" procedure as described in clause 5.3.5. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body One or more updated attributes that are allowed to be changed are included in the IotPlatformInfo data structure in the payload body of the request. . + * @param registeredIotPlatformId The unique identifier of the registered IoT platform. +@return RegisteredIotPlatformsRegisteredIotPlatformIdBody +*/ +func (a *RegIotPlatApiService) RegisterediotplatformsByIdPUT(ctx context.Context, body RegisteredIotPlatformsRegisteredIotPlatformIdBody, registeredIotPlatformId string) (RegisteredIotPlatformsRegisteredIotPlatformIdBody, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue RegisteredIotPlatformsRegisteredIotPlatformIdBody + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registered_iot_platforms/{registeredIotPlatformId}" + localVarPath = strings.Replace(localVarPath, "{"+"registeredIotPlatformId"+"}", fmt.Sprintf("%v", registeredIotPlatformId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v RegisteredIotPlatformsRegisteredIotPlatformIdBody + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 412 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* +RegIotPlatApiService Retrieve information about all IoT platforms - see clause 5.3.2. +The GET method may be used by an authorized service consumer to retrieve the information of all currently registered IoT platforms. This method is typically used in the \"registered IoT platforms query\" procedure as described in clause 5.3.2. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *RegIotPlatApiRegisterediotplatformsGETOpts - Optional Parameters: + * @param "Fields" (optional.Interface of []string) - The list shall contain the following attributes from the IotPlatformInfo data type: - iotPlatformId - enabled +@return []IotPlatformInfo +*/ + +type RegIotPlatApiRegisterediotplatformsGETOpts struct { + Fields optional.Interface +} + +func (a *RegIotPlatApiService) RegisterediotplatformsGET(ctx context.Context, localVarOptionals *RegIotPlatApiRegisterediotplatformsGETOpts) ([]IotPlatformInfo, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []IotPlatformInfo + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registered_iot_platforms" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Fields.IsSet() { + localVarQueryParams.Add("fields", parameterToString(localVarOptionals.Fields.Value(), "multi")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []IotPlatformInfo + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* +RegIotPlatApiService Register a IoT platform - see clause 5.3.4. +The POST method may be used by a service consumer to register a new IoT platform. This method is typically used in the \"IoT platform registration\" procedure as described in clause 5.3.4. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Payload body in the request contains the information associated to the IoT platform to be registered. +@return RegisteredIotPlatformsBody +*/ +func (a *RegIotPlatApiService) RegisterediotplatformsPOST(ctx context.Context, body RegisteredIotPlatformsBody) (RegisteredIotPlatformsBody, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue RegisteredIotPlatformsBody + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/registered_iot_platforms" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 201 { + var v RegisteredIotPlatformsBody + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-iot-client/client.go b/go-packages/meep-iot-client/client.go new file mode 100644 index 0000000000000000000000000000000000000000..a31ad6de39ef85721999c52a1fd42aa2c118f561 --- /dev/null +++ b/go-packages/meep-iot-client/client.go @@ -0,0 +1,477 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "mime/multipart" + "net/http" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/oauth2" +) + +var ( + jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") + xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") +) + +// APIClient manages communication with the ETSI GS MEC 033 IoT API API v3.1.1 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + RegDevApi *RegDevApiService + + RegIotPlatApi *RegIotPlatApiService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.RegDevApi = (*RegDevApiService)(&c.common) + c.RegIotPlatApi = (*RegIotPlatApiService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insenstive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.ToLower(a) == strings.ToLower(needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. +func parameterToString(obj interface{}, collectionFormat string) string { + var delimiter string + + switch collectionFormat { + case "pipes": + delimiter = "|" + case "ssv": + delimiter = " " + case "tsv": + delimiter = "\t" + case "csv": + delimiter = "," + } + + if reflect.TypeOf(obj).Kind() == reflect.Slice { + return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") + } + + return fmt.Sprintf("%v", obj) +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + return c.cfg.HTTPClient.Do(request) +} + +// Change base path to allow switching to mocks +func (c *APIClient) ChangeBasePath(path string) { + c.cfg.BasePath = path +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + fileName string, + fileBytes []byte) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + if len(fileBytes) > 0 && fileName != "" { + w.Boundary() + //_, fileNm := filepath.Split(fileName) + part, err := w.CreateFormFile("file", filepath.Base(fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(fileBytes) + if err != nil { + return nil, err + } + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + } + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = query.Encode() + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers.Set(h, v) + } + localVarRequest.Header = headers + } + + // Override request host, if applicable + if c.cfg.Host != "" { + localVarRequest.Host = c.cfg.Host + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if strings.Contains(contentType, "application/xml") { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } else if strings.Contains(contentType, "application/json") { + if err = json.Unmarshal(b, v); err != nil { + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(path) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("Invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } + expires = now.Add(lifetime) + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericSwaggerError Provides access to the body, error and model on returned errors. +type GenericSwaggerError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericSwaggerError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericSwaggerError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericSwaggerError) Model() interface{} { + return e.model +} diff --git a/go-packages/meep-iot-client/configuration.go b/go-packages/meep-iot-client/configuration.go new file mode 100644 index 0000000000000000000000000000000000000000..b2852ee53df3856c8370b2bf3494cb7cc6bc49d5 --- /dev/null +++ b/go-packages/meep-iot-client/configuration.go @@ -0,0 +1,72 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "net/http" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextAPIKey takes an APIKey as authentication for the request + ContextAPIKey = contextKey("apikey") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +type Configuration struct { + BasePath string `json:"basePath,omitempty"` + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + HTTPClient *http.Client +} + +func NewConfiguration() *Configuration { + cfg := &Configuration{ + BasePath: "https://localhost/sandboxname/sandboxname/amsi/v1", + DefaultHeader: make(map[string]string), + UserAgent: "Swagger-Codegen/1.0.0/go", + } + return cfg +} + +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} diff --git a/go-packages/meep-iot-client/docs/Addresses.md b/go-packages/meep-iot-client/docs/Addresses.md new file mode 100644 index 0000000000000000000000000000000000000000..0ea47be3b641d731492a560a536ac47da04558e0 --- /dev/null +++ b/go-packages/meep-iot-client/docs/Addresses.md @@ -0,0 +1,10 @@ +# Addresses + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | Host portion of the address. | [default to null] +**Port** | **int32** | Port portion of the address. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/DeviceInfo.md b/go-packages/meep-iot-client/docs/DeviceInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..58d4bea5a4fcabea494a2cb19d1ed0f4048399f2 --- /dev/null +++ b/go-packages/meep-iot-client/docs/DeviceInfo.md @@ -0,0 +1,25 @@ +# DeviceInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceAuthenticationInfo** | **string** | Information needed for secondary authentication of the IoT device to the data network - see ETSI TS 129 561 [i.4] and ETSI TS 129 061 [i.5] for 5G and LTE procedures, respectively. This attribute is implementation dependent and should be logically linked to the identifiers of the IoT device listed hereafter. | [default to null] +**DeviceMetadata** | [**[]KeyValuePair**](KeyValuePair.md) | Additional information about the IoT device. This attribute is implementation dependent and may be expressed as an array of keyvalue pairs. | [optional] [default to null] +**Gpsi** | **string** | GPSI of the IoT device if 5G-enabled (see note 1). | [optional] [default to null] +**Pei** | **string** | PEI of the IoT device if 5G-enabled (see note 1). | [optional] [default to null] +**Supi** | **string** | SUPI of the IoT device if 5G-enabled (see note 1). | [optional] [default to null] +**Msisdn** | **string** | MSISDN of the IoT device if LTE-enabled (see note 1). | [optional] [default to null] +**Imei** | **string** | IMEI of the IoT device if LTE-enabled (see note 1). | [optional] [default to null] +**Imsi** | **string** | IMSI of the IoT device if LTE-enabled (see note 1). | [optional] [default to null] +**Iccid** | **string** | ICCID of the IoT device (see note 1). | [optional] [default to null] +**DeviceId** | **string** | Human-readable identifier of the IoT device. | [default to null] +**RequestedMecTrafficRule** | [**[]TrafficRuleDescriptor**](TrafficRuleDescriptor.md) | MEC traffic rules the IoT device is requested to be associated to (see note 2). The data type definition is as per ETSI GS MEC 010-2 [i.6]. | [optional] [default to null] +**RequestedIotPlatformId** | **string** | IoT platform to which the IoT device is requested to be associated to (see note 2). | [optional] [default to null] +**RequestedUserTransportId** | **string** | User transport to which the IoT device is requested to be associated to (see note 2). | [optional] [default to null] +**DeviceSpecificMessageFormats** | [***DeviceSpecificMessageFormats**](DeviceSpecificMessageFormats.md) | | [optional] [default to null] +**DownlinkInfo** | [***DownlinkInfo**](DownlinkInfo.md) | | [optional] [default to null] +**ClientCertificate** | **string** | Client-side SSL/TLS certificate to be used by the MEC IoTS to interact with the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device. | [optional] [default to null] +**Enabled** | **bool** | Indication whether the IoT device has a valid associated traffic rule (TRUE) or not (FALSE). See note 3. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/DeviceSpecificMessageFormats.md b/go-packages/meep-iot-client/docs/DeviceSpecificMessageFormats.md new file mode 100644 index 0000000000000000000000000000000000000000..0869c5cb340204d6d1fa70ef89af5bb0c2bd1de9 --- /dev/null +++ b/go-packages/meep-iot-client/docs/DeviceSpecificMessageFormats.md @@ -0,0 +1,10 @@ +# DeviceSpecificMessageFormats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventMsgFormat** | [***EventMsg**](EventMsg.md) | | [optional] [default to null] +**UplinkMsgFormat** | [***UplinkMsg**](UplinkMsg.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/DownlinkInfo.md b/go-packages/meep-iot-client/docs/DownlinkInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..ba3d84cf2027f40553d755cf7db72df55f5f02ac --- /dev/null +++ b/go-packages/meep-iot-client/docs/DownlinkInfo.md @@ -0,0 +1,10 @@ +# DownlinkInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DownlinkTopic** | **string** | Topic associated to the IoT device. This topic should be used by an end IoT application to send downlink data to the IoT device. | [optional] [default to null] +**DevicePort** | **int32** | UDP port to be used by the MEC IoTS for the outgoing downlink packets towards the IoT device. In case a default value is used, this attribute is optional. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/EndPointInfo.md b/go-packages/meep-iot-client/docs/EndPointInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..9c6821ec76242fbf621b7a23f5e57ff1a0be6cf9 --- /dev/null +++ b/go-packages/meep-iot-client/docs/EndPointInfo.md @@ -0,0 +1,12 @@ +# EndPointInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uris** | **[]string** | Entry point information of the service as string, formatted according to URI syntax (see IETF RFC 3986 [8]). Shall be used for REST APIs. See note. | [optional] [default to null] +**Fqdn** | **[]string** | Fully Qualified Domain Name of the service. See note. | [optional] [default to null] +**Addresses** | [**[]Addresses**](Addresses.md) | | [optional] [default to null] +**Alternative** | **string** | Entry point information of the service in a format defined by an implementation, or in an external specification. See note. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/EventMsg.md b/go-packages/meep-iot-client/docs/EventMsg.md new file mode 100644 index 0000000000000000000000000000000000000000..c5af0adb4cac45b4ad4ae257c71d4e25f83fa63c --- /dev/null +++ b/go-packages/meep-iot-client/docs/EventMsg.md @@ -0,0 +1,18 @@ +# EventMsg + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventTopic** | **string** | Topic where the message containing application-specific information should be published. | [default to null] +**SelectedSerializer** | [***SerializerType**](SerializerType.md) | | [default to null] +**IncludeDeviceAddr** | **bool** | Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeDeviceMetadata** | **bool** | Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludePei** | **bool** | Indication whether to include the PEI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeSupi** | **bool** | Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeImei** | **bool** | Indication whether to include the IMEI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeImsi** | **bool** | Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeIccid** | **bool** | Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeDeviceId** | **bool** | Indication whether to include the human-readable identified of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/ImplSpecificInfo.md b/go-packages/meep-iot-client/docs/ImplSpecificInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..80c29e783782c08ed12c835712f8e95d51511e0d --- /dev/null +++ b/go-packages/meep-iot-client/docs/ImplSpecificInfo.md @@ -0,0 +1,11 @@ +# ImplSpecificInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventTopics** | **[]string** | Topics used to publish events related to the established session between the IoT device(s) and the end IoT application(s) on the user transport. | [optional] [default to null] +**UplinkTopics** | **[]string** | Topics used to publish data generated by the IoT device(s) on the user transport, in order to be consumed by the end IoT application(s). | [optional] [default to null] +**DownlinkTopics** | **[]string** | Topics used to publish data generated by the IoT applications(s) on the user transport, in order to be consumed by the end IoT device(s). | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/InlineResponse200.md b/go-packages/meep-iot-client/docs/InlineResponse200.md new file mode 100644 index 0000000000000000000000000000000000000000..09b79cb8416034f0564b3459c5294fffc71a585a --- /dev/null +++ b/go-packages/meep-iot-client/docs/InlineResponse200.md @@ -0,0 +1,9 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [***DeviceInfo**](DeviceInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/InlineResponse2001.md b/go-packages/meep-iot-client/docs/InlineResponse2001.md new file mode 100644 index 0000000000000000000000000000000000000000..cacfbb80487867c65da1c653668bb468ce286d36 --- /dev/null +++ b/go-packages/meep-iot-client/docs/InlineResponse2001.md @@ -0,0 +1,9 @@ +# InlineResponse2001 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IotPlatformInfo** | [***IotPlatformInfo**](IotPlatformInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/InterfaceDescriptor.md b/go-packages/meep-iot-client/docs/InterfaceDescriptor.md new file mode 100644 index 0000000000000000000000000000000000000000..6be8d4353e414ab89f0d904a2a0cba1517458172 --- /dev/null +++ b/go-packages/meep-iot-client/docs/InterfaceDescriptor.md @@ -0,0 +1,13 @@ +# InterfaceDescriptor + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InterfaceType** | **string** | Type of interface: TUNNEL, MAC, IP, etc. | [default to null] +**TunnelInfo** | [***TunnelInfo**](TunnelInfo.md) | | [optional] [default to null] +**SrcMACAddress** | **string** | If the interface type is MAC, the source address identifies the MAC address of the interface. | [optional] [default to null] +**DstMACAddress** | **string** | If the interface type is MAC, the destination address identifies the MAC address of the destination. Only used for dstInterface. | [optional] [default to null] +**DstIPAddress** | **string** | If the interface type is IP, the destination address identifies the IP address of the destination. Only used for dstInterface. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/IotPlatformInfo.md b/go-packages/meep-iot-client/docs/IotPlatformInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..d96c7a45ccb0d3add34e21aaab469605d97bd177 --- /dev/null +++ b/go-packages/meep-iot-client/docs/IotPlatformInfo.md @@ -0,0 +1,12 @@ +# IotPlatformInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IotPlatformId** | **string** | Identifier of the IoT platform. | [default to null] +**UserTransportInfo** | [**[]MbTransportInfo**](MBTransportInfo.md) | Information about the user transport(s) provided by the IoT platform. | [default to null] +**CustomServicesTransportInfo** | [**[]TransportInfo**](TransportInfo.md) | Transport enabling access to vendor-specific services provided by the IoT platform. The data type definition is as per ETSI GS MEC 011 [i.2]. | [optional] [default to null] +**Enabled** | **bool** | Indication whether the IoT platform is capable of providing user transports and vendor-specific services (TRUE) or not (FALSE). | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/KeyValuePair.md b/go-packages/meep-iot-client/docs/KeyValuePair.md new file mode 100644 index 0000000000000000000000000000000000000000..45ef9c0e85767dc613e04364bf3adfc577c57014 --- /dev/null +++ b/go-packages/meep-iot-client/docs/KeyValuePair.md @@ -0,0 +1,10 @@ +# KeyValuePair + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | | [optional] [default to null] +**Value** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/MbTransportInfo.md b/go-packages/meep-iot-client/docs/MbTransportInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..6a68795f954541145bf1838304977b550a7cd68b --- /dev/null +++ b/go-packages/meep-iot-client/docs/MbTransportInfo.md @@ -0,0 +1,17 @@ +# MbTransportInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The identifier of this transport as per ETSI GS MEC 011 [i.2]. | [default to null] +**Name** | **string** | The name of this transport as per ETSI GS MEC 011 [i.2]. | [default to null] +**Description** | **string** | Human-readable description of this transport as per ETSI GS MEC 011 [i.2]. | [optional] [default to null] +**Type_** | [***TransportType**](TransportType.md) | | [default to null] +**Protocol** | **string** | The name of the protocol used. Being the transport of MB_TOPIC_BASED type, this attribute should be typically set to \"MQTT\" or \"AMQP.\" | [default to null] +**Version** | **string** | The version of the protocol used as per ETSI GS MEC 011 [i.2]. | [default to null] +**Endpoint** | [***EndPointInfo**](EndPointInfo.md) | | [default to null] +**Security** | [***SecurityInfo**](SecurityInfo.md) | | [default to null] +**ImplSpecificInfo** | [***ImplSpecificInfo**](ImplSpecificInfo.md) | | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/OAuth2Info.md b/go-packages/meep-iot-client/docs/OAuth2Info.md new file mode 100644 index 0000000000000000000000000000000000000000..2036501367684811b6b51823f52c3b4b64a26fcb --- /dev/null +++ b/go-packages/meep-iot-client/docs/OAuth2Info.md @@ -0,0 +1,10 @@ +# OAuth2Info + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GrantTypes** | **[]string** | List of supported OAuth 2.0 grant types. Each entry shall be one of the following permitted values: - OAUTH2_AUTHORIZATION_CODE: Authorization code grant type - OAUTH2_IMPLICIT_GRANT: Implicit grant type - OAUTH2_RESOURCE_OWNER: Resource owner password credentials grant type - OAUTH2_CLIENT_CREDENTIALS: Client credentials grant type Only the value \"OAUTH2_CLIENT_CREDENTIALS\" is supported in the present document. | [default to null] +**TokenEndpoint** | **string** | The token endpoint. Shall be present unless the grant type is OAUTH2_IMPLICIT_GRANT. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/ProblemDetails.md b/go-packages/meep-iot-client/docs/ProblemDetails.md new file mode 100644 index 0000000000000000000000000000000000000000..f2596ffa3944f557c5f98c6a7ff38b6430c3dd58 --- /dev/null +++ b/go-packages/meep-iot-client/docs/ProblemDetails.md @@ -0,0 +1,13 @@ +# ProblemDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type_** | **string** | A URI reference according to IETF RFC 3986 that identifies the problem type | [optional] [default to null] +**Title** | **string** | A short, human-readable summary of the problem type | [optional] [default to null] +**Status** | **int32** | The HTTP status code for this occurrence of the problem | [optional] [default to null] +**Detail** | **string** | A human-readable explanation specific to this occurrence of the problem | [optional] [default to null] +**Instance** | **string** | A URI reference that identifies the specific occurrence of the problem | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/RegDevApi.md b/go-packages/meep-iot-client/docs/RegDevApi.md new file mode 100644 index 0000000000000000000000000000000000000000..6927235585df40767313da72af2385176f36bafb --- /dev/null +++ b/go-packages/meep-iot-client/docs/RegDevApi.md @@ -0,0 +1,160 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/sandboxname/amsi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RegistereddevicesByIdDELETE**](RegDevApi.md#RegistereddevicesByIdDELETE) | **Delete** /registered_devices/{registeredDeviceId} | Deregister a device - see clause 5.2.6. +[**RegistereddevicesByIdGET**](RegDevApi.md#RegistereddevicesByIdGET) | **Get** /registered_devices/{registeredDeviceId} | Retrieve information about a device - see clause 5.2.4. +[**RegistereddevicesByIdPUT**](RegDevApi.md#RegistereddevicesByIdPUT) | **Put** /registered_devices/{registeredDeviceId} | Update information about a device including its association to a valid traffic rule - see clauses 5.2.5 and 5.4.3. +[**RegistereddevicesGET**](RegDevApi.md#RegistereddevicesGET) | **Get** /registered_devices | Retrieve information about all devices with a valid traffic rule association - see clause 5.2.2. +[**RegistereddevicesPOST**](RegDevApi.md#RegistereddevicesPOST) | **Post** /registered_devices | Register a new device - see clause 5.2.3. + +# **RegistereddevicesByIdDELETE** +> RegistereddevicesByIdDELETE(ctx, registeredDeviceId) +Deregister a device - see clause 5.2.6. + +The DELETE method may be used by a service consumer to deregister a device. This method is typically used in the \"device deregistration\" procedure as described in clause 5.2.6. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registeredDeviceId** | **string**| The unique identifier of the registered device. | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegistereddevicesByIdGET** +> RegisteredDevicesBody RegistereddevicesByIdGET(ctx, registeredDeviceId) +Retrieve information about a device - see clause 5.2.4. + +The GET method may be used by a service consumer to retrieve information about a device. This method is typically used in the \"device registration query\" procedure as described in clause 5.2.4. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registeredDeviceId** | **string**| The unique identifier of the registered device. | + +### Return type + +[**RegisteredDevicesBody**](registered_devices_body.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegistereddevicesByIdPUT** +> RegisteredDevicesRegisteredDeviceIdBody RegistereddevicesByIdPUT(ctx, body, registeredDeviceId) +Update information about a device including its association to a valid traffic rule - see clauses 5.2.5 and 5.4.3. + +The PUT method may be used by a service consumer to update a device registration including its association to a valid traffic rule. This method is typically used in the \"device registration update\" procedure as described in clause 5.2.5 and in the \"user transport assignment\" procedure as described in clause 5.4.3. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**RegisteredDevicesRegisteredDeviceIdBody**](RegisteredDevicesRegisteredDeviceIdBody.md)| One or more updated attributes that are allowed to be changed are included in the DeviceInfo data structure in the payload body of the request. . | + **registeredDeviceId** | **string**| The unique identifier of the registered device. | + +### Return type + +[**RegisteredDevicesRegisteredDeviceIdBody**](registered_devices_registeredDeviceId_body.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegistereddevicesGET** +> InlineResponse200 RegistereddevicesGET(ctx, optional) +Retrieve information about all devices with a valid traffic rule association - see clause 5.2.2. + +The GET method may be used by a service consumer to retrieve information about all devices with a valid traffic rule association. This method is typically used in the \"registered devices query\" procedure as described in clause 5.2.2. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***RegDevApiRegistereddevicesGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a RegDevApiRegistereddevicesGETOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filter** | **optional.String**| Attribute-based filtering parameters according to ETSI GS MEC 009 [i.1]. The API producer shall support receiving the following filtering parameters as part of the URI query string: \"(eq,enabled,TRUE)\". | + **fields** | [**optional.Interface of []string**](string.md)| The list may contain one or more of the following attributes from the DeviceInfo data type: - deviceMetadata - gpsi - msisdn - deviceId - requestedMecTrafficRule - requestedIotPlatformId - requestedUserTransportId | + +### Return type + +[**InlineResponse200**](inline_response_200.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegistereddevicesPOST** +> RegisteredDevicesBody RegistereddevicesPOST(ctx, body) +Register a new device - see clause 5.2.3. + +The POST method may be used by a service consumer to register a new device. This method is typically used in the \"device registration\" procedure as described in clause 5.2.3. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**RegisteredDevicesBody**](RegisteredDevicesBody.md)| Payload body in the request contains the information associated to the IoT device to be registered. | + +### Return type + +[**RegisteredDevicesBody**](registered_devices_body.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/RegIotPlatApi.md b/go-packages/meep-iot-client/docs/RegIotPlatApi.md new file mode 100644 index 0000000000000000000000000000000000000000..3041d85f50b2c75458a2e2b7eb598263178aa413 --- /dev/null +++ b/go-packages/meep-iot-client/docs/RegIotPlatApi.md @@ -0,0 +1,167 @@ +# {{classname}} + +All URIs are relative to *https://localhost/sandboxname/sandboxname/amsi/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RegisterediotplatformsByIdDELETE**](RegIotPlatApi.md#RegisterediotplatformsByIdDELETE) | **Delete** /registered_iot_platforms/{registeredIotPlatformId} | Deregister a IoT platform - see clause 5.3.6. +[**RegisterediotplatformsByIdGET**](RegIotPlatApi.md#RegisterediotplatformsByIdGET) | **Get** /registered_iot_platforms/{registeredIotPlatformId} | Discover native services and obtain information about user transports provided by a IoT platform - see clauses 5.3.3 and 5.4.2. +[**RegisterediotplatformsByIdPUT**](RegIotPlatApi.md#RegisterediotplatformsByIdPUT) | **Put** /registered_iot_platforms/{registeredIotPlatformId} | Update information about a IoT platform - see clause 5.3.5. +[**RegisterediotplatformsGET**](RegIotPlatApi.md#RegisterediotplatformsGET) | **Get** /registered_iot_platforms | Retrieve information about all IoT platforms - see clause 5.3.2. +[**RegisterediotplatformsPOST**](RegIotPlatApi.md#RegisterediotplatformsPOST) | **Post** /registered_iot_platforms | Register a IoT platform - see clause 5.3.4. + +# **RegisterediotplatformsByIdDELETE** +> RegisterediotplatformsByIdDELETE(ctx, registeredIotPlatformId) +Deregister a IoT platform - see clause 5.3.6. + +The DELETE method may be used by a service consumer to deregister a IoT platform. This method is typically used in the \"IoT platform deregistration\" procedure as described in clause 5.3.6. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registeredIotPlatformId** | **string**| The unique identifier of the registered IoT platform. | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegisterediotplatformsByIdGET** +> InlineResponse2001 RegisterediotplatformsByIdGET(ctx, registeredIotPlatformId, optional) +Discover native services and obtain information about user transports provided by a IoT platform - see clauses 5.3.3 and 5.4.2. + +The GET method may be used by a service consumer to obtain information about a IoT platform. This method is typically used in the \"IoT platform information request\" procedure as described in clause 5.3.3 and in the \"user transport query\" procedure as described in clause 5.4.2. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **registeredIotPlatformId** | **string**| The unique identifier of the registered IoT platform. | + **optional** | ***RegIotPlatApiRegisterediotplatformsByIdGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a RegIotPlatApiRegisterediotplatformsByIdGETOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | [**optional.Interface of []string**](string.md)| The list may contain one or more of the following attributes from the IotPlatformInfo data type: - userTransportInfo - customServiceTransportInfo | + +### Return type + +[**InlineResponse2001**](inline_response_200_1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegisterediotplatformsByIdPUT** +> RegisteredIotPlatformsRegisteredIotPlatformIdBody RegisterediotplatformsByIdPUT(ctx, body, registeredIotPlatformId) +Update information about a IoT platform - see clause 5.3.5. + +The PUT method may be used by a service consumer to update a IoT platform registration. This method is typically used in the \"IoT platform update\" procedure as described in clause 5.3.5. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**RegisteredIotPlatformsRegisteredIotPlatformIdBody**](RegisteredIotPlatformsRegisteredIotPlatformIdBody.md)| One or more updated attributes that are allowed to be changed are included in the IotPlatformInfo data structure in the payload body of the request. . | + **registeredIotPlatformId** | **string**| The unique identifier of the registered IoT platform. | + +### Return type + +[**RegisteredIotPlatformsRegisteredIotPlatformIdBody**](registered_iot_platforms_registeredIotPlatformId_body.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegisterediotplatformsGET** +> []IotPlatformInfo RegisterediotplatformsGET(ctx, optional) +Retrieve information about all IoT platforms - see clause 5.3.2. + +The GET method may be used by an authorized service consumer to retrieve the information of all currently registered IoT platforms. This method is typically used in the \"registered IoT platforms query\" procedure as described in clause 5.3.2. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***RegIotPlatApiRegisterediotplatformsGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a RegIotPlatApiRegisterediotplatformsGETOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | [**optional.Interface of []string**](string.md)| The list shall contain the following attributes from the IotPlatformInfo data type: - iotPlatformId - enabled | + +### Return type + +[**[]IotPlatformInfo**](IotPlatformInfo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RegisterediotplatformsPOST** +> RegisteredIotPlatformsBody RegisterediotplatformsPOST(ctx, body) +Register a IoT platform - see clause 5.3.4. + +The POST method may be used by a service consumer to register a new IoT platform. This method is typically used in the \"IoT platform registration\" procedure as described in clause 5.3.4. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**RegisteredIotPlatformsBody**](RegisteredIotPlatformsBody.md)| Payload body in the request contains the information associated to the IoT platform to be registered. | + +### Return type + +[**RegisteredIotPlatformsBody**](registered_iot_platforms_body.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/problem+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/RegisteredDevicesBody.md b/go-packages/meep-iot-client/docs/RegisteredDevicesBody.md new file mode 100644 index 0000000000000000000000000000000000000000..71941e93c2da461f6a7166fdf892e7241dac59b1 --- /dev/null +++ b/go-packages/meep-iot-client/docs/RegisteredDevicesBody.md @@ -0,0 +1,9 @@ +# RegisteredDevicesBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceInfo** | [***DeviceInfo**](DeviceInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/RegisteredDevicesRegisteredDeviceIdBody.md b/go-packages/meep-iot-client/docs/RegisteredDevicesRegisteredDeviceIdBody.md new file mode 100644 index 0000000000000000000000000000000000000000..b12c05bbba03477ee220a3101e44540de80255d4 --- /dev/null +++ b/go-packages/meep-iot-client/docs/RegisteredDevicesRegisteredDeviceIdBody.md @@ -0,0 +1,9 @@ +# RegisteredDevicesRegisteredDeviceIdBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceInfo** | [***DeviceInfo**](DeviceInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/RegisteredIotPlatformsBody.md b/go-packages/meep-iot-client/docs/RegisteredIotPlatformsBody.md new file mode 100644 index 0000000000000000000000000000000000000000..a1c2c0aa18f7839ab30475ca7e21210738025c76 --- /dev/null +++ b/go-packages/meep-iot-client/docs/RegisteredIotPlatformsBody.md @@ -0,0 +1,9 @@ +# RegisteredIotPlatformsBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IoTPlatformInfo** | [***IotPlatformInfo**](IotPlatformInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/RegisteredIotPlatformsRegisteredIotPlatformIdBody.md b/go-packages/meep-iot-client/docs/RegisteredIotPlatformsRegisteredIotPlatformIdBody.md new file mode 100644 index 0000000000000000000000000000000000000000..0c63b652609d88bdc3908e256ca1ac16037d4464 --- /dev/null +++ b/go-packages/meep-iot-client/docs/RegisteredIotPlatformsRegisteredIotPlatformIdBody.md @@ -0,0 +1,9 @@ +# RegisteredIotPlatformsRegisteredIotPlatformIdBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IotPlatformInfo** | [***IotPlatformInfo**](IotPlatformInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/SecurityInfo.md b/go-packages/meep-iot-client/docs/SecurityInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..40559b94e7342cf62667b91ff104bb69886fab15 --- /dev/null +++ b/go-packages/meep-iot-client/docs/SecurityInfo.md @@ -0,0 +1,10 @@ +# SecurityInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OAuth2Info** | [***OAuth2Info**](OAuth2Info.md) | | [optional] [default to null] +**Extensions** | **string** | Extensions for alternative transport mechanisms. These extensions depend on the actual transport and are out of scope of the present document. For instance, such extensions may be used to signal the necessary parameters for the client to use TLS-based authorization defined for alternative transports (see ETSI GS MEC 009 [5] for more information). | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/SerializerType.md b/go-packages/meep-iot-client/docs/SerializerType.md new file mode 100644 index 0000000000000000000000000000000000000000..210b392935244c534261a0ea886a64ca67431069 --- /dev/null +++ b/go-packages/meep-iot-client/docs/SerializerType.md @@ -0,0 +1,8 @@ +# SerializerType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/TrafficFilter.md b/go-packages/meep-iot-client/docs/TrafficFilter.md new file mode 100644 index 0000000000000000000000000000000000000000..12438dd2ff1d4674fd60d64dd12f6aaa46c06065 --- /dev/null +++ b/go-packages/meep-iot-client/docs/TrafficFilter.md @@ -0,0 +1,23 @@ +# TrafficFilter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SrcAddress** | **[]string** | An IP address or a range of IP addresses. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes. | [optional] [default to null] +**DstAddress** | **[]string** | An IP address or a range of IP addresses. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes. | [optional] [default to null] +**SrcPort** | **[]string** | A port or a range of ports. | [optional] [default to null] +**DstPort** | **[]string** | A port or a range of ports. | [optional] [default to null] +**Protocol** | **[]string** | Specify the protocol of the traffic filter. | [optional] [default to null] +**Tag** | **[]string** | Used for tag based traffic rule. | [optional] [default to null] +**Uri** | **[]string** | An URI label, in application layer, i.e. in HTTP message, is used to filter the traffic. | [optional] [default to null] +**PacketLabel** | **[]string** | A customized packet label in network layer, as defined by the owner of the MEC platform, is used to filter the traffic. | [optional] [default to null] +**SrcTunnelAddress** | **[]string** | Used for GTP tunnel based traffic rule. | [optional] [default to null] +**TgtTunnelAddress** | **[]string** | Used for GTP tunnel based traffic rule. | [optional] [default to null] +**SrcTunnelPort** | **[]string** | Used for GTP tunnel based traffic rule. | [optional] [default to null] +**DstTunnelPort** | **[]string** | Used for GTP tunnel based traffic rule. | [optional] [default to null] +**QCI** | **int32** | Used to match all packets that have the same QCI. | [optional] [default to null] +**DSCP** | **int32** | Used to match all IPv4 packets that have the same DSCP. | [optional] [default to null] +**TC** | **int32** | Used to match all IPv6 packets that have the same TC. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/TrafficRuleDescriptor.md b/go-packages/meep-iot-client/docs/TrafficRuleDescriptor.md new file mode 100644 index 0000000000000000000000000000000000000000..149fa1216faed5688c8e68d05e72ee974ad63531 --- /dev/null +++ b/go-packages/meep-iot-client/docs/TrafficRuleDescriptor.md @@ -0,0 +1,14 @@ +# TrafficRuleDescriptor + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TrafficRuleId** | **string** | Identifies the traffic rule. | [default to null] +**FilterType** | **string** | Definition of filter type: per FLOW or PACKET If it is per FLOW, the filter matches upstream (e.g. UE->EPC) packets and downstream (e.g. EPC->UE) packets are handled by the same context. | [default to null] +**Priority** | **int32** | Priority of this traffic rule within the range 0 to 255. If traffic rule conflicts, the one with higher priority take precedence. See note 1. | [default to null] +**TrafficFilter** | [**[]TrafficFilter**](TrafficFilter.md) | The filter used to identify specific flow/packets that need to be handled by the MEC host. | [default to null] +**Action** | **string** | Identifies the action of the MEC host data plane, when a packet matches the trafficFilter, the example actions include: DROP, FORWARD_DECAPSULATED, FORWARD_ENCAPSULATED, PASSTHROUGH, DUPLICATE_DECAPSULATED, DUPLICATE_ENCAPSULATED | [default to null] +**DstInterface** | [***InterfaceDescriptor**](InterfaceDescriptor.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/TransportInfo.md b/go-packages/meep-iot-client/docs/TransportInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..df89530928f7e66de6d6387ac8c39a1e2cdfd3f1 --- /dev/null +++ b/go-packages/meep-iot-client/docs/TransportInfo.md @@ -0,0 +1,17 @@ +# TransportInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The identifier of this transport. | [default to null] +**Name** | **string** | The name of this transport. | [default to null] +**Description** | **string** | Human-readable description of this transport. | [optional] [default to null] +**Type_** | [***TransportType**](TransportType.md) | | [default to null] +**Protocol** | **string** | The name of the protocol used. Shall be set to \"HTTP\" for a REST API. | [default to null] +**Version** | **string** | The version of the protocol used. | [default to null] +**Endpoint** | [***EndPointInfo**](EndPointInfo.md) | | [default to null] +**Security** | [***SecurityInfo**](SecurityInfo.md) | | [default to null] +**ImplSpecificInfo** | **string** | Additional implementation specific details of the transport. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/TransportType.md b/go-packages/meep-iot-client/docs/TransportType.md new file mode 100644 index 0000000000000000000000000000000000000000..46cc250c00bccbe02d268207efd77e07b56be0bf --- /dev/null +++ b/go-packages/meep-iot-client/docs/TransportType.md @@ -0,0 +1,8 @@ +# TransportType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/TunnelInfo.md b/go-packages/meep-iot-client/docs/TunnelInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..e10e407945f89f1676ceb1140845e4e50e55652b --- /dev/null +++ b/go-packages/meep-iot-client/docs/TunnelInfo.md @@ -0,0 +1,12 @@ +# TunnelInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TunnelType** | **string** | Type of tunnel: GTP-U, GRE, etc. | [default to null] +**TunnelDstAddress** | **string** | Destination address of the tunnel. | [default to null] +**TunnelSrcAddress** | **string** | Source address of the tunnel. | [default to null] +**TunnelSpecificData** | **string** | Parameters specific to the tunnel. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/docs/UplinkMsg.md b/go-packages/meep-iot-client/docs/UplinkMsg.md new file mode 100644 index 0000000000000000000000000000000000000000..e9b87571debb98fefdcadadeb4b12f622d23315d --- /dev/null +++ b/go-packages/meep-iot-client/docs/UplinkMsg.md @@ -0,0 +1,19 @@ +# UplinkMsg + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UplinkTopic** | **string** | Topic where the message containing the data generated by the IoT device(s) should be published, in order to be consumed by the end IoT application(s). | [default to null] +**SelectedSerializer** | [***SerializerType**](SerializerType.md) | | [default to null] +**IncludeDevicePort** | **bool** | Indication whether to include the UDP port of the remote IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeDeviceAddr** | **bool** | Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeDeviceMetadata** | **bool** | Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludePei** | **bool** | Indication whether to include the PEI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeSupi** | **bool** | Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeImei** | **bool** | Indication whether to include the IMEI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeImsi** | **bool** | Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeIccid** | **bool** | Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] +**IncludeDeviceId** | **bool** | Indication whether to include the human-readable identified of the IoT device (TRUE) or not (FALSE). | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/go-packages/meep-iot-client/git_push.sh b/go-packages/meep-iot-client/git_push.sh new file mode 100644 index 0000000000000000000000000000000000000000..ae01b182ae9eb047d0999a496b060e62d7b01e5c --- /dev/null +++ b/go-packages/meep-iot-client/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/go-packages/meep-iot-client/go.mod b/go-packages/meep-iot-client/go.mod new file mode 100644 index 0000000000000000000000000000000000000000..c7c885ac241e06a716355f6849a20932faff6d1d --- /dev/null +++ b/go-packages/meep-iot-client/go.mod @@ -0,0 +1,8 @@ +module github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-iot-client + +go 1.16 + +require ( + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 +) diff --git a/go-packages/meep-iot-client/go.sum b/go-packages/meep-iot-client/go.sum new file mode 100644 index 0000000000000000000000000000000000000000..aafb344a88e584026c4ef64175c1fde271fe58ec --- /dev/null +++ b/go-packages/meep-iot-client/go.sum @@ -0,0 +1,369 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/go-packages/meep-iot-client/model_addresses.go b/go-packages/meep-iot-client/model_addresses.go new file mode 100644 index 0000000000000000000000000000000000000000..d80ec623492dc5fa2d525b060b6cd8af1551fcc4 --- /dev/null +++ b/go-packages/meep-iot-client/model_addresses.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// Entry point information of the service as one or more pairs of IP address and port. See note. +type Addresses struct { + // Host portion of the address. + Host string `json:"host"` + // Port portion of the address. + Port int32 `json:"port"` +} diff --git a/go-packages/meep-iot-client/model_device_info.go b/go-packages/meep-iot-client/model_device_info.go new file mode 100644 index 0000000000000000000000000000000000000000..07a4db86f903043a58a977da512a26e21e3e7538 --- /dev/null +++ b/go-packages/meep-iot-client/model_device_info.go @@ -0,0 +1,46 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// NOTE 1: At least one attribute among gpsi, pei, supi, msisdn, imei, imsi, and iccid should be provided. Sufficient security measures shall be put in place when any attribute among PEI, SUPI, IMEI, and IMSI is disclosed over the API. NOTE 2: Until a valid traffic rule is not provided, the device will not be able to use the IoTS. A valid traffic rule is provided by one of the following options: • the requestedMecTrafficRule attribute; • the requestedIotPlatformId attribute when the IoT platform offers only one user transport; • the combination of requestedIotPlatformId and requestedUserTransportId. NOTE 3: Enabled is a pseudo-attribute which needs to be maintained by the IoTS based on the presence or not of a valid traffic rule associated to the device. It cannot be set directly by the service consumer. +type DeviceInfo struct { + // Information needed for secondary authentication of the IoT device to the data network - see ETSI TS 129 561 [i.4] and ETSI TS 129 061 [i.5] for 5G and LTE procedures, respectively. This attribute is implementation dependent and should be logically linked to the identifiers of the IoT device listed hereafter. + DeviceAuthenticationInfo string `json:"deviceAuthenticationInfo"` + // Additional information about the IoT device. This attribute is implementation dependent and may be expressed as an array of keyvalue pairs. + DeviceMetadata []KeyValuePair `json:"deviceMetadata,omitempty"` + // GPSI of the IoT device if 5G-enabled (see note 1). + Gpsi string `json:"gpsi,omitempty"` + // PEI of the IoT device if 5G-enabled (see note 1). + Pei string `json:"pei,omitempty"` + // SUPI of the IoT device if 5G-enabled (see note 1). + Supi string `json:"supi,omitempty"` + // MSISDN of the IoT device if LTE-enabled (see note 1). + Msisdn string `json:"msisdn,omitempty"` + // IMEI of the IoT device if LTE-enabled (see note 1). + Imei string `json:"imei,omitempty"` + // IMSI of the IoT device if LTE-enabled (see note 1). + Imsi string `json:"imsi,omitempty"` + // ICCID of the IoT device (see note 1). + Iccid string `json:"iccid,omitempty"` + // Human-readable identifier of the IoT device. + DeviceId string `json:"deviceId"` + // MEC traffic rules the IoT device is requested to be associated to (see note 2). The data type definition is as per ETSI GS MEC 010-2 [i.6]. + RequestedMecTrafficRule []TrafficRuleDescriptor `json:"requestedMecTrafficRule,omitempty"` + // IoT platform to which the IoT device is requested to be associated to (see note 2). + RequestedIotPlatformId string `json:"requestedIotPlatformId,omitempty"` + // User transport to which the IoT device is requested to be associated to (see note 2). + RequestedUserTransportId string `json:"requestedUserTransportId,omitempty"` + DeviceSpecificMessageFormats *DeviceSpecificMessageFormats `json:"deviceSpecificMessageFormats,omitempty"` + DownlinkInfo *DownlinkInfo `json:"downlinkInfo,omitempty"` + // Client-side SSL/TLS certificate to be used by the MEC IoTS to interact with the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device. + ClientCertificate string `json:"clientCertificate,omitempty"` + // Indication whether the IoT device has a valid associated traffic rule (TRUE) or not (FALSE). See note 3. + Enabled bool `json:"enabled"` +} diff --git a/go-packages/meep-iot-client/model_device_specific_message_formats.go b/go-packages/meep-iot-client/model_device_specific_message_formats.go new file mode 100644 index 0000000000000000000000000000000000000000..8a2acc77017cbe32a706e90347f9135e5c2ff65d --- /dev/null +++ b/go-packages/meep-iot-client/model_device_specific_message_formats.go @@ -0,0 +1,16 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// Format of the messages to be published by the MEC IoTS on the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device. +type DeviceSpecificMessageFormats struct { + EventMsgFormat *EventMsg `json:"eventMsgFormat,omitempty"` + UplinkMsgFormat *UplinkMsg `json:"uplinkMsgFormat,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_downlink_info.go b/go-packages/meep-iot-client/model_downlink_info.go new file mode 100644 index 0000000000000000000000000000000000000000..98e3c84481bd909ea349e9cacf4e5e463c7daaee --- /dev/null +++ b/go-packages/meep-iot-client/model_downlink_info.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// Downlink communication configuration of the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device. +type DownlinkInfo struct { + // Topic associated to the IoT device. This topic should be used by an end IoT application to send downlink data to the IoT device. + DownlinkTopic string `json:"downlinkTopic,omitempty"` + // UDP port to be used by the MEC IoTS for the outgoing downlink packets towards the IoT device. In case a default value is used, this attribute is optional. + DevicePort int32 `json:"devicePort,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_end_point_info.go b/go-packages/meep-iot-client/model_end_point_info.go new file mode 100644 index 0000000000000000000000000000000000000000..838e53977baea16643f88eb2086f5d7c36f40cb3 --- /dev/null +++ b/go-packages/meep-iot-client/model_end_point_info.go @@ -0,0 +1,21 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// NOTE: Exactly one of \"uris\", \"fqdn\", \"addresses\" or \"alternative\" shall be present. +type EndPointInfo struct { + // Entry point information of the service as string, formatted according to URI syntax (see IETF RFC 3986 [8]). Shall be used for REST APIs. See note. + Uris []string `json:"uris,omitempty"` + // Fully Qualified Domain Name of the service. See note. + Fqdn []string `json:"fqdn,omitempty"` + Addresses []Addresses `json:"addresses,omitempty"` + // Entry point information of the service in a format defined by an implementation, or in an external specification. See note. + Alternative string `json:"alternative,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_event_msg.go b/go-packages/meep-iot-client/model_event_msg.go new file mode 100644 index 0000000000000000000000000000000000000000..b9f1541a82260b29dd79c8f3a94d7309744a4cde --- /dev/null +++ b/go-packages/meep-iot-client/model_event_msg.go @@ -0,0 +1,32 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type EventMsg struct { + // Topic where the message containing application-specific information should be published. + EventTopic string `json:"eventTopic"` + SelectedSerializer *SerializerType `json:"selectedSerializer"` + // Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE). + IncludeDeviceAddr bool `json:"includeDeviceAddr,omitempty"` + // Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE). + IncludeDeviceMetadata bool `json:"includeDeviceMetadata,omitempty"` + // Indication whether to include the PEI of the IoT device (TRUE) or not (FALSE). + IncludePei bool `json:"includePei,omitempty"` + // Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE). + IncludeSupi bool `json:"includeSupi,omitempty"` + // Indication whether to include the IMEI of the IoT device (TRUE) or not (FALSE). + IncludeImei bool `json:"includeImei,omitempty"` + // Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE). + IncludeImsi bool `json:"includeImsi,omitempty"` + // Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE). + IncludeIccid bool `json:"includeIccid,omitempty"` + // Indication whether to include the human-readable identified of the IoT device (TRUE) or not (FALSE). + IncludeDeviceId bool `json:"includeDeviceId,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_impl_specific_info.go b/go-packages/meep-iot-client/model_impl_specific_info.go new file mode 100644 index 0000000000000000000000000000000000000000..421f8e0ca6d9c490f8897412ee4ff851a4d191f9 --- /dev/null +++ b/go-packages/meep-iot-client/model_impl_specific_info.go @@ -0,0 +1,20 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// Additional implementation specific details of the transport. +type ImplSpecificInfo struct { + // Topics used to publish events related to the established session between the IoT device(s) and the end IoT application(s) on the user transport. + EventTopics []string `json:"eventTopics,omitempty"` + // Topics used to publish data generated by the IoT device(s) on the user transport, in order to be consumed by the end IoT application(s). + UplinkTopics []string `json:"uplinkTopics,omitempty"` + // Topics used to publish data generated by the IoT applications(s) on the user transport, in order to be consumed by the end IoT device(s). + DownlinkTopics []string `json:"downlinkTopics,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_inline_response_200.go b/go-packages/meep-iot-client/model_inline_response_200.go new file mode 100644 index 0000000000000000000000000000000000000000..97b7b09433f0d63c0588ceecae36d4fff0075a86 --- /dev/null +++ b/go-packages/meep-iot-client/model_inline_response_200.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type InlineResponse200 struct { + Items *DeviceInfo `json:"items,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_inline_response_200_1.go b/go-packages/meep-iot-client/model_inline_response_200_1.go new file mode 100644 index 0000000000000000000000000000000000000000..d7c5953f54a7325ff762666461c4c3600174d682 --- /dev/null +++ b/go-packages/meep-iot-client/model_inline_response_200_1.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type InlineResponse2001 struct { + IotPlatformInfo *IotPlatformInfo `json:"IotPlatformInfo,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_interface_descriptor.go b/go-packages/meep-iot-client/model_interface_descriptor.go new file mode 100644 index 0000000000000000000000000000000000000000..374dc01da923bf104d55df32347fcd52ec068247 --- /dev/null +++ b/go-packages/meep-iot-client/model_interface_descriptor.go @@ -0,0 +1,22 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type InterfaceDescriptor struct { + // Type of interface: TUNNEL, MAC, IP, etc. + InterfaceType string `json:"interfaceType"` + TunnelInfo *TunnelInfo `json:"tunnelInfo,omitempty"` + // If the interface type is MAC, the source address identifies the MAC address of the interface. + SrcMACAddress string `json:"srcMACAddress,omitempty"` + // If the interface type is MAC, the destination address identifies the MAC address of the destination. Only used for dstInterface. + DstMACAddress string `json:"dstMACAddress,omitempty"` + // If the interface type is IP, the destination address identifies the IP address of the destination. Only used for dstInterface. + DstIPAddress string `json:"dstIPAddress,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_iot_platform_info.go b/go-packages/meep-iot-client/model_iot_platform_info.go new file mode 100644 index 0000000000000000000000000000000000000000..0805cad46814aaa5df433268e8df558f2bbd4b5a --- /dev/null +++ b/go-packages/meep-iot-client/model_iot_platform_info.go @@ -0,0 +1,21 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type IotPlatformInfo struct { + // Identifier of the IoT platform. + IotPlatformId string `json:"iotPlatformId"` + // Information about the user transport(s) provided by the IoT platform. + UserTransportInfo []MbTransportInfo `json:"userTransportInfo"` + // Transport enabling access to vendor-specific services provided by the IoT platform. The data type definition is as per ETSI GS MEC 011 [i.2]. + CustomServicesTransportInfo []TransportInfo `json:"customServicesTransportInfo,omitempty"` + // Indication whether the IoT platform is capable of providing user transports and vendor-specific services (TRUE) or not (FALSE). + Enabled bool `json:"enabled"` +} diff --git a/go-packages/meep-iot-client/model_key_value_pair.go b/go-packages/meep-iot-client/model_key_value_pair.go new file mode 100644 index 0000000000000000000000000000000000000000..ce4568ff4825b45cf2f00b3abd42f91a466bb3bf --- /dev/null +++ b/go-packages/meep-iot-client/model_key_value_pair.go @@ -0,0 +1,16 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// Key-value pairs for device metadata +type KeyValuePair struct { + Key string `json:"key,omitempty"` + Value string `json:"value,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_mb_transport_info.go b/go-packages/meep-iot-client/model_mb_transport_info.go new file mode 100644 index 0000000000000000000000000000000000000000..d4007a27b07efaecec0a97103e3aafaadbd69980 --- /dev/null +++ b/go-packages/meep-iot-client/model_mb_transport_info.go @@ -0,0 +1,27 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type MbTransportInfo struct { + // The identifier of this transport as per ETSI GS MEC 011 [i.2]. + Id string `json:"id"` + // The name of this transport as per ETSI GS MEC 011 [i.2]. + Name string `json:"name"` + // Human-readable description of this transport as per ETSI GS MEC 011 [i.2]. + Description string `json:"description,omitempty"` + Type_ *TransportType `json:"type"` + // The name of the protocol used. Being the transport of MB_TOPIC_BASED type, this attribute should be typically set to \"MQTT\" or \"AMQP.\" + Protocol string `json:"protocol"` + // The version of the protocol used as per ETSI GS MEC 011 [i.2]. + Version string `json:"version"` + Endpoint *EndPointInfo `json:"endpoint"` + Security *SecurityInfo `json:"security"` + ImplSpecificInfo *ImplSpecificInfo `json:"implSpecificInfo"` +} diff --git a/go-packages/meep-iot-client/model_o_auth2_info.go b/go-packages/meep-iot-client/model_o_auth2_info.go new file mode 100644 index 0000000000000000000000000000000000000000..b97834477e85afecaa2621367b0265c10bb65dd0 --- /dev/null +++ b/go-packages/meep-iot-client/model_o_auth2_info.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// Parameters related to use of OAuth 2.0. Shall be present in case OAuth 2.0 (see IETF RFC 6749 [13]) is supported to secure the provision of the service over the transport. +type OAuth2Info struct { + // List of supported OAuth 2.0 grant types. Each entry shall be one of the following permitted values: - OAUTH2_AUTHORIZATION_CODE: Authorization code grant type - OAUTH2_IMPLICIT_GRANT: Implicit grant type - OAUTH2_RESOURCE_OWNER: Resource owner password credentials grant type - OAUTH2_CLIENT_CREDENTIALS: Client credentials grant type Only the value \"OAUTH2_CLIENT_CREDENTIALS\" is supported in the present document. + GrantTypes []string `json:"grantTypes"` + // The token endpoint. Shall be present unless the grant type is OAUTH2_IMPLICIT_GRANT. + TokenEndpoint string `json:"tokenEndpoint,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_problem_details.go b/go-packages/meep-iot-client/model_problem_details.go new file mode 100644 index 0000000000000000000000000000000000000000..8f559f963f1db13f623abe33d285e6bee3f53c60 --- /dev/null +++ b/go-packages/meep-iot-client/model_problem_details.go @@ -0,0 +1,23 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type ProblemDetails struct { + // A URI reference according to IETF RFC 3986 that identifies the problem type + Type_ string `json:"type,omitempty"` + // A short, human-readable summary of the problem type + Title string `json:"title,omitempty"` + // The HTTP status code for this occurrence of the problem + Status int32 `json:"status,omitempty"` + // A human-readable explanation specific to this occurrence of the problem + Detail string `json:"detail,omitempty"` + // A URI reference that identifies the specific occurrence of the problem + Instance string `json:"instance,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_registered_devices_body.go b/go-packages/meep-iot-client/model_registered_devices_body.go new file mode 100644 index 0000000000000000000000000000000000000000..c35a6583cf52fd22a833ff7af98300739ea5fe7a --- /dev/null +++ b/go-packages/meep-iot-client/model_registered_devices_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type RegisteredDevicesBody struct { + DeviceInfo *DeviceInfo `json:"DeviceInfo,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_registered_devices_registered_device_id_body.go b/go-packages/meep-iot-client/model_registered_devices_registered_device_id_body.go new file mode 100644 index 0000000000000000000000000000000000000000..70b372ed0449c4f8eed608d32de99795893af4d5 --- /dev/null +++ b/go-packages/meep-iot-client/model_registered_devices_registered_device_id_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type RegisteredDevicesRegisteredDeviceIdBody struct { + DeviceInfo *DeviceInfo `json:"DeviceInfo,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_registered_iot_platforms_body.go b/go-packages/meep-iot-client/model_registered_iot_platforms_body.go new file mode 100644 index 0000000000000000000000000000000000000000..263a42f55f07dbdaa5f33332a052e1a745a27cc3 --- /dev/null +++ b/go-packages/meep-iot-client/model_registered_iot_platforms_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type RegisteredIotPlatformsBody struct { + IoTPlatformInfo *IotPlatformInfo `json:"IoTPlatformInfo,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_registered_iot_platforms_registered_iot_platform_id_body.go b/go-packages/meep-iot-client/model_registered_iot_platforms_registered_iot_platform_id_body.go new file mode 100644 index 0000000000000000000000000000000000000000..457cdf7fd7e9e2f880c391c9f01e6bde507f90b7 --- /dev/null +++ b/go-packages/meep-iot-client/model_registered_iot_platforms_registered_iot_platform_id_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type RegisteredIotPlatformsRegisteredIotPlatformIdBody struct { + IotPlatformInfo *IotPlatformInfo `json:"IotPlatformInfo,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_security_info.go b/go-packages/meep-iot-client/model_security_info.go new file mode 100644 index 0000000000000000000000000000000000000000..7d16f152566fd106ad094869303438fe049990f7 --- /dev/null +++ b/go-packages/meep-iot-client/model_security_info.go @@ -0,0 +1,16 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SecurityInfo struct { + OAuth2Info *OAuth2Info `json:"oAuth2Info,omitempty"` + // Extensions for alternative transport mechanisms. These extensions depend on the actual transport and are out of scope of the present document. For instance, such extensions may be used to signal the necessary parameters for the client to use TLS-based authorization defined for alternative transports (see ETSI GS MEC 009 [5] for more information). + Extensions string `json:"extensions,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_serializer_type.go b/go-packages/meep-iot-client/model_serializer_type.go new file mode 100644 index 0000000000000000000000000000000000000000..42df43415e84ec7b75eced6e259e162af178bf96 --- /dev/null +++ b/go-packages/meep-iot-client/model_serializer_type.go @@ -0,0 +1,19 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client +// SerializerType : The enumeration SerializerType represents types of serializers. +type SerializerType string + +// List of SerializerType +const ( + JSON_SerializerType SerializerType = "JSON" + XML_SerializerType SerializerType = "XML" + PROTOBUF3_SerializerType SerializerType = "PROTOBUF3" +) diff --git a/go-packages/meep-iot-client/model_traffic_filter.go b/go-packages/meep-iot-client/model_traffic_filter.go new file mode 100644 index 0000000000000000000000000000000000000000..211adf1ddd15479c3dada3182a3e5c606915a7c4 --- /dev/null +++ b/go-packages/meep-iot-client/model_traffic_filter.go @@ -0,0 +1,43 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type TrafficFilter struct { + // An IP address or a range of IP addresses. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes. + SrcAddress []string `json:"srcAddress,omitempty"` + // An IP address or a range of IP addresses. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes. + DstAddress []string `json:"dstAddress,omitempty"` + // A port or a range of ports. + SrcPort []string `json:"srcPort,omitempty"` + // A port or a range of ports. + DstPort []string `json:"dstPort,omitempty"` + // Specify the protocol of the traffic filter. + Protocol []string `json:"protocol,omitempty"` + // Used for tag based traffic rule. + Tag []string `json:"tag,omitempty"` + // An URI label, in application layer, i.e. in HTTP message, is used to filter the traffic. + Uri []string `json:"uri,omitempty"` + // A customized packet label in network layer, as defined by the owner of the MEC platform, is used to filter the traffic. + PacketLabel []string `json:"packetLabel,omitempty"` + // Used for GTP tunnel based traffic rule. + SrcTunnelAddress []string `json:"srcTunnelAddress,omitempty"` + // Used for GTP tunnel based traffic rule. + TgtTunnelAddress []string `json:"tgtTunnelAddress,omitempty"` + // Used for GTP tunnel based traffic rule. + SrcTunnelPort []string `json:"srcTunnelPort,omitempty"` + // Used for GTP tunnel based traffic rule. + DstTunnelPort []string `json:"dstTunnelPort,omitempty"` + // Used to match all packets that have the same QCI. + QCI int32 `json:"qCI,omitempty"` + // Used to match all IPv4 packets that have the same DSCP. + DSCP int32 `json:"dSCP,omitempty"` + // Used to match all IPv6 packets that have the same TC. + TC int32 `json:"tC,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_traffic_rule_descriptor.go b/go-packages/meep-iot-client/model_traffic_rule_descriptor.go new file mode 100644 index 0000000000000000000000000000000000000000..fb4ea67fa1414c2127d0bb03689394419f330f2a --- /dev/null +++ b/go-packages/meep-iot-client/model_traffic_rule_descriptor.go @@ -0,0 +1,25 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// NOTE 1: Value indicates the priority in descending order, i.e. with 0 as the highest priority and 255 as the lowest priority. NOTE 2: Some applications (like inline/tap) require two interfaces. The first interface in the case of inline/tap is on the client (e.g. UE) side and the second on the core network (e.g. EPC) side. +type TrafficRuleDescriptor struct { + // Identifies the traffic rule. + TrafficRuleId string `json:"trafficRuleId"` + // Definition of filter type: per FLOW or PACKET If it is per FLOW, the filter matches upstream (e.g. UE->EPC) packets and downstream (e.g. EPC->UE) packets are handled by the same context. + FilterType string `json:"filterType"` + // Priority of this traffic rule within the range 0 to 255. If traffic rule conflicts, the one with higher priority take precedence. See note 1. + Priority int32 `json:"priority"` + // The filter used to identify specific flow/packets that need to be handled by the MEC host. + TrafficFilter []TrafficFilter `json:"trafficFilter"` + // Identifies the action of the MEC host data plane, when a packet matches the trafficFilter, the example actions include: DROP, FORWARD_DECAPSULATED, FORWARD_ENCAPSULATED, PASSTHROUGH, DUPLICATE_DECAPSULATED, DUPLICATE_ENCAPSULATED + Action string `json:"action"` + DstInterface *InterfaceDescriptor `json:"dstInterface,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_transport_info.go b/go-packages/meep-iot-client/model_transport_info.go new file mode 100644 index 0000000000000000000000000000000000000000..079d91fb5da124205d6fd91e4826879867c6ebb7 --- /dev/null +++ b/go-packages/meep-iot-client/model_transport_info.go @@ -0,0 +1,28 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type TransportInfo struct { + // The identifier of this transport. + Id string `json:"id"` + // The name of this transport. + Name string `json:"name"` + // Human-readable description of this transport. + Description string `json:"description,omitempty"` + Type_ *TransportType `json:"type"` + // The name of the protocol used. Shall be set to \"HTTP\" for a REST API. + Protocol string `json:"protocol"` + // The version of the protocol used. + Version string `json:"version"` + Endpoint *EndPointInfo `json:"endpoint"` + Security *SecurityInfo `json:"security"` + // Additional implementation specific details of the transport. + ImplSpecificInfo string `json:"implSpecificInfo,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_transport_type.go b/go-packages/meep-iot-client/model_transport_type.go new file mode 100644 index 0000000000000000000000000000000000000000..2b6e348d578236f98c3f082de9937ab3f63c661e --- /dev/null +++ b/go-packages/meep-iot-client/model_transport_type.go @@ -0,0 +1,23 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client +// TransportType : Enumeration representing types of transports. +type TransportType string + +// List of TransportType +const ( + REST_HTTP_TransportType TransportType = "REST_HTTP" + MB_TOPIC_BASED_TransportType TransportType = "MB_TOPIC_BASED" + MB_ROUTING_TransportType TransportType = "MB_ROUTING" + MB_PUBSUB_TransportType TransportType = "MB_PUBSUB" + RPC_TransportType TransportType = "RPC" + RPC_STREAMING_TransportType TransportType = "RPC_STREAMING" + WEBSOCKET_TransportType TransportType = "WEBSOCKET" +) diff --git a/go-packages/meep-iot-client/model_tunnel_info.go b/go-packages/meep-iot-client/model_tunnel_info.go new file mode 100644 index 0000000000000000000000000000000000000000..a20dbc3ffbbc64f84e40d556e451e0a9852d5f93 --- /dev/null +++ b/go-packages/meep-iot-client/model_tunnel_info.go @@ -0,0 +1,21 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type TunnelInfo struct { + // Type of tunnel: GTP-U, GRE, etc. + TunnelType string `json:"tunnelType"` + // Destination address of the tunnel. + TunnelDstAddress string `json:"tunnelDstAddress"` + // Source address of the tunnel. + TunnelSrcAddress string `json:"tunnelSrcAddress"` + // Parameters specific to the tunnel. + TunnelSpecificData string `json:"tunnelSpecificData,omitempty"` +} diff --git a/go-packages/meep-iot-client/model_uplink_msg.go b/go-packages/meep-iot-client/model_uplink_msg.go new file mode 100644 index 0000000000000000000000000000000000000000..2f54fe6a9454932b51e34592d75bbec3881b6ae4 --- /dev/null +++ b/go-packages/meep-iot-client/model_uplink_msg.go @@ -0,0 +1,34 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type UplinkMsg struct { + // Topic where the message containing the data generated by the IoT device(s) should be published, in order to be consumed by the end IoT application(s). + UplinkTopic string `json:"uplinkTopic"` + SelectedSerializer *SerializerType `json:"selectedSerializer"` + // Indication whether to include the UDP port of the remote IoT device (TRUE) or not (FALSE). + IncludeDevicePort bool `json:"includeDevicePort,omitempty"` + // Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE). + IncludeDeviceAddr bool `json:"includeDeviceAddr,omitempty"` + // Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE). + IncludeDeviceMetadata bool `json:"includeDeviceMetadata,omitempty"` + // Indication whether to include the PEI of the IoT device (TRUE) or not (FALSE). + IncludePei bool `json:"includePei,omitempty"` + // Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE). + IncludeSupi bool `json:"includeSupi,omitempty"` + // Indication whether to include the IMEI of the IoT device (TRUE) or not (FALSE). + IncludeImei bool `json:"includeImei,omitempty"` + // Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE). + IncludeImsi bool `json:"includeImsi,omitempty"` + // Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE). + IncludeIccid bool `json:"includeIccid,omitempty"` + // Indication whether to include the human-readable identified of the IoT device (TRUE) or not (FALSE). + IncludeDeviceId bool `json:"includeDeviceId,omitempty"` +} diff --git a/go-packages/meep-iot-client/response.go b/go-packages/meep-iot-client/response.go new file mode 100644 index 0000000000000000000000000000000000000000..f4a74a65b57da41e7c39fcf747a1621c429b84af --- /dev/null +++ b/go-packages/meep-iot-client/response.go @@ -0,0 +1,43 @@ +/* + * ETSI GS MEC 033 IoT API + * + * ETSI GS MEC 033 IoT API described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "net/http" +) + +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the swagger operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/go-packages/meep-iot-mgr/.gitignore b/go-packages/meep-iot-mgr/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..739ff46590540ad860b48535770503a5af9d0202 --- /dev/null +++ b/go-packages/meep-iot-mgr/.gitignore @@ -0,0 +1 @@ +grid_map.yaml diff --git a/go-packages/meep-iot-mgr/go.mod b/go-packages/meep-iot-mgr/go.mod new file mode 100644 index 0000000000000000000000000000000000000000..e53e563593ab16896af2291d45c950d96ad328dd --- /dev/null +++ b/go-packages/meep-iot-mgr/go.mod @@ -0,0 +1,17 @@ +module github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-iot-mgr + +go 1.16 + +require ( + github.com/BurntSushi/toml v1.2.0 // indirect + github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger v0.0.0 + github.com/eclipse/paho.mqtt.golang v1.4.2 + github.com/google/uuid v1.6.0 + github.com/gorilla/mux v1.8.1 + github.com/lib/pq v1.10.7 + github.com/roymx/viper v1.3.3-0.20190416163942-b9a223fc58a3 + github.com/streadway/amqp v1.1.0 + +) + +replace github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger => ../../go-packages/meep-logger diff --git a/go-packages/meep-iot-mgr/go.sum b/go-packages/meep-iot-mgr/go.sum new file mode 100644 index 0000000000000000000000000000000000000000..006aacd6c4a21fb65386d78a4b64559473586a18 --- /dev/null +++ b/go-packages/meep-iot-mgr/go.sum @@ -0,0 +1,106 @@ +github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= +github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/eclipse/paho.mqtt.golang v1.4.2 h1:66wOzfUHSSI1zamx7jR6yMEI5EuHnT1G6rNA5PM12m4= +github.com/eclipse/paho.mqtt.golang v1.4.2/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA= +github.com/eclipse/paho.mqtt.golang v1.4.3 h1:2kwcUGn8seMUfWndX0hGbvH8r7crgcJguQNCyp70xik= +github.com/eclipse/paho.mqtt.golang v1.4.3/go.mod h1:CSYvoAlsMkhYOXh/oKyxa8EcBci6dVkLCbo5tTC1RIE= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/roymx/viper v1.3.3-0.20190416163942-b9a223fc58a3 h1:lBNvYUFo7d4fHs8BXUmoTzbdUo4usq6PlP5qn894sGA= +github.com/roymx/viper v1.3.3-0.20190416163942-b9a223fc58a3/go.mod h1:jo59Sv6xirZtbxbaZbCtrQd1CSufmcxJZIC8hm2tepw= +github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/streadway/amqp v1.1.0 h1:py12iX8XSyI7aN/3dUT8DFIDJazNJsVJdxNVEpnQTZM= +github.com/streadway/amqp v1.1.0/go.mod h1:WYSrTEYHOXHd0nwFeUXAe2G2hRnQT+deZJJf88uS9Bg= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0 h1:Jcxah/M+oLZ/R4/z5RzfPzGbPXnVDPkEDtf2JnuxN+U= +golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a h1:1n5lsVfiQW3yfsRGu98756EH1YthsFqr/5mxHduZW2A= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/go-packages/meep-iot-mgr/iot-mgr.go b/go-packages/meep-iot-mgr/iot-mgr.go new file mode 100644 index 0000000000000000000000000000000000000000..61d1bd78fbd9853d269b2599d29894cbab7cfdde --- /dev/null +++ b/go-packages/meep-iot-mgr/iot-mgr.go @@ -0,0 +1,375 @@ +/* + * Copyright (c) 2024 The AdvantEDGE Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package iotmgr + +import ( + "encoding/json" + "errors" + "fmt" + "io" + "io/ioutil" + "net/http" + "strconv" + "sync" + "time" + + log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger" + + uuid "github.com/google/uuid" + "github.com/gorilla/mux" +) + +// IOT Manager +type IotMgr struct { + name string + namespace string + mutex sync.Mutex +} + +type IotPlatformInfo struct { + IotPlatformId string + UserTransportInfo []MbTransportInfo + CustomServicesTransportInfo []TransportInfo + Enabled bool +} + +type MbTransportInfo struct { + Id string + Name string + Description string + Type_ *string + Protocol string + Version string + Endpoint *EndPointInfo + Security *SecurityInfo + ImplSpecificInfo *ImplSpecificInfo +} + +type TransportInfo struct { + Id string + Name string + Description string + Type_ *string + Protocol string + Version string + Endpoint *EndPointInfo + Security *SecurityInfo + ImplSpecificInfo string +} + +type EndPointInfo struct { + Uris []string + Fqdn []string + Addresses []Addresses + Alternative string +} + +type Addresses struct { + Host string + Port int32 +} + +type SecurityInfo struct { + OAuth2Info *OAuth2Info + Extensions string +} + +type OAuth2Info struct { + GrantTypes []string + TokenEndpoint string +} + +type ImplSpecificInfo struct { + EventTopics []string + UplinkTopics []string + DownlinkTopics []string +} + +type DeviceInfo struct { + DeviceAuthenticationInfo string + //DeviceMetadata []KeyValuePair + Gpsi string + Pei string + Supi string + Msisdn string + Imei string + Imsi string + Iccid string + DeviceId string + //RequestedMecTrafficRule []TrafficRuleDescriptor + RequestedIotPlatformId string + RequestedUserTransportId string + //DeviceSpecificMessageFormats *DeviceSpecificMessageFormats + //DownlinkInfo *DownlinkInfo + ClientCertificate string + Enabled bool +} + +var registeredIotPlatformsMap = map[string]IotPlatformInfo{} // List of discovered IOT Plateform +var devicesMap = map[string]DeviceInfo{} // Map device by deviceId +var devicesPerPlatformMap = map[string][]string{} // Map deviceIds per platform + +// Enable profiling +const profiling = false + +var profilingTimers map[string]time.Time + +const ( + headerAccept = "application/json" + headerContentType = "application/json" +) + +// Profiling init +func init() { + if profiling { + profilingTimers = make(map[string]time.Time) + } +} + +// NewIotMgr - Creates and initializes a new IOT Traffic Manager +func NewIotMgr(name string, namespace string) (tm *IotMgr, err error) { + if name == "" { + err = errors.New("Missing connector name") + return nil, err + } + + // Create new Traffic Manager + tm = new(IotMgr) + tm.name = name + if namespace != "" { + tm.namespace = namespace + } else { + tm.namespace = "default" + } + + return tm, nil +} + +// DeleteIotMgr - +func (tm *IotMgr) DeleteIotMgr() (err error) { + + return nil +} + +func (tm *IotMgr) RegisterIotPlatformInfo(iotPlatformInfo IotPlatformInfo) (err error) { + if profiling { + profilingTimers["RegisterIotPlatformInfo"] = time.Now() + } + + log.Info(">>> RegisterIotPlatformInfo: iotPlatformId: ", iotPlatformInfo) + if iotPlatformInfo.Enabled { + registeredIotPlatformsMap[iotPlatformInfo.IotPlatformId] = iotPlatformInfo + } // else, Skip disabled platform + + if profiling { + now := time.Now() + log.Debug("RegisterIotPlatformInfo: ", now.Sub(profilingTimers["RegisterIotPlatformInfo"])) + } + return nil +} + +func (tm *IotMgr) DeregisterIotPlatformInfo(iotPlatformId string) (err error) { + if profiling { + profilingTimers["DeregisterIotPlatformInfo"] = time.Now() + } + + log.Info(">>> DeregisterIotPlatformInfo: iotPlatformId: ", iotPlatformId) + // Remove the list of the devices for this IoT platform + if val, ok := devicesPerPlatformMap[iotPlatformId]; ok { + // Free resources from devicesMap map + for _, dev := range val { + delete(devicesMap, dev) + } // End of 'for' statement + delete(devicesPerPlatformMap, iotPlatformId) + } + if _, ok := registeredIotPlatformsMap[iotPlatformId]; ok { + delete(registeredIotPlatformsMap, iotPlatformId) + } + + if profiling { + now := time.Now() + log.Debug("DeregisterIotPlatformInfo: ", now.Sub(profilingTimers["DeregisterIotPlatformInfo"])) + } + return nil +} + +func (tm *IotMgr) GetDevices() (devices []DeviceInfo, err error) { + if profiling { + profilingTimers["GetDevices"] = time.Now() + } + + log.Info(">>> GetDevices: iotPlatformId") + + if len(registeredIotPlatformsMap) == 0 { + return devices, nil + } + + // Refresh the list of devices + for _, val := range registeredIotPlatformsMap { + err := populateDevices(val.IotPlatformId) + if err != nil { + continue + } + } + log.Info("GetDevices: devices: ", devices) + + if profiling { + now := time.Now() + log.Debug("GetDevices: ", now.Sub(profilingTimers["GetDevices"])) + } + return devices, nil +} + +func (tm *IotMgr) GetDevice(deviceId string) (device DeviceInfo, err error) { + if profiling { + profilingTimers["GetDevice"] = time.Now() + } + + log.Info(">>> GetDevice: deviceId: ", deviceId) + + if val, ok := devicesMap[deviceId]; !ok { + err = errors.New("Wrong Device identifier") + return device, err + } else { + log.Info(" GetDevice: device: ", val) + device = val + } + + if profiling { + now := time.Now() + log.Debug("GetDevice: ", now.Sub(profilingTimers["GetDevice"])) + } + return device, nil +} + +/* + * func (tm *IotMgr) PopulateDevices IoT devices for the specified Iot platform + * @param {string} iotPlatformId contains the IoT platform identifier + * @return {struct} nil on success, error otherwise + */ +func populateDevices(iotPlatformId string) error { + if profiling { + profilingTimers["populateDevices"] = time.Now() + } + + log.Info(">>> populateDevices: iotPlatformId=", iotPlatformId) + + // Build the URL + t := registeredIotPlatformsMap[iotPlatformId].CustomServicesTransportInfo[0] + log.Info("populateDevices: t.Endpoint.Addresses[0]=", t.Endpoint.Addresses[0]) + url := "http://" + t.Endpoint.Addresses[0].Host + ":" + strconv.Itoa(int(t.Endpoint.Addresses[0].Port)) + "/" + t.Name + // Builkd the headers + var headers = http.Header{} + headers["Accept"] = []string{headerAccept} + headers["ContentType"] = []string{headerContentType} + headers["X-M2M-Origin"] = []string{"CAdmin"} + headers["X-M2M-RI"] = []string{uuid.New().String()} + headers["X-M2M-RVI"] = []string{t.Version} + // Send the request + response, err := sendRequest("GET", url, headers, nil, nil, nil, 200) + if err != nil { + log.Error("populateDevices: ", err.Error()) + return err + } + log.Debug("populateDevices: response: ", string(response)) + + var oneM2M_data map[string]interface{} + err = json.Unmarshal(response, &oneM2M_data) + if err != nil { + log.Error("populateDevices: ", err.Error()) + return err + } + log.Debug("populateDevices: oneM2M_data: ", len(oneM2M_data)) + log.Debug(oneM2M_data) + for k := range oneM2M_data { + log.Info("populateDevices: Processing key: ", k) + var device = DeviceInfo{ + DeviceId: "", + RequestedIotPlatformId: "", + } + + // type DeviceInfo struct { + // DeviceAuthenticationInfo string + // //DeviceMetadata []KeyValuePair + // Gpsi string + // Pei string + // Supi string + // Msisdn string + // Imei string + // Imsi string + // Iccid string + // DeviceId string + // //RequestedMecTrafficRule []TrafficRuleDescriptor + // RequestedIotPlatformId string + // RequestedUserTransportId string + // //DeviceSpecificMessageFormats *DeviceSpecificMessageFormats + // //DownlinkInfo *DownlinkInfo + // ClientCertificate string + // Enabled bool + // } + devicesMap[device.DeviceId] = device + devicesPerPlatformMap[device.RequestedIotPlatformId] = append(devicesPerPlatformMap[device.RequestedIotPlatformId], device.DeviceId) + } // End of 'for' statement + // for _, val := range devices { + // } + // log.Info("populateDevices: devices: ", devices) + + if profiling { + now := time.Now() + log.Debug("populateDevices: ", now.Sub(profilingTimers["populateDevices"])) + } + return nil +} + +func sendRequest(method string, url string, headers http.Header, body io.Reader, vars map[string]string, query map[string]string, code int) ([]byte, error) { + log.Debug(">>> sendRequest: url: ", url) + log.Debug(">>> sendRequest: headers: ", headers) + + req, err := http.NewRequest(method, url, body) + if err != nil || req == nil { + return nil, err + } + if vars != nil { + req = mux.SetURLVars(req, vars) + } + if query != nil { + q := req.URL.Query() + for k, v := range query { + q.Add(k, v) + } + req.URL.RawQuery = q.Encode() + } + req.Header = headers + req.Close = true + + rr, err := http.DefaultClient.Do(req) + if err != nil { + return nil, err + } + + // Check the status code is what we expect. + if status := rr.StatusCode; status != code { + s := fmt.Sprintf("Wrong status code - got %v want %v", status, code) + return nil, errors.New(s) + } + responseData, err := ioutil.ReadAll(rr.Body) + if err != nil { + return nil, err + } + + return responseData, nil +} diff --git a/go-packages/meep-sss/.gitignore b/go-packages/meep-sss/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..daf913b1b347aae6de6f48d599bc89ef8c8693d6 --- /dev/null +++ b/go-packages/meep-sss/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/go-packages/meep-sss/.swagger-codegen-ignore b/go-packages/meep-sss/.swagger-codegen-ignore new file mode 100644 index 0000000000000000000000000000000000000000..c5fa491b4c557bf997d5dd21797de782545dc9e5 --- /dev/null +++ b/go-packages/meep-sss/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/go-packages/meep-sss/.swagger-codegen/VERSION b/go-packages/meep-sss/.swagger-codegen/VERSION new file mode 100644 index 0000000000000000000000000000000000000000..6187fa53f3d79636a7b3e6f59c36a1f4273d08b5 --- /dev/null +++ b/go-packages/meep-sss/.swagger-codegen/VERSION @@ -0,0 +1 @@ +3.0.66 \ No newline at end of file diff --git a/go-packages/meep-sss/.travis.yml b/go-packages/meep-sss/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..f5cb2ce9a5aad73c57eed886e845d2e79c2899d1 --- /dev/null +++ b/go-packages/meep-sss/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/go-packages/meep-sss/README.md b/go-packages/meep-sss/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b7a741b5982386ebdb02c186d2640ac366ed75f0 --- /dev/null +++ b/go-packages/meep-sss/README.md @@ -0,0 +1,81 @@ +# Go API client for swagger + +GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + +## Overview +This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. + +- API version: 3.1.1 +- Package version: 1.0.0 +- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen +For more information, please visit [https://forge.etsi.org/rep/mec/gs046-ss-api](https://forge.etsi.org/rep/mec/gs046-ss-api) + +## Installation +Put the package under your project folder and add the following in import: +```golang +import "./swagger" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://localhost/sandboxname/sens/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ManagementnApi* | [**SensorMgmtPUT**](docs/ManagementnApi.md#sensormgmtput) | **Put** /sensor_management | The PUT method is used to update the value of the characteristics that can be set on a sensor or on a group of sensors +*SensorDataLookupApi* | [**SensorDataLookupGET**](docs/SensorDataLookupApi.md#sensordatalookupget) | **Get** /queries/status_data | The GET method is used to query the last sensor data from specific sensors +*SensorDataSubscriptionApi* | [**SensorDataIndividualSubscriptionGET**](docs/SensorDataSubscriptionApi.md#sensordataindividualsubscriptionget) | **Get** /queries/status_data/{subscriptionId} | The GET method is used to retrieve information about this subscription +*SensorDataSubscriptionApi* | [**SensorDataSubscriptionDELETE**](docs/SensorDataSubscriptionApi.md#sensordatasubscriptiondelete) | **Delete** /queries/status_data/{subscriptionId} | The DELETE method is used to cancel the existing subscription +*SensorDataSubscriptionApi* | [**SensorDataSubscriptionGET**](docs/SensorDataSubscriptionApi.md#sensordatasubscriptionget) | **Get** /subscriptions/sensor_data | The GET method is used to request information about the subscriptions related to sensor data for this requestor +*SensorDataSubscriptionApi* | [**SensorDataSubscriptionPOST**](docs/SensorDataSubscriptionApi.md#sensordatasubscriptionpost) | **Post** /subscriptions/sensor_data | The POST method is used to create a new subscription to sensor status notifications +*SensorDataSubscriptionApi* | [**SensorDataSubscriptionPUT**](docs/SensorDataSubscriptionApi.md#sensordatasubscriptionput) | **Put** /queries/status_data/{subscriptionId} | The PUT method is used to update the existing subscription +*SensorDiscoveryLookupApi* | [**SensorDiscoveryLookupGET**](docs/SensorDiscoveryLookupApi.md#sensordiscoverylookupget) | **Get** /queries/sensor_discovery | The GET method is used to query the available sensors +*SensorDiscoverySubscriptionApi* | [**SensorDiscoveryIndividualSubscriptionGET**](docs/SensorDiscoverySubscriptionApi.md#sensordiscoveryindividualsubscriptionget) | **Get** /subscriptions/sensor_discovery/{subscriptionId} | The GET method is used to request information about the subscriptions related to sensor status for this requestor +*SensorDiscoverySubscriptionApi* | [**SensorDiscoverySubscriptionDELETE**](docs/SensorDiscoverySubscriptionApi.md#sensordiscoverysubscriptiondelete) | **Delete** /subscriptions/sensor_discovery/{subscriptionId} | The DELETE method is used to cancel the existing subscription. Cancellation can be made by deleting the resource that represents existing sensor discovery subscription +*SensorDiscoverySubscriptionApi* | [**SensorDiscoverySubscriptionGET**](docs/SensorDiscoverySubscriptionApi.md#sensordiscoverysubscriptionget) | **Get** /subscriptions/sensor_discovery | The GET method is used to request information about the subscriptions related to sensor discovery for this requestor +*SensorDiscoverySubscriptionApi* | [**SensorDiscoverySubscriptionPOST**](docs/SensorDiscoverySubscriptionApi.md#sensordiscoverysubscriptionpost) | **Post** /subscriptions/sensor_discovery | The POST method is used to create a new subscription to sensor discovery notifications +*SensorDiscoverySubscriptionApi* | [**SensorDiscoverySubscriptionPUT**](docs/SensorDiscoverySubscriptionApi.md#sensordiscoverysubscriptionput) | **Put** /subscriptions/sensor_discovery/{subscriptionId} | The POST method is used to create a new subscription to sensor discovery notifications +*SensorManagementApi* | [**SensorMgmtGET**](docs/SensorManagementApi.md#sensormgmtget) | **Get** /sensor_management | The GET method is used to receive the sensor characteristics that can be modified on specific sensors +*SensorStatusLookupApi* | [**SensorStatusLookupGET**](docs/SensorStatusLookupApi.md#sensorstatuslookupget) | **Get** /queries/sensor_status | The GET method is used to query the available status +*SensorStatusSubscriptionApi* | [**SensorSatusIndividualSubscriptionGET**](docs/SensorStatusSubscriptionApi.md#sensorsatusindividualsubscriptionget) | **Get** /subscriptions/sensor_status/{subscriptionId} | The GET method is used to retrieve information about this subscription +*SensorStatusSubscriptionApi* | [**SensorStatusIndividualSubscriptionGET**](docs/SensorStatusSubscriptionApi.md#sensorstatusindividualsubscriptionget) | **Get** /subscriptions/sensor_status | The GET method is used to request information about the subscriptions related to sensor status for this requestor +*SensorStatusSubscriptionApi* | [**SensorStatusSubscriptionDELETE**](docs/SensorStatusSubscriptionApi.md#sensorstatussubscriptiondelete) | **Delete** /subscriptions/sensor_status/{subscriptionId} | The DELETE method is used to cancel the existing subscription +*SensorStatusSubscriptionApi* | [**SensorStatusSubscriptionPUT**](docs/SensorStatusSubscriptionApi.md#sensorstatussubscriptionput) | **Put** /subscriptions/sensor_status/{subscriptionId} | The PUT method is used to update the existing subscription +*StatusStatusSubscriptionApi* | [**SensorStatusSubscriptionPOST**](docs/StatusStatusSubscriptionApi.md#sensorstatussubscriptionpost) | **Post** /subscriptions/sensor_status | The POST method is used to create a new subscription to sensor status notifications + +## Documentation For Models + + - [AreaInfo](docs/AreaInfo.md) + - [LinkType](docs/LinkType.md) + - [Point](docs/Point.md) + - [ProblemDetails](docs/ProblemDetails.md) + - [SensorCharacteristic](docs/SensorCharacteristic.md) + - [SensorData](docs/SensorData.md) + - [SensorDataSubscription](docs/SensorDataSubscription.md) + - [SensorDiscoveryEventSubscription](docs/SensorDiscoveryEventSubscription.md) + - [SensorDiscoveryInfo](docs/SensorDiscoveryInfo.md) + - [SensorDiscoverySubscriptionIdBody](docs/SensorDiscoverySubscriptionIdBody.md) + - [SensorInfo](docs/SensorInfo.md) + - [SensorStatusInfo](docs/SensorStatusInfo.md) + - [SensorStatusSubscription](docs/SensorStatusSubscription.md) + - [SensorStatusSubscriptionIdBody](docs/SensorStatusSubscriptionIdBody.md) + - [ShapeType](docs/ShapeType.md) + - [StatusDataSubscriptionIdBody](docs/StatusDataSubscriptionIdBody.md) + - [SubscriptionLinkList](docs/SubscriptionLinkList.md) + - [SubscriptionLinkListLinks](docs/SubscriptionLinkListLinks.md) + - [SubscriptionLinkListSubscription](docs/SubscriptionLinkListSubscription.md) + - [SubscriptionLinks](docs/SubscriptionLinks.md) + - [SubscriptionType](docs/SubscriptionType.md) + - [SubscriptionsSensorDataBody](docs/SubscriptionsSensorDataBody.md) + - [SubscriptionsSensorDiscoveryBody](docs/SubscriptionsSensorDiscoveryBody.md) + - [SubscriptionsSensorStatusBody](docs/SubscriptionsSensorStatusBody.md) + - [TimeStamp](docs/TimeStamp.md) + - [WebsockNotifConfig](docs/WebsockNotifConfig.md) + +## Documentation For Authorization + Endpoints do not require authorization. + + +## Author + +cti_support@etsi.org diff --git a/go-packages/meep-sss/api/swagger.yaml b/go-packages/meep-sss/api/swagger.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8811273650723525123182e37b0ae0ab5352f9d8 --- /dev/null +++ b/go-packages/meep-sss/api/swagger.yaml @@ -0,0 +1,1581 @@ +openapi: 3.0.0 +info: + title: ETSI GS MEC 046 Sensors Sharing Service APIs + description: GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + contact: + name: ETSI Forge + url: https://forge.etsi.org/rep/mec/gs046-ss-api + email: cti_support@etsi.org + license: + name: BSD-3-Clause + url: https://forge.etsi.org/legal-matters + version: 3.1.1 +externalDocs: + description: "GS MEC 046 Sensors Sharing Service APIs, v3.3.1" + url: https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_mec046v030101p.pdf +servers: +- url: https://localhost/sandboxname/sens/v1 +tags: +- name: sensor-discovery-lookup + description: The Sensor Discovery Lookup is the procedure for applications acquiring + the sensor(s) currently available and the related characteristics +- name: sensor-discovery-subscription + description: The Sensor Discovery Subscription is the procedure for applications + to request to receive notifications about sensors when sensor information changes +- name: sensor-status-lookup + description: The Sensor Status Lookup is the procedure for applications acquiring + the status (e.g. active or error state) of sensor(s) +- name: sensor-status-subscription + description: The Sensor Status Subscription is the procedure for applications to + request to receive notifications about sensors when they change their status +- name: sensor-data-lookup + description: The Sensor Data Lookup is the procedure for applications to acquire + the last data collected by the sensor(s) +- name: sensor-data-subscription + description: The Sensor Data Subscription is the procedure for applications to request + to receive notifications every time new data are collected from the sensor(s) +- name: sensor-management + description: The Sensor Management is the procedure for a MEC application to configure + specific parameter(s) on the sensor(s) +paths: + /queries/sensor_discovery: + get: + tags: + - sensor-discovery-lookup + summary: The GET method is used to query the available sensors + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.3.3.1-1\ + \ and 7.3.3.1-2." + operationId: SensorDiscoveryLookupGET + parameters: + - name: sensorInfo + in: query + description: Object containing the characteristics of the sensor(s) to be + selected for the query + required: false + style: form + explode: true + schema: + $ref: '#/components/schemas/SensorInfo' + responses: + "200": + description: "Upon success, a response body containing the available sensors\ + \ is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorDiscoveryInfo' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /subscriptions/sensor_discovery: + get: + tags: + - sensor-discovery-subscription + summary: The GET method is used to request information about the subscriptions + related to sensor discovery for this requestor + description: "This method shall support the URI query parameter, request and\ + \ response data structures, and response codes, as specified in Tables 7.4.3.1-1\ + \ and 7.4.3.1-2." + operationId: SensorDiscoverySubscriptionGET + parameters: + - name: subscriptionId + in: query + description: Object containing the characteristics of the sensor(s) to be + selected for the query + required: false + style: form + explode: true + schema: + type: string + responses: + "200": + description: "Upon success, a response body containing the list of links\ + \ to requestor's sensor discovery subscriptions is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - sensor-discovery-subscription + summary: The POST method is used to create a new subscription to sensor discovery + notifications + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Table 7.4.3.4-1" + operationId: SensorDiscoverySubscriptionPOST + requestBody: + description: This type represents a subscription to notifications from the + Sensor-sharing Service regarding events related to changes in sensor information + content: + application/json: + schema: + $ref: '#/components/schemas/subscriptions_sensor_discovery_body' + required: true + responses: + "201": + description: "Indicates successful resource creation, where the resource\ + \ URI shall be returned in the HTTP Location header field" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorDiscoveryEventSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /subscriptions/sensor_discovery/{subscriptionId}: + get: + tags: + - sensor-discovery-subscription + summary: The GET method is used to request information about the subscriptions + related to sensor status for this requestor + description: "This method shall support the URI query parameter, request and\ + \ response data structures, and response codes, as specified in Tables 7.7.3.1-1\ + \ and 7.7.3.1-2." + operationId: SensorDiscoveryIndividualSubscriptionGET + parameters: + - name: subscriptionId + in: path + description: Unique identifiers of the subscription + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: "Upon success, a response body containing the list of links\ + \ to requestor's sensor status subscriptions is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - sensor-discovery-subscription + summary: The POST method is used to create a new subscription to sensor discovery + notifications + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Table 7.4.3.4-1" + operationId: SensorDiscoverySubscriptionPUT + parameters: + - name: subscriptionId + in: path + description: It uniquely identifies the created individual application mobility + service + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: New SensorDiscoveryEventSubscription is included as entity body + of the request + content: + application/json: + schema: + $ref: '#/components/schemas/sensor_discovery_subscriptionId_body' + required: true + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the updated sensor discovery subscription is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - sensor-discovery-subscription + summary: The DELETE method is used to cancel the existing subscription. Cancellation + can be made by deleting the resource that represents existing sensor discovery + subscription + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Tables 7.5.3.5-1 and 7.5.3.5-2" + operationId: SensorDiscoverySubscriptionDELETE + parameters: + - name: subscriptionId + in: path + description: It uniquely identifies the created individual application mobility + service + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: "Upon success, a response 204 No Content without any response\ + \ body is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /queries/sensor_status: + get: + tags: + - sensor-status-lookup + summary: The GET method is used to query the available status + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.6.3.1-1\ + \ and 7.6.3.1-2" + operationId: SensorStatusLookupGET + parameters: + - name: sensorIdentifier + in: query + description: It uniquely identifies the created individual application mobility + service + required: true + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the status information\ + \ of specific sensors is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorStatusInfo' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /subscriptions/sensor_status: + get: + tags: + - sensor-status-subscription + summary: The GET method is used to request information about the subscriptions + related to sensor status for this requestor + description: "This method shall support the URI query parameter, request and\ + \ response data structures, and response codes, as specified in Tables 7.7.3.1-1\ + \ and 7.7.3.1-2" + operationId: SensorStatusIndividualSubscriptionGET + parameters: + - name: sensorIdentifier + in: query + description: Unique identifiers of the sensors + required: false + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the list of links\ + \ to requestor's sensor status subscriptions is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - status-status-subscription + summary: The POST method is used to create a new subscription to sensor status + notifications + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Table 7.7.3.4-1" + operationId: SensorStatusSubscriptionPOST + requestBody: + description: The entity body in the request contains data type of the specific + sensor status subscription that is to be created + content: + application/json: + schema: + $ref: '#/components/schemas/subscriptions_sensor_status_body' + required: true + responses: + "201": + description: "Indicates successful resource creation, where the resource\ + \ URI shall be returned in the HTTP Location header field." + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorStatusSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /subscriptions/sensor_status/{subscriptionId}: + get: + tags: + - sensor-status-subscription + summary: The GET method is used to retrieve information about this subscription + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Tables 7.8.3.1-1 and 7.8.3.1-2" + operationId: SensorSatusIndividualSubscriptionGET + parameters: + - name: subscriptionId + in: path + description: Unique identifiers of the subscription + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the specific sensor status subscription is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorStatusSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - sensor-status-subscription + summary: The PUT method is used to update the existing subscription + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.8.3.2-1\ + \ and 7.8.3.2-2" + operationId: SensorStatusSubscriptionPUT + parameters: + - name: subscriptionId + in: path + description: It uniquely identifies the created individual application mobility + service + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: New SensorStatusSubscription is included as entity body of the + request + content: + application/json: + schema: + $ref: '#/components/schemas/sensor_status_subscriptionId_body' + required: true + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the updated sensor status subscription is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorStatusSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - sensor-status-subscription + summary: The DELETE method is used to cancel the existing subscription + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Tables 7.8.3.5-1 and 7.8.3.5-2" + operationId: SensorStatusSubscriptionDELETE + parameters: + - name: subscriptionId + in: path + description: It uniquely identifies a subscription + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: "Upon success, a response 204 No Content without any response\ + \ body is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /queries/status_data: + get: + tags: + - sensor-data-lookup + summary: The GET method is used to query the last sensor data from specific + sensors + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.9.3.1-1\ + \ and 7.9.3.1-2" + operationId: SensorDataLookupGET + parameters: + - name: sensorIdentifier + in: query + description: It uniquely identifies the created individual application mobility + service + required: true + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the last sensor data\ + \ measured by the sensors is returned" + content: + application/json: + schema: + minItems: 1 + type: array + items: + $ref: '#/components/schemas/SensorData' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /subscriptions/sensor_data: + get: + tags: + - sensor-data-subscription + summary: The GET method is used to request information about the subscriptions + related to sensor data for this requestor + description: "This method shall support the URI query parameter, request and\ + \ response data structures, and response codes, as specified in Tables 7.10.3.1-1\ + \ and 7.10.3.1-2" + operationId: SensorDataSubscriptionGET + parameters: + - name: sensorIdentifier + in: query + description: Unique identifiers of the sensors + required: true + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the list of links\ + \ to requestor's sensor status subscriptions is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + post: + tags: + - sensor-data-subscription + summary: The POST method is used to create a new subscription to sensor status + notifications + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Table 7.7.3.4-1" + operationId: SensorDataSubscriptionPOST + requestBody: + description: The entity body in the request contains data type of the specific + sensor status subscription that is to be created + content: + application/json: + schema: + $ref: '#/components/schemas/subscriptions_sensor_data_body' + required: true + responses: + "201": + description: "Indicates successful resource creation, where the resource\ + \ URI shall be returned in the HTTP Location header field." + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorStatusSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /queries/status_data/{subscriptionId}: + get: + tags: + - sensor-data-subscription + summary: The GET method is used to retrieve information about this subscription + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Tables 7.11.3.1-1 and 7.11.3.1-2" + operationId: SensorDataIndividualSubscriptionGET + parameters: + - name: subscriptionId + in: path + description: Unique identifiers of a subscription + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the specific sensor data subscription is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorDataSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - sensor-data-subscription + summary: The PUT method is used to update the existing subscription + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.11.3.2-1\ + \ and 7.11.3.2-2" + operationId: SensorDataSubscriptionPUT + parameters: + - name: subscriptionId + in: path + description: Unique identifiers of a subscription + required: true + style: simple + explode: false + schema: + type: string + requestBody: + description: New SensorDataSubscription is included as entity body of the + request + content: + application/json: + schema: + $ref: '#/components/schemas/status_data_subscriptionId_body' + required: true + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the updated sensor data subscription is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorDataSubscription' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + delete: + tags: + - sensor-data-subscription + summary: The DELETE method is used to cancel the existing subscription + description: "This method shall support the request and response data structures,\ + \ and response codes, as specified in Tables 7.11.3.5-1 and 7.11.3.5-2" + operationId: SensorDataSubscriptionDELETE + parameters: + - name: subscriptionId + in: path + description: It uniquely identifies a subscription + required: true + style: simple + explode: false + schema: + type: string + responses: + "204": + description: "Upon success, a response 204 No Content without any response\ + \ body is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SubscriptionLinkList' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + /sensor_management: + get: + tags: + - sensor-management + summary: The GET method is used to receive the sensor characteristics that can + be modified on specific sensors + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.12.3.1-1\ + \ and 7.12.3.1-2" + operationId: SensorMgmtGET + parameters: + - name: sensorIdentifier + in: query + description: It uniquely identifies the created individual application mobility + service + required: true + style: form + explode: true + schema: + type: array + items: + type: string + responses: + "200": + description: "Upon success, a response body containing the characteristics\ + \ that can be set on the specific sensors are returned" + content: + application/json: + schema: + minItems: 1 + type: array + items: + $ref: '#/components/schemas/SensorCharacteristic' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + put: + tags: + - managementn + summary: The PUT method is used to update the value of the characteristics that + can be set on a sensor or on a group of sensors + description: "This method shall support the URI query parameters, request and\ + \ response data structures, and response codes, as specified in Tables 7.12.3.2-1\ + \ and 7.12.3.2-2" + operationId: SensorMgmtPUT + requestBody: + description: "The list of sensor characteristics to be updated, with the new\ + \ values to set, is included as entity body of the request" + content: + application/json: + schema: + minItems: 1 + type: array + items: + $ref: '#/components/schemas/SensorCharacteristic' + required: true + responses: + "200": + description: "Upon success, a response body containing data type describing\ + \ the updated sensor characteristics is returned" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SensorCharacteristic' + x-content-type: application/json + "400": + description: "Bad Request: used to indicate that incorrect parameters were\ + \ passed to the request" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "403": + description: "Forbidden: operation is not allowed given the current status\ + \ of the resource" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + "404": + description: "Not Found: used when a client provided a URI that cannot be\ + \ mapped to a valid resource URI" + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' +components: + schemas: + SensorStatusInfo: + required: + - sensorIdentifier + - sensorStatusType + type: object + properties: + sensorIdentifier: + type: string + description: Unique identifier of the sensor + sensorStatusType: + type: string + description: The status of the sensor + errorInformation: + type: string + description: String explaining the error of the sensor + example: + errorInformation: errorInformation + sensorIdentifier: sensorIdentifier + sensorStatusType: sensorStatusType + SensorData: + required: + - data + - dataFormat + - dataUnitOfMeasure + - sensorIdentifier + type: object + properties: + sensorIdentifier: + type: string + description: Unique identifier of the sensor + data: + type: string + description: The status of the sensor + dataFormat: + type: string + description: String explaining the error of the sensor + dataUnitOfMeasure: + type: string + description: String explaining the error of the sensor + dataTimestamp: + $ref: '#/components/schemas/TimeStamp' + example: + dataTimestamp: + seconds: 1 + nanoSeconds: 5 + data: data + dataUnitOfMeasure: dataUnitOfMeasure + dataFormat: dataFormat + sensorIdentifier: sensorIdentifier + SensorInfo: + required: + - sensorPropertyList + - type + type: object + properties: + type: + type: string + description: Type of the sensor + sensorPropertyList: + type: array + description: "It indicates the list of properties that the sensor can sense\ + \ (see saref:Property in ETSI TS 103 264 [4], clause 4.3.8)." + items: + minItems: 1 + type: string + sensorCharacteristicList: + minItems: 0 + type: array + description: The sensor' characteristics to be matched + items: + $ref: '#/components/schemas/SensorCharacteristic' + geographicalArea: + minItems: 0 + type: array + description: The parameters describing the area + items: + $ref: '#/components/schemas/AreaInfo' + SensorDiscoveryInfo: + required: + - sensorIdentifier + - sensorPropertyList + - sensorType + type: object + properties: + sensorIdentifier: + type: string + description: Unique identifier of the sensor + sensorType: + type: string + description: Type of the Sensor + sensorPropertyList: + minItems: 1 + type: array + description: It indicates the list of properties that the sensor can sense + items: + type: string + sensorCharacteristicList: + minItems: 0 + type: array + description: The sensor' characteristics + items: + $ref: '#/components/schemas/SensorCharacteristic' + sensorPosition: + $ref: '#/components/schemas/Point' + example: + sensorPosition: + latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + sensorPropertyList: + - sensorPropertyList + - sensorPropertyList + sensorType: sensorType + sensorCharacteristicList: + - characteristicName: characteristicName + characteristicUnitOfMeasure: characteristicUnitOfMeasure + characteristicValue: characteristicValue + - characteristicName: characteristicName + characteristicUnitOfMeasure: characteristicUnitOfMeasure + characteristicValue: characteristicValue + sensorIdentifier: sensorIdentifier + SensorDiscoveryEventSubscription: + title: SensorDiscoveryEventSubscription + required: + - subscriptionType + type: object + properties: + subscriptionType: + $ref: '#/components/schemas/SubscriptionType' + callbackReference: + type: string + description: URI exposed by the client on which to receive notifications + via HTTP + format: uri + requestTestNotification: + type: boolean + description: "Set to TRUE by the MEC application to request a test notification\ + \ via HTTP on the callbackReference URI," + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + _links: + $ref: '#/components/schemas/SubscriptionLinks' + sensorInfoList: + type: array + description: Object containing the characteristics of the sensor(s) to be + selected for the subscription + items: + type: string + geographicalArea: + type: array + description: The parameters describing the area to subscribe + items: + $ref: '#/components/schemas/AreaInfo' + expiryDeadline: + $ref: '#/components/schemas/TimeStamp' + example: + sensorInfoList: + - sensorInfoList + - sensorInfoList + subscriptionType: SensorDiscoveryEventSubscription + _links: + self: + href: href + callbackReference: http://example.com/aeiou + expiryDeadline: + seconds: 1 + nanoSeconds: 5 + websockNotifConfig: + requestWebsocketUri: true + websocketUri: http://example.com/aeiou + requestTestNotification: true + geographicalArea: + - shape: 0 + radius: 6 + points: + - latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + - latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + - shape: 0 + radius: 6 + points: + - latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + - latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + SensorStatusSubscription: + title: SensorStatusSubscription + required: + - subscriptionType + type: object + properties: + subscriptionType: + $ref: '#/components/schemas/SubscriptionType' + callbackReference: + type: string + description: URI exposed by the client on which to receive notifications + via HTTP + format: uri + requestTestNotification: + type: boolean + description: "Set to TRUE by the MEC application to request a test notification\ + \ via HTTP on the callbackReference URI," + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + _links: + $ref: '#/components/schemas/SubscriptionLinks' + expiryDeadline: + $ref: '#/components/schemas/TimeStamp' + example: + subscriptionType: SensorDiscoveryEventSubscription + _links: + self: + href: href + callbackReference: http://example.com/aeiou + expiryDeadline: + seconds: 1 + nanoSeconds: 5 + websockNotifConfig: + requestWebsocketUri: true + websocketUri: http://example.com/aeiou + requestTestNotification: true + SensorDataSubscription: + title: SensorDataSubscription + required: + - subscriptionType + type: object + properties: + subscriptionType: + $ref: '#/components/schemas/SubscriptionType' + callbackReference: + type: string + description: URI exposed by the client on which to receive notifications + via HTTP + format: uri + requestTestNotification: + type: boolean + description: "Set to TRUE by the MEC application to request a test notification\ + \ via HTTP on the callbackReference URI," + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + _links: + $ref: '#/components/schemas/SubscriptionLinks' + expiryDeadline: + $ref: '#/components/schemas/TimeStamp' + example: + subscriptionType: SensorDiscoveryEventSubscription + _links: + self: + href: href + callbackReference: http://example.com/aeiou + expiryDeadline: + seconds: 1 + nanoSeconds: 5 + websockNotifConfig: + requestWebsocketUri: true + websocketUri: http://example.com/aeiou + requestTestNotification: true + SubscriptionType: + title: SubscriptionType + type: string + enum: + - SensorDiscoveryEventSubscription + - SensorStatusSubscription + - SensorDataSubscription + WebsockNotifConfig: + type: object + properties: + websocketUri: + type: string + description: Set by AMS to indicate to the service consumer the Websocket + URI to be used for delivering notifications. + format: uri + requestWebsocketUri: + type: boolean + description: Set to true by the service consumer to indicate that Websocket + delivery is requested. + example: + requestWebsocketUri: true + websocketUri: http://example.com/aeiou + SensorCharacteristic: + required: + - characteristicName + - characteristicValue + type: object + properties: + characteristicName: + type: string + description: The name of the characteristic + characteristicValue: + type: string + description: The value of the characteristic. + characteristicUnitOfMeasure: + type: string + description: "The unit of measure of the characteristic (see saref:UnitOfMeasure\ + \ in ETSI TS 103 264 [4], clause 4.3.8)." + description: "This type represents a sensor' characteristic which details the\ + \ type of sensor and its working functionalities, such as the model of the\ + \ sensor, the sampling frequency, the operating range, the accuracy" + example: + characteristicName: characteristicName + characteristicUnitOfMeasure: characteristicUnitOfMeasure + characteristicValue: characteristicValue + Point: + required: + - latitude + - longitude + type: object + properties: + latitude: + type: number + description: "Location latitude, expressed in the range -90° to +90°" + longitude: + type: number + description: "Location longitude, expressed in the range -180° to +180°." + description: This type represents the geographical location of a point + example: + latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + SubscriptionLinks: + title: SubscriptionLinks + required: + - self + type: object + properties: + self: + $ref: '#/components/schemas/LinkType' + example: + self: + href: href + SubscriptionLinkList.links: + title: SubscriptionLinkList.links + required: + - self + type: object + properties: + self: + $ref: '#/components/schemas/LinkType' + subscriptions: + type: array + description: The MEC application's subscriptions + items: + $ref: '#/components/schemas/SubscriptionLinkList.subscription' + description: List of hyperlinks related to the resource. + example: + subscriptions: + - subscriptionType: subscriptionType + href: href + - subscriptionType: subscriptionType + href: href + self: + href: href + SubscriptionLinkList.subscription: + title: SubscriptionLinkList.subscription + required: + - href + - subscriptionType + type: object + properties: + href: + type: string + description: The URI referring to the subscription + subscriptionType: + type: string + description: Type of the subscription + example: + subscriptionType: subscriptionType + href: href + SubscriptionLinkList: + title: SubscriptionLinkList + required: + - _links + type: object + properties: + _links: + $ref: '#/components/schemas/SubscriptionLinkList.links' + example: + _links: + subscriptions: + - subscriptionType: subscriptionType + href: href + - subscriptionType: subscriptionType + href: href + self: + href: href + ProblemDetails: + type: object + properties: + type: + type: string + description: A URI reference according to IETF RFC 3986 that identifies + the problem type + format: uri + title: + type: string + description: "A short, human-readable summary of the problem type" + status: + type: integer + description: The HTTP status code for this occurrence of the problem + format: uint32 + detail: + type: string + description: A human-readable explanation specific to this occurrence of + the problem + instance: + type: string + description: A URI reference that identifies the specific occurrence of + the problem + format: uri + LinkType: + title: LinkType + required: + - href + type: object + properties: + href: + type: string + description: The URI referring to the subscription. + description: '''This data type represents a type of link''' + example: + href: href + TimeStamp: + title: TimeStamp + required: + - nanoSeconds + - seconds + type: object + properties: + seconds: + type: integer + description: "'The seconds part of the Time. Time is defined as Unix-time\ + \ since January 1, 1970, 00:00:00 UTC.'" + nanoSeconds: + type: integer + description: "'The nanoseconds part of the Time. Time is defined as Unix-time\ + \ since January 1, 1970, 00:00:00 UTC.'" + description: "'This data type represents the time stamp as Unix-time since January\ + \ 1, 1970, 00:00:00 UTC'" + example: + seconds: 1 + nanoSeconds: 5 + ShapeType: + title: ShapeType + type: integer + enum: + - null + - null + AreaInfo: + title: AreaInfo + required: + - points + - shape + type: object + properties: + shape: + $ref: '#/components/schemas/ShapeType' + points: + type: array + description: Shall include one point if the shape is CIRCLE. Shall include + 3-15 points if the shape is POLYGON + items: + $ref: '#/components/schemas/Point' + radius: + type: integer + description: Shall be present if the shape is CIRCLE + example: + shape: 0 + radius: 6 + points: + - latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + - latitude: 0.80082819046101150206595775671303272247314453125 + longitude: 6.02745618307040320615897144307382404804229736328125 + subscriptions_sensor_discovery_body: + type: object + properties: + SensorDiscoveryEventSubscription: + $ref: '#/components/schemas/SensorDiscoveryEventSubscription' + sensor_discovery_subscriptionId_body: + type: object + properties: + SensorDiscoveryEventSubscription: + $ref: '#/components/schemas/SensorDiscoveryEventSubscription' + subscriptions_sensor_status_body: + type: object + properties: + SensorStatusSubscription: + $ref: '#/components/schemas/SensorStatusSubscription' + sensor_status_subscriptionId_body: + type: object + properties: + SensorStatusSubscription: + $ref: '#/components/schemas/SensorStatusSubscription' + subscriptions_sensor_data_body: + type: object + properties: + SensorDataSubscription: + $ref: '#/components/schemas/SensorDataSubscription' + status_data_subscriptionId_body: + type: object + properties: + SensorStatusSubscription: + $ref: '#/components/schemas/SensorDataSubscription' diff --git a/go-packages/meep-sss/api_managementn.go b/go-packages/meep-sss/api_managementn.go new file mode 100644 index 0000000000000000000000000000000000000000..582a1ed56e25f14784e355f4042eb97c72142185 --- /dev/null +++ b/go-packages/meep-sss/api_managementn.go @@ -0,0 +1,142 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type ManagementnApiService service + +/* +ManagementnApiService The PUT method is used to update the value of the characteristics that can be set on a sensor or on a group of sensors +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.12.3.2-1 and 7.12.3.2-2 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body The list of sensor characteristics to be updated, with the new values to set, is included as entity body of the request +@return []SensorCharacteristic +*/ +func (a *ManagementnApiService) SensorMgmtPUT(ctx context.Context, body []SensorCharacteristic) ([]SensorCharacteristic, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SensorCharacteristic + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/sensor_management" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SensorCharacteristic + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-sss/api_sensor_data_lookup.go b/go-packages/meep-sss/api_sensor_data_lookup.go new file mode 100644 index 0000000000000000000000000000000000000000..7fe2635387b92075ee6e446abae03e0344eb3d3e --- /dev/null +++ b/go-packages/meep-sss/api_sensor_data_lookup.go @@ -0,0 +1,141 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type SensorDataLookupApiService service + +/* +SensorDataLookupApiService The GET method is used to query the last sensor data from specific sensors +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.9.3.1-1 and 7.9.3.1-2 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param sensorIdentifier It uniquely identifies the created individual application mobility service +@return []SensorData +*/ +func (a *SensorDataLookupApiService) SensorDataLookupGET(ctx context.Context, sensorIdentifier []string) ([]SensorData, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SensorData + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/queries/status_data" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("sensorIdentifier", parameterToString(sensorIdentifier, "multi")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SensorData + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-sss/api_sensor_data_subscription.go b/go-packages/meep-sss/api_sensor_data_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..c541e06a78dbcf889004fb49099286754d8d13c1 --- /dev/null +++ b/go-packages/meep-sss/api_sensor_data_subscription.go @@ -0,0 +1,610 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type SensorDataSubscriptionApiService service + +/* +SensorDataSubscriptionApiService The GET method is used to retrieve information about this subscription +This method shall support the request and response data structures, and response codes, as specified in Tables 7.11.3.1-1 and 7.11.3.1-2 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param subscriptionId Unique identifiers of a subscription +@return []SensorDataSubscription +*/ +func (a *SensorDataSubscriptionApiService) SensorDataIndividualSubscriptionGET(ctx context.Context, subscriptionId string) ([]SensorDataSubscription, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SensorDataSubscription + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/queries/status_data/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", fmt.Sprintf("%v", subscriptionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SensorDataSubscription + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +SensorDataSubscriptionApiService The DELETE method is used to cancel the existing subscription +This method shall support the request and response data structures, and response codes, as specified in Tables 7.11.3.5-1 and 7.11.3.5-2 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param subscriptionId It uniquely identifies a subscription +@return []SubscriptionLinkList +*/ +func (a *SensorDataSubscriptionApiService) SensorDataSubscriptionDELETE(ctx context.Context, subscriptionId string) ([]SubscriptionLinkList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SubscriptionLinkList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/queries/status_data/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", fmt.Sprintf("%v", subscriptionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 204 { + var v []SubscriptionLinkList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +SensorDataSubscriptionApiService The GET method is used to request information about the subscriptions related to sensor data for this requestor +This method shall support the URI query parameter, request and response data structures, and response codes, as specified in Tables 7.10.3.1-1 and 7.10.3.1-2 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param sensorIdentifier Unique identifiers of the sensors +@return []SubscriptionLinkList +*/ +func (a *SensorDataSubscriptionApiService) SensorDataSubscriptionGET(ctx context.Context, sensorIdentifier []string) ([]SubscriptionLinkList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SubscriptionLinkList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/subscriptions/sensor_data" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("sensorIdentifier", parameterToString(sensorIdentifier, "multi")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SubscriptionLinkList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +SensorDataSubscriptionApiService The POST method is used to create a new subscription to sensor status notifications +This method shall support the request and response data structures, and response codes, as specified in Table 7.7.3.4-1 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body The entity body in the request contains data type of the specific sensor status subscription that is to be created +@return []SensorStatusSubscription +*/ +func (a *SensorDataSubscriptionApiService) SensorDataSubscriptionPOST(ctx context.Context, body SubscriptionsSensorDataBody) ([]SensorStatusSubscription, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SensorStatusSubscription + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/subscriptions/sensor_data" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 201 { + var v []SensorStatusSubscription + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +SensorDataSubscriptionApiService The PUT method is used to update the existing subscription +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.11.3.2-1 and 7.11.3.2-2 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body New SensorDataSubscription is included as entity body of the request + * @param subscriptionId Unique identifiers of a subscription +@return []SensorDataSubscription +*/ +func (a *SensorDataSubscriptionApiService) SensorDataSubscriptionPUT(ctx context.Context, body StatusDataSubscriptionIdBody, subscriptionId string) ([]SensorDataSubscription, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SensorDataSubscription + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/queries/status_data/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", fmt.Sprintf("%v", subscriptionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SensorDataSubscription + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-sss/api_sensor_discovery_lookup.go b/go-packages/meep-sss/api_sensor_discovery_lookup.go new file mode 100644 index 0000000000000000000000000000000000000000..e75eaec81954744b7c9da0f998dce4d78a0186fb --- /dev/null +++ b/go-packages/meep-sss/api_sensor_discovery_lookup.go @@ -0,0 +1,151 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type SensorDiscoveryLookupApiService service + +/* +SensorDiscoveryLookupApiService The GET method is used to query the available sensors +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.3.3.1-1 and 7.3.3.1-2. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *SensorDiscoveryLookupApiSensorDiscoveryLookupGETOpts - Optional Parameters: + * @param "SensorInfo" (optional.Interface of SensorInfo) - Object containing the characteristics of the sensor(s) to be selected for the query +@return []SensorDiscoveryInfo +*/ + +type SensorDiscoveryLookupApiSensorDiscoveryLookupGETOpts struct { + SensorInfo optional.Interface +} + +func (a *SensorDiscoveryLookupApiService) SensorDiscoveryLookupGET(ctx context.Context, localVarOptionals *SensorDiscoveryLookupApiSensorDiscoveryLookupGETOpts) ([]SensorDiscoveryInfo, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SensorDiscoveryInfo + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/queries/sensor_discovery" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.SensorInfo.IsSet() { + localVarQueryParams.Add("sensorInfo", parameterToString(localVarOptionals.SensorInfo.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SensorDiscoveryInfo + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-sss/api_sensor_discovery_subscription.go b/go-packages/meep-sss/api_sensor_discovery_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..d7ba1d57ee6e9e9296f23db60472c2da9273bb88 --- /dev/null +++ b/go-packages/meep-sss/api_sensor_discovery_subscription.go @@ -0,0 +1,620 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type SensorDiscoverySubscriptionApiService service + +/* +SensorDiscoverySubscriptionApiService The GET method is used to request information about the subscriptions related to sensor status for this requestor +This method shall support the URI query parameter, request and response data structures, and response codes, as specified in Tables 7.7.3.1-1 and 7.7.3.1-2. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param subscriptionId Unique identifiers of the subscription +@return []SubscriptionLinkList +*/ +func (a *SensorDiscoverySubscriptionApiService) SensorDiscoveryIndividualSubscriptionGET(ctx context.Context, subscriptionId string) ([]SubscriptionLinkList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SubscriptionLinkList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/subscriptions/sensor_discovery/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", fmt.Sprintf("%v", subscriptionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SubscriptionLinkList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +SensorDiscoverySubscriptionApiService The DELETE method is used to cancel the existing subscription. Cancellation can be made by deleting the resource that represents existing sensor discovery subscription +This method shall support the request and response data structures, and response codes, as specified in Tables 7.5.3.5-1 and 7.5.3.5-2 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param subscriptionId It uniquely identifies the created individual application mobility service +@return []SubscriptionLinkList +*/ +func (a *SensorDiscoverySubscriptionApiService) SensorDiscoverySubscriptionDELETE(ctx context.Context, subscriptionId string) ([]SubscriptionLinkList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SubscriptionLinkList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/subscriptions/sensor_discovery/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", fmt.Sprintf("%v", subscriptionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 204 { + var v []SubscriptionLinkList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +SensorDiscoverySubscriptionApiService The GET method is used to request information about the subscriptions related to sensor discovery for this requestor +This method shall support the URI query parameter, request and response data structures, and response codes, as specified in Tables 7.4.3.1-1 and 7.4.3.1-2. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *SensorDiscoverySubscriptionApiSensorDiscoverySubscriptionGETOpts - Optional Parameters: + * @param "SubscriptionId" (optional.String) - Object containing the characteristics of the sensor(s) to be selected for the query +@return []SubscriptionLinkList +*/ + +type SensorDiscoverySubscriptionApiSensorDiscoverySubscriptionGETOpts struct { + SubscriptionId optional.String +} + +func (a *SensorDiscoverySubscriptionApiService) SensorDiscoverySubscriptionGET(ctx context.Context, localVarOptionals *SensorDiscoverySubscriptionApiSensorDiscoverySubscriptionGETOpts) ([]SubscriptionLinkList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SubscriptionLinkList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/subscriptions/sensor_discovery" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.SubscriptionId.IsSet() { + localVarQueryParams.Add("subscriptionId", parameterToString(localVarOptionals.SubscriptionId.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SubscriptionLinkList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +SensorDiscoverySubscriptionApiService The POST method is used to create a new subscription to sensor discovery notifications +This method shall support the request and response data structures, and response codes, as specified in Table 7.4.3.4-1 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body This type represents a subscription to notifications from the Sensor-sharing Service regarding events related to changes in sensor information +@return []SensorDiscoveryEventSubscription +*/ +func (a *SensorDiscoverySubscriptionApiService) SensorDiscoverySubscriptionPOST(ctx context.Context, body SubscriptionsSensorDiscoveryBody) ([]SensorDiscoveryEventSubscription, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SensorDiscoveryEventSubscription + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/subscriptions/sensor_discovery" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 201 { + var v []SensorDiscoveryEventSubscription + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +SensorDiscoverySubscriptionApiService The POST method is used to create a new subscription to sensor discovery notifications +This method shall support the request and response data structures, and response codes, as specified in Table 7.4.3.4-1 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body New SensorDiscoveryEventSubscription is included as entity body of the request + * @param subscriptionId It uniquely identifies the created individual application mobility service +@return []SubscriptionLinkList +*/ +func (a *SensorDiscoverySubscriptionApiService) SensorDiscoverySubscriptionPUT(ctx context.Context, body SensorDiscoverySubscriptionIdBody, subscriptionId string) ([]SubscriptionLinkList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SubscriptionLinkList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/subscriptions/sensor_discovery/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", fmt.Sprintf("%v", subscriptionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SubscriptionLinkList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-sss/api_sensor_management.go b/go-packages/meep-sss/api_sensor_management.go new file mode 100644 index 0000000000000000000000000000000000000000..e4c3b44ec4eab7e7eb1e6d1f5f7fb0d898ff437d --- /dev/null +++ b/go-packages/meep-sss/api_sensor_management.go @@ -0,0 +1,141 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type SensorManagementApiService service + +/* +SensorManagementApiService The GET method is used to receive the sensor characteristics that can be modified on specific sensors +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.12.3.1-1 and 7.12.3.1-2 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param sensorIdentifier It uniquely identifies the created individual application mobility service +@return []SensorCharacteristic +*/ +func (a *SensorManagementApiService) SensorMgmtGET(ctx context.Context, sensorIdentifier []string) ([]SensorCharacteristic, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SensorCharacteristic + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/sensor_management" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("sensorIdentifier", parameterToString(sensorIdentifier, "multi")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SensorCharacteristic + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-sss/api_sensor_status_lookup.go b/go-packages/meep-sss/api_sensor_status_lookup.go new file mode 100644 index 0000000000000000000000000000000000000000..126696357f2b5eac2258b2394e6d7f3f535da48e --- /dev/null +++ b/go-packages/meep-sss/api_sensor_status_lookup.go @@ -0,0 +1,141 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type SensorStatusLookupApiService service + +/* +SensorStatusLookupApiService The GET method is used to query the available status +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.6.3.1-1 and 7.6.3.1-2 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param sensorIdentifier It uniquely identifies the created individual application mobility service +@return []SensorStatusInfo +*/ +func (a *SensorStatusLookupApiService) SensorStatusLookupGET(ctx context.Context, sensorIdentifier []string) ([]SensorStatusInfo, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SensorStatusInfo + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/queries/sensor_status" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("sensorIdentifier", parameterToString(sensorIdentifier, "multi")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SensorStatusInfo + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-sss/api_sensor_status_subscription.go b/go-packages/meep-sss/api_sensor_status_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..3be94b99f3e3b2e88d938149e9f1974026e6d592 --- /dev/null +++ b/go-packages/meep-sss/api_sensor_status_subscription.go @@ -0,0 +1,503 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type SensorStatusSubscriptionApiService service + +/* +SensorStatusSubscriptionApiService The GET method is used to retrieve information about this subscription +This method shall support the request and response data structures, and response codes, as specified in Tables 7.8.3.1-1 and 7.8.3.1-2 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param subscriptionId Unique identifiers of the subscription +@return []SensorStatusSubscription +*/ +func (a *SensorStatusSubscriptionApiService) SensorSatusIndividualSubscriptionGET(ctx context.Context, subscriptionId string) ([]SensorStatusSubscription, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SensorStatusSubscription + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/subscriptions/sensor_status/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", fmt.Sprintf("%v", subscriptionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SensorStatusSubscription + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +SensorStatusSubscriptionApiService The GET method is used to request information about the subscriptions related to sensor status for this requestor +This method shall support the URI query parameter, request and response data structures, and response codes, as specified in Tables 7.7.3.1-1 and 7.7.3.1-2 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *SensorStatusSubscriptionApiSensorStatusIndividualSubscriptionGETOpts - Optional Parameters: + * @param "SensorIdentifier" (optional.Interface of []string) - Unique identifiers of the sensors +@return []SubscriptionLinkList +*/ + +type SensorStatusSubscriptionApiSensorStatusIndividualSubscriptionGETOpts struct { + SensorIdentifier optional.Interface +} + +func (a *SensorStatusSubscriptionApiService) SensorStatusIndividualSubscriptionGET(ctx context.Context, localVarOptionals *SensorStatusSubscriptionApiSensorStatusIndividualSubscriptionGETOpts) ([]SubscriptionLinkList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SubscriptionLinkList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/subscriptions/sensor_status" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.SensorIdentifier.IsSet() { + localVarQueryParams.Add("sensorIdentifier", parameterToString(localVarOptionals.SensorIdentifier.Value(), "multi")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SubscriptionLinkList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +SensorStatusSubscriptionApiService The DELETE method is used to cancel the existing subscription +This method shall support the request and response data structures, and response codes, as specified in Tables 7.8.3.5-1 and 7.8.3.5-2 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param subscriptionId It uniquely identifies a subscription +@return []SubscriptionLinkList +*/ +func (a *SensorStatusSubscriptionApiService) SensorStatusSubscriptionDELETE(ctx context.Context, subscriptionId string) ([]SubscriptionLinkList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SubscriptionLinkList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/subscriptions/sensor_status/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", fmt.Sprintf("%v", subscriptionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 204 { + var v []SubscriptionLinkList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +SensorStatusSubscriptionApiService The PUT method is used to update the existing subscription +This method shall support the URI query parameters, request and response data structures, and response codes, as specified in Tables 7.8.3.2-1 and 7.8.3.2-2 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body New SensorStatusSubscription is included as entity body of the request + * @param subscriptionId It uniquely identifies the created individual application mobility service +@return []SensorStatusSubscription +*/ +func (a *SensorStatusSubscriptionApiService) SensorStatusSubscriptionPUT(ctx context.Context, body SensorStatusSubscriptionIdBody, subscriptionId string) ([]SensorStatusSubscription, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SensorStatusSubscription + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/subscriptions/sensor_status/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", fmt.Sprintf("%v", subscriptionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []SensorStatusSubscription + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-sss/api_status_status_subscription.go b/go-packages/meep-sss/api_status_status_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..267052987ab6f573b682e3b8166a8742323fa5f8 --- /dev/null +++ b/go-packages/meep-sss/api_status_status_subscription.go @@ -0,0 +1,142 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type StatusStatusSubscriptionApiService service + +/* +StatusStatusSubscriptionApiService The POST method is used to create a new subscription to sensor status notifications +This method shall support the request and response data structures, and response codes, as specified in Table 7.7.3.4-1 + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body The entity body in the request contains data type of the specific sensor status subscription that is to be created +@return []SensorStatusSubscription +*/ +func (a *StatusStatusSubscriptionApiService) SensorStatusSubscriptionPOST(ctx context.Context, body SubscriptionsSensorStatusBody) ([]SensorStatusSubscription, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SensorStatusSubscription + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/subscriptions/sensor_status" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 201 { + var v []SensorStatusSubscription + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 400 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 403 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + if localVarHttpResponse.StatusCode == 404 { + var v ProblemDetails + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/go-packages/meep-sss/client.go b/go-packages/meep-sss/client.go new file mode 100644 index 0000000000000000000000000000000000000000..a5f8f0729ce27a21fd5d657f640a54109601f981 --- /dev/null +++ b/go-packages/meep-sss/client.go @@ -0,0 +1,498 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "mime/multipart" + "net/http" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/oauth2" +) + +var ( + jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") + xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") +) + +// APIClient manages communication with the ETSI GS MEC 046 Sensors Sharing Service APIs API v3.1.1 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + ManagementnApi *ManagementnApiService + + SensorDataLookupApi *SensorDataLookupApiService + + SensorDataSubscriptionApi *SensorDataSubscriptionApiService + + SensorDiscoveryLookupApi *SensorDiscoveryLookupApiService + + SensorDiscoverySubscriptionApi *SensorDiscoverySubscriptionApiService + + SensorManagementApi *SensorManagementApiService + + SensorStatusLookupApi *SensorStatusLookupApiService + + SensorStatusSubscriptionApi *SensorStatusSubscriptionApiService + + StatusStatusSubscriptionApi *StatusStatusSubscriptionApiService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.ManagementnApi = (*ManagementnApiService)(&c.common) + c.SensorDataLookupApi = (*SensorDataLookupApiService)(&c.common) + c.SensorDataSubscriptionApi = (*SensorDataSubscriptionApiService)(&c.common) + c.SensorDiscoveryLookupApi = (*SensorDiscoveryLookupApiService)(&c.common) + c.SensorDiscoverySubscriptionApi = (*SensorDiscoverySubscriptionApiService)(&c.common) + c.SensorManagementApi = (*SensorManagementApiService)(&c.common) + c.SensorStatusLookupApi = (*SensorStatusLookupApiService)(&c.common) + c.SensorStatusSubscriptionApi = (*SensorStatusSubscriptionApiService)(&c.common) + c.StatusStatusSubscriptionApi = (*StatusStatusSubscriptionApiService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insenstive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.ToLower(a) == strings.ToLower(needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. +func parameterToString(obj interface{}, collectionFormat string) string { + var delimiter string + + switch collectionFormat { + case "pipes": + delimiter = "|" + case "ssv": + delimiter = " " + case "tsv": + delimiter = "\t" + case "csv": + delimiter = "," + } + + if reflect.TypeOf(obj).Kind() == reflect.Slice { + return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") + } + + return fmt.Sprintf("%v", obj) +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + return c.cfg.HTTPClient.Do(request) +} + +// Change base path to allow switching to mocks +func (c *APIClient) ChangeBasePath(path string) { + c.cfg.BasePath = path +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + fileName string, + fileBytes []byte) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + if len(fileBytes) > 0 && fileName != "" { + w.Boundary() + //_, fileNm := filepath.Split(fileName) + part, err := w.CreateFormFile("file", filepath.Base(fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(fileBytes) + if err != nil { + return nil, err + } + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + } + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = query.Encode() + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers.Set(h, v) + } + localVarRequest.Header = headers + } + + // Override request host, if applicable + if c.cfg.Host != "" { + localVarRequest.Host = c.cfg.Host + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if strings.Contains(contentType, "application/xml") { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } else if strings.Contains(contentType, "application/json") { + if err = json.Unmarshal(b, v); err != nil { + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(path) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("Invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } + expires = now.Add(lifetime) + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericSwaggerError Provides access to the body, error and model on returned errors. +type GenericSwaggerError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericSwaggerError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericSwaggerError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericSwaggerError) Model() interface{} { + return e.model +} diff --git a/go-packages/meep-sss/configuration.go b/go-packages/meep-sss/configuration.go new file mode 100644 index 0000000000000000000000000000000000000000..4ff6e04da0e24735f4b6363c9e3060581e252ca8 --- /dev/null +++ b/go-packages/meep-sss/configuration.go @@ -0,0 +1,72 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "net/http" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextAPIKey takes an APIKey as authentication for the request + ContextAPIKey = contextKey("apikey") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +type Configuration struct { + BasePath string `json:"basePath,omitempty"` + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + HTTPClient *http.Client +} + +func NewConfiguration() *Configuration { + cfg := &Configuration{ + BasePath: "https://localhost/sandboxname/sens/v1", + DefaultHeader: make(map[string]string), + UserAgent: "Swagger-Codegen/1.0.0/go", + } + return cfg +} + +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} diff --git a/go-packages/meep-sss/git_push.sh b/go-packages/meep-sss/git_push.sh new file mode 100644 index 0000000000000000000000000000000000000000..ae01b182ae9eb047d0999a496b060e62d7b01e5c --- /dev/null +++ b/go-packages/meep-sss/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/go-packages/meep-sss/go.mod b/go-packages/meep-sss/go.mod new file mode 100644 index 0000000000000000000000000000000000000000..c8839ed1bc6c5ea9bc1b4503f33a7009e66ac140 --- /dev/null +++ b/go-packages/meep-sss/go.mod @@ -0,0 +1,8 @@ +module github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-sss-client + +go 1.16 + +require ( + github.com/antihax/optional v1.0.0 + golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 +) diff --git a/go-packages/meep-sss/go.sum b/go-packages/meep-sss/go.sum new file mode 100644 index 0000000000000000000000000000000000000000..aafb344a88e584026c4ef64175c1fde271fe58ec --- /dev/null +++ b/go-packages/meep-sss/go.sum @@ -0,0 +1,369 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/go-packages/meep-sss/model_area_info.go b/go-packages/meep-sss/model_area_info.go new file mode 100644 index 0000000000000000000000000000000000000000..f7d1a9ebee0850b0ec1c3dc03ad542ecb948a459 --- /dev/null +++ b/go-packages/meep-sss/model_area_info.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type AreaInfo struct { + Shape *ShapeType `json:"shape"` + // Shall include one point if the shape is CIRCLE. Shall include 3-15 points if the shape is POLYGON + Points []Point `json:"points"` + // Shall be present if the shape is CIRCLE + Radius int32 `json:"radius,omitempty"` +} diff --git a/go-packages/meep-sss/model_link_type.go b/go-packages/meep-sss/model_link_type.go new file mode 100644 index 0000000000000000000000000000000000000000..c64f4b286e93b8e5c8d325b34bff58170cf19e74 --- /dev/null +++ b/go-packages/meep-sss/model_link_type.go @@ -0,0 +1,16 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// 'This data type represents a type of link' +type LinkType struct { + // The URI referring to the subscription. + Href string `json:"href"` +} diff --git a/go-packages/meep-sss/model_point.go b/go-packages/meep-sss/model_point.go new file mode 100644 index 0000000000000000000000000000000000000000..bb22431ad1283ec09a268ee6b53dfd5ad8abae69 --- /dev/null +++ b/go-packages/meep-sss/model_point.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// This type represents the geographical location of a point +type Point struct { + // Location latitude, expressed in the range -90° to +90° + Latitude float64 `json:"latitude"` + // Location longitude, expressed in the range -180° to +180°. + Longitude float64 `json:"longitude"` +} diff --git a/go-packages/meep-sss/model_problem_details.go b/go-packages/meep-sss/model_problem_details.go new file mode 100644 index 0000000000000000000000000000000000000000..b2fd68608b640b54f78bc1ea6723db9a987901b6 --- /dev/null +++ b/go-packages/meep-sss/model_problem_details.go @@ -0,0 +1,23 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type ProblemDetails struct { + // A URI reference according to IETF RFC 3986 that identifies the problem type + Type_ string `json:"type,omitempty"` + // A short, human-readable summary of the problem type + Title string `json:"title,omitempty"` + // The HTTP status code for this occurrence of the problem + Status int32 `json:"status,omitempty"` + // A human-readable explanation specific to this occurrence of the problem + Detail string `json:"detail,omitempty"` + // A URI reference that identifies the specific occurrence of the problem + Instance string `json:"instance,omitempty"` +} diff --git a/go-packages/meep-sss/model_sensor_characteristic.go b/go-packages/meep-sss/model_sensor_characteristic.go new file mode 100644 index 0000000000000000000000000000000000000000..6302a68e8e40cc6fff8b13c150bbe2bd3e5440a4 --- /dev/null +++ b/go-packages/meep-sss/model_sensor_characteristic.go @@ -0,0 +1,20 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// This type represents a sensor' characteristic which details the type of sensor and its working functionalities, such as the model of the sensor, the sampling frequency, the operating range, the accuracy +type SensorCharacteristic struct { + // The name of the characteristic + CharacteristicName string `json:"characteristicName"` + // The value of the characteristic. + CharacteristicValue string `json:"characteristicValue"` + // The unit of measure of the characteristic (see saref:UnitOfMeasure in ETSI TS 103 264 [4], clause 4.3.8). + CharacteristicUnitOfMeasure string `json:"characteristicUnitOfMeasure,omitempty"` +} diff --git a/go-packages/meep-sss/model_sensor_data.go b/go-packages/meep-sss/model_sensor_data.go new file mode 100644 index 0000000000000000000000000000000000000000..f47a171ceecd3639826649c88b38a892146c6055 --- /dev/null +++ b/go-packages/meep-sss/model_sensor_data.go @@ -0,0 +1,22 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SensorData struct { + // Unique identifier of the sensor + SensorIdentifier string `json:"sensorIdentifier"` + // The status of the sensor + Data string `json:"data"` + // String explaining the error of the sensor + DataFormat string `json:"dataFormat"` + // String explaining the error of the sensor + DataUnitOfMeasure string `json:"dataUnitOfMeasure"` + DataTimestamp *TimeStamp `json:"dataTimestamp,omitempty"` +} diff --git a/go-packages/meep-sss/model_sensor_data_subscription.go b/go-packages/meep-sss/model_sensor_data_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..793031433f590fef2b0742550524f02510ed87ff --- /dev/null +++ b/go-packages/meep-sss/model_sensor_data_subscription.go @@ -0,0 +1,21 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SensorDataSubscription struct { + SubscriptionType *SubscriptionType `json:"subscriptionType"` + // URI exposed by the client on which to receive notifications via HTTP + CallbackReference string `json:"callbackReference,omitempty"` + // Set to TRUE by the MEC application to request a test notification via HTTP on the callbackReference URI, + RequestTestNotification bool `json:"requestTestNotification,omitempty"` + WebsockNotifConfig *WebsockNotifConfig `json:"websockNotifConfig,omitempty"` + Links *SubscriptionLinks `json:"_links,omitempty"` + ExpiryDeadline *TimeStamp `json:"expiryDeadline,omitempty"` +} diff --git a/go-packages/meep-sss/model_sensor_discovery_event_subscription.go b/go-packages/meep-sss/model_sensor_discovery_event_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..0f8e04c00f676e488fed7c8c953f70937cfb0239 --- /dev/null +++ b/go-packages/meep-sss/model_sensor_discovery_event_subscription.go @@ -0,0 +1,25 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SensorDiscoveryEventSubscription struct { + SubscriptionType *SubscriptionType `json:"subscriptionType"` + // URI exposed by the client on which to receive notifications via HTTP + CallbackReference string `json:"callbackReference,omitempty"` + // Set to TRUE by the MEC application to request a test notification via HTTP on the callbackReference URI, + RequestTestNotification bool `json:"requestTestNotification,omitempty"` + WebsockNotifConfig *WebsockNotifConfig `json:"websockNotifConfig,omitempty"` + Links *SubscriptionLinks `json:"_links,omitempty"` + // Object containing the characteristics of the sensor(s) to be selected for the subscription + SensorInfoList []string `json:"sensorInfoList,omitempty"` + // The parameters describing the area to subscribe + GeographicalArea []AreaInfo `json:"geographicalArea,omitempty"` + ExpiryDeadline *TimeStamp `json:"expiryDeadline,omitempty"` +} diff --git a/go-packages/meep-sss/model_sensor_discovery_info.go b/go-packages/meep-sss/model_sensor_discovery_info.go new file mode 100644 index 0000000000000000000000000000000000000000..fbad019bbd8e3360ec4fc9b26f2aeb98db0b8ddc --- /dev/null +++ b/go-packages/meep-sss/model_sensor_discovery_info.go @@ -0,0 +1,22 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SensorDiscoveryInfo struct { + // Unique identifier of the sensor + SensorIdentifier string `json:"sensorIdentifier"` + // Type of the Sensor + SensorType string `json:"sensorType"` + // It indicates the list of properties that the sensor can sense + SensorPropertyList []string `json:"sensorPropertyList"` + // The sensor' characteristics + SensorCharacteristicList []SensorCharacteristic `json:"sensorCharacteristicList,omitempty"` + SensorPosition *Point `json:"sensorPosition,omitempty"` +} diff --git a/go-packages/meep-sss/model_sensor_discovery_subscription_id_body.go b/go-packages/meep-sss/model_sensor_discovery_subscription_id_body.go new file mode 100644 index 0000000000000000000000000000000000000000..a3a974a83689c6b5b11e395a330d6bead29e3a35 --- /dev/null +++ b/go-packages/meep-sss/model_sensor_discovery_subscription_id_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SensorDiscoverySubscriptionIdBody struct { + SensorDiscoveryEventSubscription *SensorDiscoveryEventSubscription `json:"SensorDiscoveryEventSubscription,omitempty"` +} diff --git a/go-packages/meep-sss/model_sensor_info.go b/go-packages/meep-sss/model_sensor_info.go new file mode 100644 index 0000000000000000000000000000000000000000..ab9a8a980bc6a06991307afa2f3f8c879b1156e6 --- /dev/null +++ b/go-packages/meep-sss/model_sensor_info.go @@ -0,0 +1,21 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SensorInfo struct { + // Type of the sensor + Type_ string `json:"type"` + // It indicates the list of properties that the sensor can sense (see saref:Property in ETSI TS 103 264 [4], clause 4.3.8). + SensorPropertyList []string `json:"sensorPropertyList"` + // The sensor' characteristics to be matched + SensorCharacteristicList []SensorCharacteristic `json:"sensorCharacteristicList,omitempty"` + // The parameters describing the area + GeographicalArea []AreaInfo `json:"geographicalArea,omitempty"` +} diff --git a/go-packages/meep-sss/model_sensor_status_info.go b/go-packages/meep-sss/model_sensor_status_info.go new file mode 100644 index 0000000000000000000000000000000000000000..8ca1c4504279c6f9ff4ffa2ee084594aa4d53cd0 --- /dev/null +++ b/go-packages/meep-sss/model_sensor_status_info.go @@ -0,0 +1,19 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SensorStatusInfo struct { + // Unique identifier of the sensor + SensorIdentifier string `json:"sensorIdentifier"` + // The status of the sensor + SensorStatusType string `json:"sensorStatusType"` + // String explaining the error of the sensor + ErrorInformation string `json:"errorInformation,omitempty"` +} diff --git a/go-packages/meep-sss/model_sensor_status_subscription.go b/go-packages/meep-sss/model_sensor_status_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..ea212d1442838019092758a34e3eb85a1f515604 --- /dev/null +++ b/go-packages/meep-sss/model_sensor_status_subscription.go @@ -0,0 +1,21 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SensorStatusSubscription struct { + SubscriptionType *SubscriptionType `json:"subscriptionType"` + // URI exposed by the client on which to receive notifications via HTTP + CallbackReference string `json:"callbackReference,omitempty"` + // Set to TRUE by the MEC application to request a test notification via HTTP on the callbackReference URI, + RequestTestNotification bool `json:"requestTestNotification,omitempty"` + WebsockNotifConfig *WebsockNotifConfig `json:"websockNotifConfig,omitempty"` + Links *SubscriptionLinks `json:"_links,omitempty"` + ExpiryDeadline *TimeStamp `json:"expiryDeadline,omitempty"` +} diff --git a/go-packages/meep-sss/model_sensor_status_subscription_id_body.go b/go-packages/meep-sss/model_sensor_status_subscription_id_body.go new file mode 100644 index 0000000000000000000000000000000000000000..8faaf03ed89b6d56bb87329b998e3545e5c698b1 --- /dev/null +++ b/go-packages/meep-sss/model_sensor_status_subscription_id_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SensorStatusSubscriptionIdBody struct { + SensorStatusSubscription *SensorStatusSubscription `json:"SensorStatusSubscription,omitempty"` +} diff --git a/go-packages/meep-sss/model_shape_type.go b/go-packages/meep-sss/model_shape_type.go new file mode 100644 index 0000000000000000000000000000000000000000..b04612db42929422b6a07d7636cf767191c3a3d8 --- /dev/null +++ b/go-packages/meep-sss/model_shape_type.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type ShapeType int32 + +// List of ShapeType +const ( + NULL_ShapeType ShapeType = "" + NULL_ShapeType ShapeType = "" +) diff --git a/go-packages/meep-sss/model_status_data_subscription_id_body.go b/go-packages/meep-sss/model_status_data_subscription_id_body.go new file mode 100644 index 0000000000000000000000000000000000000000..0b09d725c28b1300586e7ff603315696f0f8cfa3 --- /dev/null +++ b/go-packages/meep-sss/model_status_data_subscription_id_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type StatusDataSubscriptionIdBody struct { + SensorStatusSubscription *SensorDataSubscription `json:"SensorStatusSubscription,omitempty"` +} diff --git a/go-packages/meep-sss/model_subscription_link_list.go b/go-packages/meep-sss/model_subscription_link_list.go new file mode 100644 index 0000000000000000000000000000000000000000..66f1eed19cdc897437ff873dac1129bb2d57c13f --- /dev/null +++ b/go-packages/meep-sss/model_subscription_link_list.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SubscriptionLinkList struct { + Links *SubscriptionLinkListLinks `json:"_links"` +} diff --git a/go-packages/meep-sss/model_subscription_link_list_links.go b/go-packages/meep-sss/model_subscription_link_list_links.go new file mode 100644 index 0000000000000000000000000000000000000000..28469f3e232b245649d3a1ec834a7758971410e2 --- /dev/null +++ b/go-packages/meep-sss/model_subscription_link_list_links.go @@ -0,0 +1,17 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// List of hyperlinks related to the resource. +type SubscriptionLinkListLinks struct { + Self *LinkType `json:"self"` + // The MEC application's subscriptions + Subscriptions []SubscriptionLinkListSubscription `json:"subscriptions,omitempty"` +} diff --git a/go-packages/meep-sss/model_subscription_link_list_subscription.go b/go-packages/meep-sss/model_subscription_link_list_subscription.go new file mode 100644 index 0000000000000000000000000000000000000000..63b70ad7d1b4c6a48399d5527b16db38f490612b --- /dev/null +++ b/go-packages/meep-sss/model_subscription_link_list_subscription.go @@ -0,0 +1,17 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SubscriptionLinkListSubscription struct { + // The URI referring to the subscription + Href string `json:"href"` + // Type of the subscription + SubscriptionType string `json:"subscriptionType"` +} diff --git a/go-packages/meep-sss/model_subscription_links.go b/go-packages/meep-sss/model_subscription_links.go new file mode 100644 index 0000000000000000000000000000000000000000..b67e512a2b44b76da8c43fb39cfbb1fa3565ebab --- /dev/null +++ b/go-packages/meep-sss/model_subscription_links.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SubscriptionLinks struct { + Self *LinkType `json:"self"` +} diff --git a/go-packages/meep-sss/model_subscription_type.go b/go-packages/meep-sss/model_subscription_type.go new file mode 100644 index 0000000000000000000000000000000000000000..dc6bf57877be09e8afd5dba6231482127f9178d4 --- /dev/null +++ b/go-packages/meep-sss/model_subscription_type.go @@ -0,0 +1,19 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SubscriptionType string + +// List of SubscriptionType +const ( + SENSOR_DISCOVERY_EVENT_SUBSCRIPTION_SubscriptionType SubscriptionType = "SensorDiscoveryEventSubscription" + SENSOR_STATUS_SUBSCRIPTION_SubscriptionType SubscriptionType = "SensorStatusSubscription" + SENSOR_DATA_SUBSCRIPTION_SubscriptionType SubscriptionType = "SensorDataSubscription" +) diff --git a/go-packages/meep-sss/model_subscriptions_sensor_data_body.go b/go-packages/meep-sss/model_subscriptions_sensor_data_body.go new file mode 100644 index 0000000000000000000000000000000000000000..9a180635c613cee28389e3d14618f1e86e2eeb11 --- /dev/null +++ b/go-packages/meep-sss/model_subscriptions_sensor_data_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SubscriptionsSensorDataBody struct { + SensorDataSubscription *SensorDataSubscription `json:"SensorDataSubscription,omitempty"` +} diff --git a/go-packages/meep-sss/model_subscriptions_sensor_discovery_body.go b/go-packages/meep-sss/model_subscriptions_sensor_discovery_body.go new file mode 100644 index 0000000000000000000000000000000000000000..b7ab405f5e8adbb5c6f6447113207d1c7673dad2 --- /dev/null +++ b/go-packages/meep-sss/model_subscriptions_sensor_discovery_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SubscriptionsSensorDiscoveryBody struct { + SensorDiscoveryEventSubscription *SensorDiscoveryEventSubscription `json:"SensorDiscoveryEventSubscription,omitempty"` +} diff --git a/go-packages/meep-sss/model_subscriptions_sensor_status_body.go b/go-packages/meep-sss/model_subscriptions_sensor_status_body.go new file mode 100644 index 0000000000000000000000000000000000000000..4ea045f9eb37a69562ca38be2fb8067112d4e324 --- /dev/null +++ b/go-packages/meep-sss/model_subscriptions_sensor_status_body.go @@ -0,0 +1,14 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type SubscriptionsSensorStatusBody struct { + SensorStatusSubscription *SensorStatusSubscription `json:"SensorStatusSubscription,omitempty"` +} diff --git a/go-packages/meep-sss/model_time_stamp.go b/go-packages/meep-sss/model_time_stamp.go new file mode 100644 index 0000000000000000000000000000000000000000..036a269a4754dcce2c28f1b7743bf4489a672d63 --- /dev/null +++ b/go-packages/meep-sss/model_time_stamp.go @@ -0,0 +1,18 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +// 'This data type represents the time stamp as Unix-time since January 1, 1970, 00:00:00 UTC' +type TimeStamp struct { + // 'The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.' + Seconds int32 `json:"seconds"` + // 'The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.' + NanoSeconds int32 `json:"nanoSeconds"` +} diff --git a/go-packages/meep-sss/model_websock_notif_config.go b/go-packages/meep-sss/model_websock_notif_config.go new file mode 100644 index 0000000000000000000000000000000000000000..3b4ee4518ef958f85d60a4bc829a69d326d2f748 --- /dev/null +++ b/go-packages/meep-sss/model_websock_notif_config.go @@ -0,0 +1,17 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +type WebsockNotifConfig struct { + // Set by AMS to indicate to the service consumer the Websocket URI to be used for delivering notifications. + WebsocketUri string `json:"websocketUri,omitempty"` + // Set to true by the service consumer to indicate that Websocket delivery is requested. + RequestWebsocketUri bool `json:"requestWebsocketUri,omitempty"` +} diff --git a/go-packages/meep-sss/response.go b/go-packages/meep-sss/response.go new file mode 100644 index 0000000000000000000000000000000000000000..6cd536b2cc328aba412f2e2b9b93e8c30a4753ce --- /dev/null +++ b/go-packages/meep-sss/response.go @@ -0,0 +1,43 @@ +/* + * ETSI GS MEC 046 Sensors Sharing Service APIs + * + * GS MEC 046 Sensors Sharing Service APIs described using OpenAPI. + * + * API version: 3.1.1 + * Contact: cti_support@etsi.org + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package client + +import ( + "net/http" +) + +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the swagger operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +}