diff --git a/Attribution.txt b/Attribution.txt index 35a070e8..4978734e 100644 --- a/Attribution.txt +++ b/Attribution.txt @@ -61,9 +61,6 @@ https://github.com/mitchellh/mapstructure/blob/master/LICENSE mitchellh/reflectwalk (MIT) https://github.com/mitchellh/reflectwalk https://github.com/mitchellh/reflectwalk/blob/master/LICENSE -pelletier/go-toml (MIT) https://github.com/pelletier/go-toml -https://github.com/pelletier/go-toml/blob/master/LICENSE - pmezard/go-difflib (Unspecified) https://github.com/pmezard/go-difflib https://github.com/pmezard/go-difflib/blob/master/LICENSE diff --git a/README.md b/README.md index f6d475ad..319fc93c 100644 --- a/README.md +++ b/README.md @@ -72,42 +72,51 @@ This device service use the standard configuration defined by the **Device SDK** The `DeviceList` configuration is standard except that it is mandatory to provide end device parameters in the `DeviceList.Protocols.EndDevice_Params` structure for 2way-rest-device functionality. The following is a sample `DeviceList` that works with the sample device profiles referenced below. `path` parameter is optional. -```toml -[[DeviceList]] - Name = "sample-json" - ProfileName = "sample-json" - Description = "RESTful Device that sends in JSON data" - Labels = [ "rest", "json" ] - [DeviceList.Protocols] - [DeviceList.Protocols.other] -[[DeviceList]] - Name = "sample-image" - ProfileName = "sample-image" - Description = "RESTful Device that sends in binary image data" - Labels = [ "rest", "binary", "image" ] - [DeviceList.Protocols] - [DeviceList.Protocols.other] -[[DeviceList]] - Name = "sample-numeric" - ProfileName = "sample-numeric" - Description = "RESTful Device that sends in numeric data" - Labels = [ "rest", "numeric", "float", "int" ] - [DeviceList.Protocols] - [DeviceList.Protocols.other] -[[DeviceList]] - Name = "2way-rest-device" - ProfileName = "sample-2way-rest-device" - Description = "RESTful Device that sends data" - Labels = [ "rest", "2way-rest-device" ] - [DeviceList.Protocols] - [DeviceList.Protocols.REST] - Host = "127.0.0.1" - Port = "5000" - Path = "api" - [[DeviceList.AutoEvents]] - Interval = "20s" - OnChange = false - SourceName = "json" +```yaml +deviceList: + - name: sample-json + profileName: sample-json + description: RESTful Device that sends in JSON data + labels: + - rest + - json + protocols: + other: {} + - name: sample-image + profileName: sample-image + description: RESTful Device that sends in binary image data + labels: + - rest + - binary + - image + protocols: + other: {} + - name: sample-numeric + profileName: sample-numeric + description: RESTful Device that sends in numeric data + labels: + - rest + - numeric + - float + - int + protocols: + other: {} + - name: 2way-rest-device + profileName: sample-2way-rest-device + description: RESTful Device that sends data + labels: + - rest + - 2way-rest-device + protocols: + REST: + Host: 127.0.0.1 + Port: '5000' + Path: api + autoEvents: + - Interval: 20s + OnChange: false + SourceName: json + ``` ## Device Profile diff --git a/cmd/res/configuration.toml b/cmd/res/configuration.toml deleted file mode 100644 index 756bc4f3..00000000 --- a/cmd/res/configuration.toml +++ /dev/null @@ -1,16 +0,0 @@ -MaxEventSize = 0 # value 0 unlimit the maximum event size that can be sent to message bus or core-data - -[Writable] -LogLevel = "INFO" - -[Service] -Port = 59986 -StartupMsg = "device rest started" - -[MessageBus] - [MessageBus.Optional] - # Default MQTT & NATS Specific options that need to be here to enable environment variable overrides of them - ClientId = "device-rest" - -# Driver configs -[Driver] diff --git a/cmd/res/configuration.yaml b/cmd/res/configuration.yaml new file mode 100644 index 00000000..22b046ab --- /dev/null +++ b/cmd/res/configuration.yaml @@ -0,0 +1,23 @@ +MaxEventSize: 0 # value 0 unlimit the maximum event size that can be sent to message bus or core-data + +Writable: + LogLevel: INFO + +# uncomment when running from command-line in hybrid mode with -cp -o flags +# Registry: +# Host: localhost + +# Clients: +# core-metadata: +# Host: localhost + +Service: + Host: localhost + Port: 59986 + StartupMsg: device rest started + +MessageBus: + # Host: localhost # uncomment when running from command-line in hybrid mode + Optional: + ClientId: device-rest +Driver: {} diff --git a/cmd/res/devices/sample-devices.toml b/cmd/res/devices/sample-devices.toml deleted file mode 100644 index 2e6d79f9..00000000 --- a/cmd/res/devices/sample-devices.toml +++ /dev/null @@ -1,36 +0,0 @@ -# Pre-define Devices -[[DeviceList]] - Name = "sample-json" - ProfileName = "sample-json" - Description = "RESTful Device that sends in JSON data" - Labels = [ "rest", "json" ] - [DeviceList.Protocols] - [DeviceList.Protocols.other] -[[DeviceList]] - Name = "sample-image" - ProfileName = "sample-image" - Description = "RESTful Device that sends in binary image data" - Labels = [ "rest", "binary", "image" ] - [DeviceList.Protocols] - [DeviceList.Protocols.other] -[[DeviceList]] - Name = "sample-numeric" - ProfileName = "sample-numeric" - Description = "RESTful Device that sends in numeric data" - Labels = [ "rest", "numeric", "float", "int" ] - [DeviceList.Protocols] - [DeviceList.Protocols.other] -[[DeviceList]] - Name = "2way-rest-device" - ProfileName = "sample-2way-rest-device" - Description = "RESTful Device that sends data" - Labels = [ "rest", "2way-rest-device" ] - [DeviceList.Protocols] - [DeviceList.Protocols.REST] - Host = "127.0.0.1" - Port = "5000" - Path = "api" - #[[DeviceList.AutoEvents]] - # Interval = "20s" - # OnChange = false - # SourceName = "int8" diff --git a/cmd/res/devices/sample-devices.yaml b/cmd/res/devices/sample-devices.yaml new file mode 100644 index 00000000..88a6689a --- /dev/null +++ b/cmd/res/devices/sample-devices.yaml @@ -0,0 +1,44 @@ +# Pre-define Devices +deviceList: + - name: sample-json + profileName: sample-json + description: RESTful Device that sends in JSON data + labels: + - rest + - json + protocols: + other: {} + - name: sample-image + profileName: sample-image + description: RESTful Device that sends in binary image data + labels: + - rest + - binary + - image + protocols: + other: {} + - name: sample-numeric + profileName: sample-numeric + description: RESTful Device that sends in numeric data + labels: + - rest + - numeric + - float + - int + protocols: + other: {} + - name: 2way-rest-device + profileName: sample-2way-rest-device + description: RESTful Device that sends data + labels: + - rest + - 2way-rest-device + protocols: + REST: + Host: 127.0.0.1 + Port: '5000' + Path: api + # autoEvents: + # - Interval: 20s + # OnChange: false + # SourceName: int8 diff --git a/go.mod b/go.mod index 6778f37e..05819990 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/edgexfoundry/device-rest-go go 1.20 require ( - github.com/edgexfoundry/device-sdk-go/v3 v3.0.0-dev.54 - github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.28 + github.com/edgexfoundry/device-sdk-go/v3 v3.0.0-dev.61 + github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.34 github.com/gorilla/mux v1.8.0 github.com/spf13/cast v1.5.0 github.com/stretchr/testify v1.8.2 @@ -17,23 +17,23 @@ require ( github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/eclipse/paho.mqtt.golang v1.4.2 // indirect - github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.47 // indirect - github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.7 // indirect + github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.56 // indirect + github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.10 // indirect github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.18 // indirect - github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.5 // indirect - github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.9 // indirect + github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.7 // indirect + github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.10 // indirect github.com/fatih/color v1.9.0 // indirect github.com/fxamacker/cbor/v2 v2.4.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.11.2 // indirect + github.com/go-playground/validator/v10 v10.12.0 // indirect github.com/go-redis/redis/v7 v7.3.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/uuid v1.3.0 // indirect github.com/gorilla/websocket v1.4.2 // indirect - github.com/hashicorp/consul/api v1.19.1 // indirect + github.com/hashicorp/consul/api v1.20.0 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.1 // indirect github.com/hashicorp/go-hclog v0.14.1 // indirect @@ -42,7 +42,7 @@ require ( github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/leodido/go-urn v1.2.1 // indirect + github.com/leodido/go-urn v1.2.2 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/mitchellh/consulstructure v0.0.0-20190329231841-56fdc4d2da54 // indirect @@ -53,20 +53,19 @@ require ( github.com/nats-io/nats.go v1.24.0 // indirect github.com/nats-io/nkeys v0.3.0 // indirect github.com/nats-io/nuid v1.0.1 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/spiffe/go-spiffe/v2 v2.1.2 // indirect github.com/stretchr/objx v0.5.0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/zeebo/errs v1.3.0 // indirect - golang.org/x/crypto v0.6.0 // indirect - golang.org/x/mod v0.7.0 // indirect - golang.org/x/net v0.7.0 // indirect + golang.org/x/crypto v0.7.0 // indirect + golang.org/x/mod v0.8.0 // indirect + golang.org/x/net v0.8.0 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect - golang.org/x/tools v0.5.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect + golang.org/x/tools v0.6.0 // indirect google.golang.org/genproto v0.0.0-20230109162033-3c3c17ce83e6 // indirect google.golang.org/grpc v1.51.0 // indirect google.golang.org/protobuf v1.28.1 // indirect diff --git a/go.sum b/go.sum index 0aa60af7..36e6afc4 100644 --- a/go.sum +++ b/go.sum @@ -27,20 +27,20 @@ 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/edgexfoundry/device-sdk-go/v3 v3.0.0-dev.54 h1:v0agM9yGlu1036LQXzC0ImOah2zLaaUoho6ngdU2O3I= -github.com/edgexfoundry/device-sdk-go/v3 v3.0.0-dev.54/go.mod h1:GtXMlc0G7aXEXWhbW+7YwO9F1KA1qFRODhzfWFSWhoU= -github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.47 h1:KG2CAxu1BKwvT8vMONZC2bTUqJuwRY49XyUISAgjdfQ= -github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.47/go.mod h1:W26ejUzaSRzq/b/8oIdB8hKve4xW55XbCkfj8pvQNfE= -github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.7 h1:pOH2GLDg1KB4EmAzo6IEvl4NEVFAw3ywxPUMa5Wi1Vw= -github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.7/go.mod h1:ZZbOu7K0/P8B1VKhZygVujLQyhvWuPe0E2vC/k2yscw= -github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.28 h1:aNHlmF2uPcwUr7VKvNVJXdxMDaI41j2laoGxZy5H95g= -github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.28/go.mod h1:SYoD+tmUP/zwWuuIySmsQSjPx6MHP+2w9FsLgm0IR7A= +github.com/edgexfoundry/device-sdk-go/v3 v3.0.0-dev.61 h1:v1UZ0trMqkLk32rUyE9Z31hrkeov6toTfvWurgGi06M= +github.com/edgexfoundry/device-sdk-go/v3 v3.0.0-dev.61/go.mod h1:A1HxUhykvS4R2Tkgb6ncgpMqEMvwUy07XAktdGqe8xM= +github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.56 h1:jWVS5yS4dYFJIoXk3GVQxN99+e7mNZnMd/SaiSIiRDE= +github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.56/go.mod h1:Ohh+MaaGc85p48NpwHLoSfD+NfVJO9PrhVH5M1pb7po= +github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.10 h1:iDuAO3vpBQnlQuFhai/NATbJkiYXxo3bPCtSnFl07Yw= +github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.10/go.mod h1:8RlYm5CPzZgUsfXDWVP1TIeUMhsDNIdRdj1HXdomtOI= +github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.34 h1:sDJGkYYuDPsMpvV3NctRqX994dk0NpkCeAHbw3ee5eo= +github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.34/go.mod h1:1YS2J5NfPCd7TYBk0alu+RR5EBzBb+bnG0KF1qNRQYY= github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.18 h1:8empqTOIVhKzebC3gnP9C0LGQvwXtHLJF8x8AqlTGLM= github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.18/go.mod h1:Sf7lvKtICWRy0Tmvw+bV6L1wdXKRaTSmKmJKw4Caxe4= -github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.5 h1:FUUfsQUKHJqSwOXEj0j/qAn+uoWzM8nV7IOapGf7D80= -github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.5/go.mod h1:MroNeX/i6ymRu8cyuRB4U5zdBusyUpFhUphko6pInTQ= -github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.9 h1:12UHZG/Nl+dfFOaNnC87ANP/FQ3rOXe0Z6NVlYdmYgU= -github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.9/go.mod h1:tjny0Y2/sLTB9qx3pjvT9PfGHpEOdfej7pjV3s1zppk= +github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.7 h1:sje0agoLi8ayEFxGO3xtN7P/IXwjZUUxpC8G2fCTu44= +github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.7/go.mod h1:SGyo4fAHzOhDAd2Usa9RaBT/sOzkbceIqLrDG0+iYy8= +github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.10 h1:NJ5figB8O6vK44YA8LvuAywbY1BwC/5Kf7ZKc+1ItAU= +github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.10/go.mod h1:8hvfJ8L3mWTEXx3aEleGkh2U80jxfXzfSupDEQEqBjA= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= @@ -61,8 +61,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= -github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= +github.com/go-playground/validator/v10 v10.12.0 h1:E4gtWgxWxp8YSxExrQFv5BpCahla0PVF2oTTEYaWQGI= +github.com/go-playground/validator/v10 v10.12.0/go.mod h1:hCAPuzYvKdP33pxWa+2+6AIKXEKqjIUyqsNCtbsSJrA= github.com/go-redis/redis/v7 v7.3.0 h1:3oHqd0W7f/VLKBxeYTEpqdMUsmMectngjM9OtoRoIgg= github.com/go-redis/redis/v7 v7.3.0/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -86,8 +86,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= 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/hashicorp/consul/api v1.19.1 h1:GLeK1WD4VIRvt4wRhQKHFudztEkRb8pDs+uRiJgNwes= -github.com/hashicorp/consul/api v1.19.1/go.mod h1:jAt316eYgWGNLJtxkMQrcqRpuDE/kFJdqkEFwRXFv8U= +github.com/hashicorp/consul/api v1.20.0 h1:9IHTjNVSZ7MIwjlW3N3a7iGiykCMDpxZu8jsxFJh0yc= +github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= github.com/hashicorp/consul/sdk v0.13.1 h1:EygWVWWMczTzXGpO93awkHFzfUka6hLYJ0qhETd+6lY= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -137,8 +137,8 @@ github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= 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/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/leodido/go-urn v1.2.2 h1:7z68G0FCGvDk646jz1AelTYNYWrTNm0bEcFAo147wt4= +github.com/leodido/go-urn v1.2.2/go.mod h1:kUaIbLZWttglzwNuG0pgsh5vuV6u2YcGBYz1hIPjtOQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -189,8 +189,6 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= 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 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -211,7 +209,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rwtodd/Go.Sed v0.0.0-20210816025313-55464686f9ef/go.mod h1:8AEUvGVi2uQ5b24BIhcr0GCcpd/RNAFWaN2CJFrWIIQ= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= @@ -229,7 +228,6 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE 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.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= @@ -243,10 +241,10 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/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-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -256,8 +254,8 @@ golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLL 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-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.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-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= @@ -288,20 +286,20 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -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/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/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -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/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4= -golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +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= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230109162033-3c3c17ce83e6 h1:uUn6GsgKK2eCI0bWeRMgRCcqDaQXYDuB+5tXA5Xeg/8= @@ -314,8 +312,8 @@ google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175 google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= 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-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index a71863af..2c9f5557 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -83,7 +83,7 @@ parts: RES=$SNAPCRAFT_PART_INSTALL/config/device-rest/res/ mkdir -p $RES - cp cmd/res/configuration.toml $RES + cp cmd/res/configuration.yaml $RES cp -r cmd/res/devices $RES cp -r cmd/res/profiles $RES