Integrate loaded settings values into ui

Not yet done for single choice and multi choice, but getting there...
This commit is contained in:
Benedikt Kulmann
2020-05-07 07:42:50 +02:00
parent 8a6a06fcb8
commit e44654dc9d
21 changed files with 2416 additions and 1494 deletions

View File

@@ -164,7 +164,7 @@ $(GOPATH)/bin/protoc-gen-micro:
GO111MODULE=on go get -v github.com/micro/protoc-gen-micro/v2
$(GOPATH)/bin/protoc-gen-microweb:
GO111MODULE=off go get -v github.com/webhippie/protoc-gen-microweb
GO111MODULE=off go get -v github.com/owncloud/protoc-gen-microweb
$(GOPATH)/bin/protoc-gen-swagger:
GO111MODULE=off go get -v github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
@@ -173,25 +173,25 @@ pkg/proto/v0/settings.pb.go: pkg/proto/v0/settings.proto
protoc \
-I=third_party/ \
-I=pkg/proto/v0/ \
--go_out=logtostderr=true:pkg/proto/v0 settings.proto
--go_out=pkg/proto/v0 settings.proto
pkg/proto/v0/settings.pb.micro.go: pkg/proto/v0/settings.proto
protoc \
-I=third_party/ \
-I=pkg/proto/v0/ \
--micro_out=logtostderr=true:pkg/proto/v0 settings.proto
--micro_out=pkg/proto/v0 settings.proto
pkg/proto/v0/settings.pb.web.go: pkg/proto/v0/settings.proto
protoc \
-I=third_party/ \
-I=pkg/proto/v0/ \
--microweb_out=logtostderr=true:pkg/proto/v0 settings.proto
--microweb_out=pkg/proto/v0 settings.proto
pkg/proto/v0/settings.swagger.json: pkg/proto/v0/settings.proto
protoc \
-I=third_party/ \
-I=pkg/proto/v0/ \
--swagger_out=logtostderr=true:pkg/proto/v0 settings.proto
--swagger_out=pkg/proto/v0 settings.proto
.PHONY: protobuf
protobuf: $(GOPATH)/bin/protoc-gen-go $(GOPATH)/bin/protoc-gen-micro $(GOPATH)/bin/protoc-gen-microweb $(GOPATH)/bin/protoc-gen-swagger pkg/proto/v0/settings.pb.go pkg/proto/v0/settings.pb.micro.go pkg/proto/v0/settings.pb.web.go pkg/proto/v0/settings.swagger.json

10
go.mod
View File

@@ -11,18 +11,20 @@ require (
github.com/go-chi/render v1.0.1
github.com/golang/protobuf v1.4.0
github.com/grpc-ecosystem/grpc-gateway v1.14.4
github.com/micro/cli/v2 v2.1.1
github.com/micro/go-micro/v2 v2.0.0
github.com/micro/cli/v2 v2.1.2
github.com/micro/go-micro/v2 v2.5.1-0.20200417165434-16db76bee2fb
github.com/micro/protoc-gen-micro/v2 v2.3.0 // indirect
github.com/oklog/run v1.0.0
github.com/openzipkin/zipkin-go v0.2.2
github.com/owncloud/ocis-hello v0.1.0-alpha1
github.com/owncloud/ocis-pkg/v2 v2.0.1
github.com/restic/calens v0.2.0
github.com/spf13/viper v1.6.1
github.com/spf13/viper v1.6.3
go.opencensus.io v0.22.2
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0
google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb
google.golang.org/grpc v1.27.0
google.golang.org/protobuf v1.21.0
)
replace google.golang.org/grpc => google.golang.org/grpc v1.26.0

58
go.sum
View File

@@ -112,6 +112,7 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce
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/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y=
github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA=
github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/bmatcuk/doublestar v1.1.1 h1:YroD6BJCZBYx06yYFEWvUuKVWQn3vLLQAVmDmvTSaiQ=
@@ -138,11 +139,14 @@ github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReG
github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM=
github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE=
github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ=
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/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/cloudflare/cloudflare-go v0.10.2/go.mod h1:qhVI5MKwBGhdNU89ZRz2plgYutcJ5PCekLxXn56w6SY=
github.com/cloudflare/cloudflare-go v0.10.6/go.mod h1:dcRl7AXBH5Bf7QFTBVc3TRzwvotSeO4AlnMhuxORAX8=
github.com/cloudflare/cloudflare-go v0.10.9/go.mod h1:5TrsWH+3f4NV6WjtS5QFp+DifH81rph40gU374Sh0dQ=
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
@@ -157,6 +161,7 @@ github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkE
github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY=
github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/etcd v3.3.17+incompatible h1:f/Z3EoDSx1yjaIjLQGo1diYUlQYSBrrAQ5vP8NjwXwo=
github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/etcd v3.3.18+incompatible h1:Zz1aXgDrFFi1nadh58tA9ktt06cmPTwNNP3dXwIq1lE=
@@ -174,6 +179,8 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc
github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.7 h1:6pwm8kMQKCmgUg0ZHTm5+/YvRK0s3THD/28+T6/kk4A=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -196,10 +203,12 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/dustin/go-humanize v0.0.0-20180421182945-02af3965c54e/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0/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.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts=
github.com/ef-ds/deque v1.0.4-0.20190904040645-54cb57c252a1/go.mod h1:HvODWzv6Y6kBf3Ah2WzN1bHjDUezGLaAhwuWVwfpEJs=
github.com/eknkc/basex v1.0.0/go.mod h1:k/F/exNEHFdbs3ZHuasoP2E7zeWwZblG84Y7Z59vQRo=
github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
@@ -209,6 +218,7 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
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/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch/v5 v5.0.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4=
github.com/exoscale/egoscale v0.18.1/go.mod h1:Z7OOdzzTOz1Q1PjQXumlz9Wn/CddH0zSYdCF3rnBKXE=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
@@ -223,6 +233,7 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
github.com/fsouza/go-dockerclient v1.4.4/go.mod h1:PrwszSL5fbmsESocROrOGq/NULMXRw+bajY0ltzD6MA=
github.com/fsouza/go-dockerclient v1.6.0/go.mod h1:YWwtNPuL4XTX1SKJQk86cWPmmqwx+4np9qfPbb+znGc=
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gizak/termui/v3 v3.1.0 h1:ZZmVDgwHl7gR7elfKf1xc4IudXZ5qqfDh4wExk4Iajc=
github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY=
@@ -266,6 +277,9 @@ github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf
github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg=
github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.0.3/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
@@ -358,6 +372,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t
github.com/grpc-ecosystem/grpc-gateway v1.9.2/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.9.4 h1:5xLhQjsk4zqPf9EHCrja2qFZMx+yBqkO3XgJ14bNnU0=
github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.14.4 h1:IOPK2xMPP3aV6/NPt4jt//ELFo3Vv8sDVD8j3+tleDU=
github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
@@ -400,6 +415,7 @@ github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvh
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/haya14busa/goverage v0.0.0-20180129164344-eec3514a20b5/go.mod h1:0YZ2wQSuwviXXXGUiK6zXzskyBLAbLXhamxzcFHSLoM=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo=
github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4=
@@ -407,6 +423,7 @@ github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmK
github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4=
github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84=
github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ=
github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
@@ -490,36 +507,51 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54=
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE=
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/mholt/certmagic v0.7.5/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaRaOZi6aQ=
github.com/mholt/certmagic v0.8.3/go.mod h1:91uJzK5K8IWtYQqTi5R2tsxV1pCde+wdGfaRaOZi6aQ=
github.com/mholt/certmagic v0.9.1/go.mod h1:nu8jbsbtwK4205EDH/ZUMTKsfYpJA1Q7MKXHfgTihNw=
github.com/mholt/certmagic v0.9.3/go.mod h1:nu8jbsbtwK4205EDH/ZUMTKsfYpJA1Q7MKXHfgTihNw=
github.com/micro/cli v0.2.0 h1:ut3rV5JWqZjsXIa2MvGF+qMUP8DAUTvHX9Br5gO4afA=
github.com/micro/cli v0.2.0/go.mod h1:jRT9gmfVKWSS6pkKcXQ8YhUyj6bzwxK8Fp5b0Y7qNnk=
github.com/micro/cli/v2 v2.1.1 h1:uFw0SMIKmGuyHIm8lXns/NOn7V62bM5y7DnlxUM+BEQ=
github.com/micro/cli/v2 v2.1.1/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg=
github.com/micro/cli/v2 v2.1.2 h1:43J1lChg/rZCC1rvdqZNFSQDrGT7qfMrtp6/ztpIkEM=
github.com/micro/cli/v2 v2.1.2/go.mod h1:EguNh6DAoWKm9nmk+k/Rg0H3lQnDxqzu5x5srOtGtYg=
github.com/micro/go-micro v1.16.0/go.mod h1:A0F58bHLh2m0LAI9QyhvmbN8c1cxhAZo3cM6s+iDsrM=
github.com/micro/go-micro v1.17.1/go.mod h1:klwUJL1gkdY1MHFyz+fFJXn52dKcty4hoe95Mp571AA=
github.com/micro/go-micro v1.18.0 h1:gP70EZVHpJuUIT0YWth192JmlIci+qMOEByHm83XE9E=
github.com/micro/go-micro v1.18.0/go.mod h1:klwUJL1gkdY1MHFyz+fFJXn52dKcty4hoe95Mp571AA=
github.com/micro/go-micro/v2 v2.0.0 h1:bMx549RwJ9Yuiui8cDVlfYhVNP8I8KBJTMyLthEXpRw=
github.com/micro/go-micro/v2 v2.0.0/go.mod h1:v7QP5UhKRt37ixjJe8DouWmg0/eE6dltr5h0idJ9BpE=
github.com/micro/go-micro/v2 v2.5.1-0.20200417165434-16db76bee2fb h1:LjGUj/0hVn8pn8I+MoJCctj1gQny14lqT3a6v5THEoo=
github.com/micro/go-micro/v2 v2.5.1-0.20200417165434-16db76bee2fb/go.mod h1:qz2UT4UFdFVs+qUGMuDK3xuHgude1BgntqQ29sbpPlE=
github.com/micro/go-plugins v1.5.1 h1:swcFD7ynCTUo98APqIEIbPu2XMd6yVGTnI8PqdnCwOQ=
github.com/micro/go-plugins v1.5.1/go.mod h1:jcxejzJCAMH731cQHbS/hncyKe0rxAbzKkibj8glad4=
github.com/micro/go-plugins/wrapper/trace/opencensus/v2 v2.0.1 h1:7IkXfl94MdLZQwk0lNmu9Cg5WP42Zak9EtQMeN4SvVs=
github.com/micro/go-plugins/wrapper/trace/opencensus/v2 v2.0.1/go.mod h1:QrkcwcDtIs2hIJpIEhozekyf6Rfz5C36kFI8+zzCpX0=
github.com/micro/mdns v0.3.0 h1:bYycYe+98AXR3s8Nq5qvt6C573uFTDPIYzJemWON0QE=
github.com/micro/mdns v0.3.0/go.mod h1:KJ0dW7KmicXU2BV++qkLlmHYcVv7/hHnbtguSWt9Aoc=
github.com/micro/micro v1.16.0 h1:qCZV20WoTOtJ1IyLU/a0A0BMSertfu+iOj/2AJ4Uvrk=
github.com/micro/micro v1.16.0/go.mod h1:TO5Ng0KidbfRYIxVM4Q3deZ0A+qwRyP9WeXp+k2fWNA=
github.com/micro/micro/v2 v2.5.1-0.20200418121137-24e9b206767c h1:0xGuo2yepDL8p+id/kXqVka+5iiOBSyfqOX01csnOYk=
github.com/micro/micro/v2 v2.5.1-0.20200418121137-24e9b206767c/go.mod h1:fqqaYbJGYzSBi7Ms2Adly7Xzw9+WIRBAucUjwGmYeFY=
github.com/micro/protoc-gen-micro v1.0.0 h1:qKh5S3I1RfenhIs5mqDFJLwRlRDlgin7XWiUKZbpwLM=
github.com/micro/protoc-gen-micro v1.0.0/go.mod h1:C8ij4DJhapBmypcT00AXdb0cZ675/3PqUO02buWWqbE=
github.com/micro/protoc-gen-micro/v2 v2.3.0 h1:PBbGeNh4BOy1w4eRdeo4yWJJNWGLnaJX6/h55I74EXE=
github.com/micro/protoc-gen-micro/v2 v2.3.0/go.mod h1:gcsUvKSTTTalq+pqdUbFS40OTsURpYgL5+yUguR1djk=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
@@ -566,18 +598,24 @@ github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL
github.com/nats-io/nats-server/v2 v2.1.0/go.mod h1:r5y0WgCag0dTj/qiHkHrXAcKQ/f5GMOZaEGdoxxnJ4I=
github.com/nats-io/nats-server/v2 v2.1.2 h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc=
github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k=
github.com/nats-io/nats-server/v2 v2.1.6/go.mod h1:BL1NOtaBQ5/y97djERRVWNouMW7GT3gxnmbE/eC8u8A=
github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM=
github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ=
github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
github.com/nats-io/nats.go v1.9.2 h1:oDeERm3NcZVrPpdR/JpGdWHMv3oJ8yY30YwxKq+DU2s=
github.com/nats-io/nats.go v1.9.2/go.mod h1:AjGArbfyR50+afOUotNX2Xs5SYHf+CoOa5HH1eEl2HE=
github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4=
github.com/nats-io/nkeys v0.1.0 h1:qMd4+pRHgdr1nAClu+2h/2a5F2TmKcCzjCDazVgRoX4=
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
github.com/nats-io/nkeys v0.1.3 h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k=
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
github.com/nats-io/nkeys v0.1.4 h1:aEsHIssIk6ETN5m2/MD8Y4B2X7FfXrBAUdkyRvbVYzA=
github.com/nats-io/nkeys v0.1.4/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/nats-io/stan.go v0.5.0/go.mod h1:dYqB+vMN3C2F9pT1FRQpg9eHbjPj6mP0yYuyBNuXHZE=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
github.com/netdata/go-orchestrator v0.0.0-20190905093727-c793edba0e8f/go.mod h1:ECF8anFVCt/TfTIWVPgPrNaYJXtAtpAOF62ugDbw41A=
github.com/nlopes/slack v0.6.0/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk=
github.com/nlopes/slack v0.6.1-0.20191106133607-d06c2a2b3249/go.mod h1:JzQ9m3PMAqcpeCam7UaHSuBuupz7CmpjehYMayT6YOk=
github.com/nrdcg/auroradns v1.0.0/go.mod h1:6JPXKzIRzZzMqtTDgueIhTi6rFf1QvYE/HzqidhOhjw=
@@ -593,6 +631,8 @@ github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/olekukonko/tablewriter v0.0.3/go.mod h1:YZeBtGzYYEsCHp2LST/u/0NDwGkRoBtmn1cIWCJiS6M=
github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
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=
@@ -626,6 +666,7 @@ github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgF
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=
@@ -731,6 +772,8 @@ github.com/spf13/viper v1.5.0 h1:GpsTwfsQ27oS/Aha/6d1oD7tpKIqWnOA6tgOX9HHkt4=
github.com/spf13/viper v1.5.0/go.mod h1:AkYRkVJF8TkSG/xet6PzXX+l39KhhXa2pdqVSxnTcn4=
github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk=
github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k=
github.com/spf13/viper v1.6.3 h1:pDDu1OyEDTKzpJwdq4TiuLyMsUgRa/BT5cn5O62NoHs=
github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw=
github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI=
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=
@@ -763,6 +806,7 @@ github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMW
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4 h1:gKMu1Bf6QINDnvyZuTaACm9ofY+PRh+5vFz4oxBZeF8=
@@ -784,6 +828,7 @@ github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxt
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0=
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
@@ -835,6 +880,8 @@ golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a h1:R/qVym5WAxsZWQqZCwDY/8
golang.org/x/crypto v0.0.0-20191108234033-bd318be0434a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200117160349-530e935923ad h1:Jh8cai0fqIK+f6nG0UgPW5wFk8wmiMhM3AyciDBdtQg=
golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 h1:3zb4D3T4G8jdExgVU/95+vQXfpEPiMdCaZgmGVxjNHM=
golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/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=
@@ -892,14 +939,19 @@ golang.org/x/net v0.0.0-20191027093000-83d349e8ac1a/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191109021931-daa7c04131f5 h1:bHNaocaoJxYBo5cw41UyTMLjYlb8wPY7+WFrnklbHOM=
golang.org/x/net v0.0.0-20191109021931-daa7c04131f5/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191207000613-e7e4b65ae663/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0 h1:MsuvTghUPjX762sGLnGsxC3HM0B5r83wEtYcYR8/vRs=
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
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-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/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=
@@ -948,6 +1000,8 @@ golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4 h1:Hynbrlo6LbYI3H1IqXpkVDOcX/3HiPdhVEuyj5a59RM=
golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/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=
@@ -958,6 +1012,7 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w=
golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/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=
@@ -1061,6 +1116,7 @@ gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
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/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
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/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
@@ -1081,6 +1137,7 @@ gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLv
gopkg.in/ldap.v3 v3.1.0/go.mod h1:dQjCc0R0kfyFjIlWNMH1DORwUASZyDxo2Ry1B51dXaQ=
gopkg.in/ns1/ns1-go.v2 v2.0.0-20190730140822-b51389932cbc/go.mod h1:VV+3haRsgDiVLxyifmMBrBIuCWFBPYKbRssXB9z67Hw=
gopkg.in/olivere/elastic.v5 v5.0.82/go.mod h1:uhHoB4o3bvX5sorxBU29rPcmBQdV2Qfg0FBrx5D6pV0=
gopkg.in/olivere/elastic.v5 v5.0.83/go.mod h1:LXF6q9XNBxpMqrcgax95C6xyARXWbbCXUrtTxrNrxJI=
gopkg.in/redis.v3 v3.6.4/go.mod h1:6XeGv/CrsUFDU9aVbUdNykN7k1zVmoeg83KC9RbQfiU=
gopkg.in/resty.v1 v1.9.1/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
@@ -1090,6 +1147,7 @@ gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzE
gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g=
gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8=
gopkg.in/telegram-bot-api.v4 v4.6.4/go.mod h1:5DpGO5dbumb40px+dXcwCpcjmeHNYLpk0bp3XRNvWDM=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
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=

View File

@@ -60,6 +60,7 @@
"not dead"
],
"dependencies": {
"lodash": "^4.17.15",
"owncloud-design-system": "^1.2.2",
"vuex": "^3.2.0"
}

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because it is too large Load Diff

View File

@@ -13,6 +13,7 @@ import (
import (
context "context"
api "github.com/micro/go-micro/v2/api"
client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server"
)
@@ -29,10 +30,39 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context
var _ client.Option
var _ server.Option
// Api Endpoints for BundleService service
func NewBundleServiceEndpoints() []*api.Endpoint {
return []*api.Endpoint{
&api.Endpoint{
Name: "BundleService.SaveSettingsBundle",
Path: []string{"/api/v0/settings/bundle-save"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
&api.Endpoint{
Name: "BundleService.GetSettingsBundle",
Path: []string{"/api/v0/settings/bundle-get"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
&api.Endpoint{
Name: "BundleService.ListSettingsBundles",
Path: []string{"/api/v0/settings/bundles-list"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
}
}
// Client API for BundleService service
type BundleService interface {
@@ -101,6 +131,27 @@ func RegisterBundleServiceHandler(s server.Server, hdlr BundleServiceHandler, op
bundleService
}
h := &bundleServiceHandler{hdlr}
opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "BundleService.SaveSettingsBundle",
Path: []string{"/api/v0/settings/bundle-save"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
}))
opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "BundleService.GetSettingsBundle",
Path: []string{"/api/v0/settings/bundle-get"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
}))
opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "BundleService.ListSettingsBundles",
Path: []string{"/api/v0/settings/bundles-list"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
}))
return s.Handle(s.NewHandler(&BundleService{h}, opts...))
}
@@ -120,6 +171,34 @@ func (h *bundleServiceHandler) ListSettingsBundles(ctx context.Context, in *List
return h.BundleServiceHandler.ListSettingsBundles(ctx, in, out)
}
// Api Endpoints for ValueService service
func NewValueServiceEndpoints() []*api.Endpoint {
return []*api.Endpoint{
&api.Endpoint{
Name: "ValueService.SaveSettingsValue",
Path: []string{"/api/v0/settings/value-save"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
&api.Endpoint{
Name: "ValueService.GetSettingsValue",
Path: []string{"/api/v0/settings/value-get"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
&api.Endpoint{
Name: "ValueService.ListSettingsValues",
Path: []string{"/api/v0/settings/values-list"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
},
}
}
// Client API for ValueService service
type ValueService interface {
@@ -188,6 +267,27 @@ func RegisterValueServiceHandler(s server.Server, hdlr ValueServiceHandler, opts
valueService
}
h := &valueServiceHandler{hdlr}
opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "ValueService.SaveSettingsValue",
Path: []string{"/api/v0/settings/value-save"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
}))
opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "ValueService.GetSettingsValue",
Path: []string{"/api/v0/settings/value-get"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
}))
opts = append(opts, api.WithEndpoint(&api.Endpoint{
Name: "ValueService.ListSettingsValues",
Path: []string{"/api/v0/settings/values-list"},
Method: []string{"POST"},
Body: "*",
Handler: "rpc",
}))
return s.Handle(s.NewHandler(&ValueService{h}, opts...))
}

View File

@@ -53,10 +53,10 @@ func (h *webBundleServiceHandler) GetSettingsBundle(w http.ResponseWriter, r *ht
resp := &GetSettingsBundleResponse{}
//if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
// http.Error(w, err.Error(), http.StatusPreconditionFailed)
// return
//}
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
http.Error(w, err.Error(), http.StatusPreconditionFailed)
return
}
if err := h.h.GetSettingsBundle(
context.Background(),
@@ -67,7 +67,7 @@ func (h *webBundleServiceHandler) GetSettingsBundle(w http.ResponseWriter, r *ht
return
}
render.Status(r, http.StatusOK)
render.Status(r, http.StatusCreated)
render.JSON(w, r, resp)
}
@@ -77,10 +77,10 @@ func (h *webBundleServiceHandler) ListSettingsBundles(w http.ResponseWriter, r *
resp := &ListSettingsBundlesResponse{}
//if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
// http.Error(w, err.Error(), http.StatusPreconditionFailed)
// return
//}
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
http.Error(w, err.Error(), http.StatusPreconditionFailed)
return
}
if err := h.h.ListSettingsBundles(
context.Background(),
@@ -91,7 +91,7 @@ func (h *webBundleServiceHandler) ListSettingsBundles(w http.ResponseWriter, r *
return
}
render.Status(r, http.StatusOK)
render.Status(r, http.StatusCreated)
render.JSON(w, r, resp)
}
@@ -101,9 +101,9 @@ func RegisterBundleServiceWeb(r chi.Router, i BundleServiceHandler, middlewares
h: i,
}
r.MethodFunc("POST", "/api/v0/settings/bundles", handler.SaveSettingsBundle)
r.MethodFunc("GET", "/api/v0/settings/bundles/{identifier.extension}/{identifier.bundle_key}", handler.GetSettingsBundle)
r.MethodFunc("GET", "/api/v0/settings/bundles/{identifier.extension}", handler.ListSettingsBundles)
r.MethodFunc("POST", "/api/v0/settings/bundle-save", handler.SaveSettingsBundle)
r.MethodFunc("POST", "/api/v0/settings/bundle-get", handler.GetSettingsBundle)
r.MethodFunc("POST", "/api/v0/settings/bundles-list", handler.ListSettingsBundles)
}
type webValueServiceHandler struct {
@@ -145,10 +145,10 @@ func (h *webValueServiceHandler) GetSettingsValue(w http.ResponseWriter, r *http
resp := &GetSettingsValueResponse{}
//if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
// http.Error(w, err.Error(), http.StatusPreconditionFailed)
// return
//}
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
http.Error(w, err.Error(), http.StatusPreconditionFailed)
return
}
if err := h.h.GetSettingsValue(
context.Background(),
@@ -159,7 +159,7 @@ func (h *webValueServiceHandler) GetSettingsValue(w http.ResponseWriter, r *http
return
}
render.Status(r, http.StatusOK)
render.Status(r, http.StatusCreated)
render.JSON(w, r, resp)
}
@@ -169,10 +169,10 @@ func (h *webValueServiceHandler) ListSettingsValues(w http.ResponseWriter, r *ht
resp := &ListSettingsValuesResponse{}
//if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
// http.Error(w, err.Error(), http.StatusPreconditionFailed)
// return
//}
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
http.Error(w, err.Error(), http.StatusPreconditionFailed)
return
}
if err := h.h.ListSettingsValues(
context.Background(),
@@ -183,7 +183,7 @@ func (h *webValueServiceHandler) ListSettingsValues(w http.ResponseWriter, r *ht
return
}
render.Status(r, http.StatusOK)
render.Status(r, http.StatusCreated)
render.JSON(w, r, resp)
}
@@ -193,9 +193,9 @@ func RegisterValueServiceWeb(r chi.Router, i ValueServiceHandler, middlewares ..
h: i,
}
r.MethodFunc("POST", "/api/v0/settings/values", handler.SaveSettingsValue)
r.MethodFunc("GET", "/api/v0/settings/values/{identifier.account_uuid}/{identifier.extension}/{identifier.bundle_key}/{identifier.setting_key}", handler.GetSettingsValue)
r.MethodFunc("GET", "/api/v0/settings/values/{identifier.account_uuid}/{identifier.extension}/{identifier.bundle_key}", handler.ListSettingsValues)
r.MethodFunc("POST", "/api/v0/settings/value-save", handler.SaveSettingsValue)
r.MethodFunc("POST", "/api/v0/settings/value-get", handler.GetSettingsValue)
r.MethodFunc("POST", "/api/v0/settings/values-list", handler.ListSettingsValues)
}
// SaveSettingsBundleRequestJSONMarshaler describes the default jsonpb.Marshaler used by all

View File

@@ -1,7 +1,7 @@
syntax = "proto3";
package proto;
option go_package = "proto";
option go_package = ".;proto";
import "google/api/annotations.proto";
import "protoc-gen-swagger/options/annotations.proto";
@@ -33,30 +33,42 @@ option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
service BundleService {
rpc SaveSettingsBundle(SaveSettingsBundleRequest) returns (SaveSettingsBundleResponse) {
option (google.api.http) = {
post: "/api/v0/settings/bundles",
post: "/api/v0/settings/bundle-save",
body: "*"
};
};
rpc GetSettingsBundle(GetSettingsBundleRequest) returns (GetSettingsBundleResponse) {
option (google.api.http).get = "/api/v0/settings/bundles/{identifier.extension}/{identifier.bundle_key}";
option (google.api.http) = {
post: "/api/v0/settings/bundle-get",
body: "*"
};
};
rpc ListSettingsBundles(ListSettingsBundlesRequest) returns (ListSettingsBundlesResponse) {
option (google.api.http).get = "/api/v0/settings/bundles/{identifier.extension}";
option (google.api.http) = {
post: "/api/v0/settings/bundles-list",
body: "*"
};
};
}
service ValueService {
rpc SaveSettingsValue(SaveSettingsValueRequest) returns (SaveSettingsValueResponse) {
option (google.api.http) = {
post: "/api/v0/settings/values",
post: "/api/v0/settings/value-save",
body: "*"
};
};
rpc GetSettingsValue(GetSettingsValueRequest) returns (GetSettingsValueResponse) {
option (google.api.http).get = "/api/v0/settings/values/{identifier.account_uuid}/{identifier.extension}/{identifier.bundle_key}/{identifier.setting_key}";
option (google.api.http) = {
post: "/api/v0/settings/value-get",
body: "*"
};
};
rpc ListSettingsValues(ListSettingsValuesRequest) returns (ListSettingsValuesResponse) {
option (google.api.http).get = "/api/v0/settings/values/{identifier.account_uuid}/{identifier.extension}/{identifier.bundle_key}";
option (google.api.http) = {
post: "/api/v0/settings/values-list",
body: "*"
};
};
}

View File

@@ -24,9 +24,41 @@
"application/json"
],
"paths": {
"/api/v0/settings/bundles": {
"/api/v0/settings/bundle-get": {
"post": {
"operationId": "SaveSettingsBundle",
"operationId": "BundleService_GetSettingsBundle",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoGetSettingsBundleResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/protoGetSettingsBundleRequest"
}
}
],
"tags": [
"BundleService"
]
}
},
"/api/v0/settings/bundle-save": {
"post": {
"operationId": "BundleService_SaveSettingsBundle",
"responses": {
"200": {
"description": "A successful response.",
@@ -56,9 +88,9 @@
]
}
},
"/api/v0/settings/bundles/{identifier.extension}": {
"get": {
"operationId": "ListSettingsBundles",
"/api/v0/settings/bundles-list": {
"post": {
"operationId": "BundleService_ListSettingsBundles",
"responses": {
"200": {
"description": "A successful response.",
@@ -75,28 +107,12 @@
},
"parameters": [
{
"name": "identifier.extension",
"in": "path",
"name": "body",
"in": "body",
"required": true,
"type": "string"
},
{
"name": "identifier.bundle_key",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "identifier.setting_key",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "identifier.account_uuid",
"in": "query",
"required": false,
"type": "string"
"schema": {
"$ref": "#/definitions/protoListSettingsBundlesRequest"
}
}
],
"tags": [
@@ -104,14 +120,14 @@
]
}
},
"/api/v0/settings/bundles/{identifier.extension}/{identifier.bundle_key}": {
"get": {
"operationId": "GetSettingsBundle",
"/api/v0/settings/value-get": {
"post": {
"operationId": "ValueService_GetSettingsValue",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoGetSettingsBundleResponse"
"$ref": "#/definitions/protoGetSettingsValueResponse"
}
},
"default": {
@@ -123,38 +139,22 @@
},
"parameters": [
{
"name": "identifier.extension",
"in": "path",
"name": "body",
"in": "body",
"required": true,
"type": "string"
},
{
"name": "identifier.bundle_key",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "identifier.setting_key",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "identifier.account_uuid",
"in": "query",
"required": false,
"type": "string"
"schema": {
"$ref": "#/definitions/protoGetSettingsValueRequest"
}
}
],
"tags": [
"BundleService"
"ValueService"
]
}
},
"/api/v0/settings/values": {
"/api/v0/settings/value-save": {
"post": {
"operationId": "SaveSettingsValue",
"operationId": "ValueService_SaveSettingsValue",
"responses": {
"200": {
"description": "A successful response.",
@@ -184,9 +184,9 @@
]
}
},
"/api/v0/settings/values/{identifier.account_uuid}/{identifier.extension}/{identifier.bundle_key}": {
"get": {
"operationId": "ListSettingsValues",
"/api/v0/settings/values-list": {
"post": {
"operationId": "ValueService_ListSettingsValues",
"responses": {
"200": {
"description": "A successful response.",
@@ -203,76 +203,12 @@
},
"parameters": [
{
"name": "identifier.account_uuid",
"in": "path",
"name": "body",
"in": "body",
"required": true,
"type": "string"
},
{
"name": "identifier.extension",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "identifier.bundle_key",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "identifier.setting_key",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"ValueService"
]
}
},
"/api/v0/settings/values/{identifier.account_uuid}/{identifier.extension}/{identifier.bundle_key}/{identifier.setting_key}": {
"get": {
"operationId": "GetSettingsValue",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/protoGetSettingsValueResponse"
"$ref": "#/definitions/protoListSettingsValuesRequest"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "identifier.account_uuid",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "identifier.extension",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "identifier.bundle_key",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "identifier.setting_key",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
@@ -294,6 +230,14 @@
}
}
},
"protoGetSettingsBundleRequest": {
"type": "object",
"properties": {
"identifier": {
"$ref": "#/definitions/protoIdentifier"
}
}
},
"protoGetSettingsBundleResponse": {
"type": "object",
"properties": {
@@ -302,6 +246,14 @@
}
}
},
"protoGetSettingsValueRequest": {
"type": "object",
"properties": {
"identifier": {
"$ref": "#/definitions/protoIdentifier"
}
}
},
"protoGetSettingsValueResponse": {
"type": "object",
"properties": {
@@ -383,6 +335,14 @@
}
}
},
"protoListSettingsBundlesRequest": {
"type": "object",
"properties": {
"identifier": {
"$ref": "#/definitions/protoIdentifier"
}
}
},
"protoListSettingsBundlesResponse": {
"type": "object",
"properties": {
@@ -394,6 +354,14 @@
}
}
},
"protoListSettingsValuesRequest": {
"type": "object",
"properties": {
"identifier": {
"$ref": "#/definitions/protoIdentifier"
}
}
},
"protoListSettingsValuesResponse": {
"type": "object",
"properties": {

View File

@@ -79,8 +79,10 @@ func (g Service) ListSettingsValues(c context.Context, req *proto.ListSettingsVa
func getFailsafeIdentifier(identifier *proto.Identifier) *proto.Identifier {
if identifier == nil {
return &proto.Identifier{}
} else {
return identifier
identifier = &proto.Identifier{}
}
if identifier.AccountUuid == "me" {
identifier.AccountUuid = "5681371F-4A6E-43BC-8BB5-9C9237FA9C58"
}
return identifier
}

View File

@@ -30,8 +30,13 @@ func (s Store) ListBundles(identifier *proto.Identifier) ([]*proto.SettingsBundl
if err == nil {
for _, bundleFile := range bundleFiles {
record := proto.SettingsBundle{}
err = s.parseRecordFromFile(&record, path.Join(extensionPath, bundleFile.Name()))
if err == nil && (len(identifier.Extension) == 0 || identifier.Extension == record.Identifier.Extension) {
bundlePath := path.Join(extensionPath, bundleFile.Name())
err = s.parseRecordFromFile(&record, bundlePath)
if err != nil {
s.Logger.Warn().Msgf("error reading %v", bundlePath)
continue
}
if len(identifier.Extension) == 0 || identifier.Extension == record.Identifier.Extension {
records = append(records, &record)
}
}

View File

@@ -29,16 +29,16 @@ export const request = (method, url, body, queryParameters, form, config) => {
==========================================================*/
/**
*
* request: SaveSettingsBundle
* url: SaveSettingsBundleURL
* method: SaveSettingsBundle_TYPE
* raw_url: SaveSettingsBundle_RAW_URL
* request: BundleService_GetSettingsBundle
* url: BundleService_GetSettingsBundleURL
* method: BundleService_GetSettingsBundle_TYPE
* raw_url: BundleService_GetSettingsBundle_RAW_URL
* @param body -
*/
export const SaveSettingsBundle = function(parameters = {}) {
export const BundleService_GetSettingsBundle = function(parameters = {}) {
const domain = parameters.$domain ? parameters.$domain : getDomain()
const config = parameters.$config
let path = '/api/v0/settings/bundles'
let path = '/api/v0/settings/bundle-get'
let body
let queryParameters = {}
let form = {}
@@ -55,16 +55,16 @@ export const SaveSettingsBundle = function(parameters = {}) {
}
return request('post', domain + path, body, queryParameters, form, config)
}
export const SaveSettingsBundle_RAW_URL = function() {
return '/api/v0/settings/bundles'
export const BundleService_GetSettingsBundle_RAW_URL = function() {
return '/api/v0/settings/bundle-get'
}
export const SaveSettingsBundle_TYPE = function() {
export const BundleService_GetSettingsBundle_TYPE = function() {
return 'post'
}
export const SaveSettingsBundleURL = function(parameters = {}) {
export const BundleService_GetSettingsBundleURL = function(parameters = {}) {
let queryParameters = {}
const domain = parameters.$domain ? parameters.$domain : getDomain()
let path = '/api/v0/settings/bundles'
let path = '/api/v0/settings/bundle-get'
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
@@ -75,147 +75,16 @@ export const SaveSettingsBundleURL = function(parameters = {}) {
}
/**
*
* request: ListSettingsBundles
* url: ListSettingsBundlesURL
* method: ListSettingsBundles_TYPE
* raw_url: ListSettingsBundles_RAW_URL
* @param identifierExtension -
* @param identifierBundleKey -
* @param identifierSettingKey -
* @param identifierAccountUuid -
*/
export const ListSettingsBundles = function(parameters = {}) {
const domain = parameters.$domain ? parameters.$domain : getDomain()
const config = parameters.$config
let path = '/api/v0/settings/bundles/{identifier.extension}'
let body
let queryParameters = {}
let form = {}
path = path.replace('{identifier.extension}', `${parameters['identifierExtension']}`)
if (parameters['identifierExtension'] === undefined) {
return Promise.reject(new Error('Missing required parameter: identifierExtension'))
}
if (parameters['identifierBundleKey'] !== undefined) {
queryParameters['identifier.bundle_key'] = parameters['identifierBundleKey']
}
if (parameters['identifierSettingKey'] !== undefined) {
queryParameters['identifier.setting_key'] = parameters['identifierSettingKey']
}
if (parameters['identifierAccountUuid'] !== undefined) {
queryParameters['identifier.account_uuid'] = parameters['identifierAccountUuid']
}
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
});
}
return request('get', domain + path, body, queryParameters, form, config)
}
export const ListSettingsBundles_RAW_URL = function() {
return '/api/v0/settings/bundles/{identifier.extension}'
}
export const ListSettingsBundles_TYPE = function() {
return 'get'
}
export const ListSettingsBundlesURL = function(parameters = {}) {
let queryParameters = {}
const domain = parameters.$domain ? parameters.$domain : getDomain()
let path = '/api/v0/settings/bundles/{identifier.extension}'
path = path.replace('{identifier.extension}', `${parameters['identifierExtension']}`)
if (parameters['identifierBundleKey'] !== undefined) {
queryParameters['identifier.bundle_key'] = parameters['identifierBundleKey']
}
if (parameters['identifierSettingKey'] !== undefined) {
queryParameters['identifier.setting_key'] = parameters['identifierSettingKey']
}
if (parameters['identifierAccountUuid'] !== undefined) {
queryParameters['identifier.account_uuid'] = parameters['identifierAccountUuid']
}
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
})
}
let keys = Object.keys(queryParameters)
return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '')
}
/**
*
* request: GetSettingsBundle
* url: GetSettingsBundleURL
* method: GetSettingsBundle_TYPE
* raw_url: GetSettingsBundle_RAW_URL
* @param identifierExtension -
* @param identifierBundleKey -
* @param identifierSettingKey -
* @param identifierAccountUuid -
*/
export const GetSettingsBundle = function(parameters = {}) {
const domain = parameters.$domain ? parameters.$domain : getDomain()
const config = parameters.$config
let path = '/api/v0/settings/bundles/{identifier.extension}/{identifier.bundle_key}'
let body
let queryParameters = {}
let form = {}
path = path.replace('{identifier.extension}', `${parameters['identifierExtension']}`)
if (parameters['identifierExtension'] === undefined) {
return Promise.reject(new Error('Missing required parameter: identifierExtension'))
}
path = path.replace('{identifier.bundle_key}', `${parameters['identifierBundleKey']}`)
if (parameters['identifierBundleKey'] === undefined) {
return Promise.reject(new Error('Missing required parameter: identifierBundleKey'))
}
if (parameters['identifierSettingKey'] !== undefined) {
queryParameters['identifier.setting_key'] = parameters['identifierSettingKey']
}
if (parameters['identifierAccountUuid'] !== undefined) {
queryParameters['identifier.account_uuid'] = parameters['identifierAccountUuid']
}
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
});
}
return request('get', domain + path, body, queryParameters, form, config)
}
export const GetSettingsBundle_RAW_URL = function() {
return '/api/v0/settings/bundles/{identifier.extension}/{identifier.bundle_key}'
}
export const GetSettingsBundle_TYPE = function() {
return 'get'
}
export const GetSettingsBundleURL = function(parameters = {}) {
let queryParameters = {}
const domain = parameters.$domain ? parameters.$domain : getDomain()
let path = '/api/v0/settings/bundles/{identifier.extension}/{identifier.bundle_key}'
path = path.replace('{identifier.extension}', `${parameters['identifierExtension']}`)
path = path.replace('{identifier.bundle_key}', `${parameters['identifierBundleKey']}`)
if (parameters['identifierSettingKey'] !== undefined) {
queryParameters['identifier.setting_key'] = parameters['identifierSettingKey']
}
if (parameters['identifierAccountUuid'] !== undefined) {
queryParameters['identifier.account_uuid'] = parameters['identifierAccountUuid']
}
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
})
}
let keys = Object.keys(queryParameters)
return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '')
}
/**
*
* request: SaveSettingsValue
* url: SaveSettingsValueURL
* method: SaveSettingsValue_TYPE
* raw_url: SaveSettingsValue_RAW_URL
* request: BundleService_SaveSettingsBundle
* url: BundleService_SaveSettingsBundleURL
* method: BundleService_SaveSettingsBundle_TYPE
* raw_url: BundleService_SaveSettingsBundle_RAW_URL
* @param body -
*/
export const SaveSettingsValue = function(parameters = {}) {
export const BundleService_SaveSettingsBundle = function(parameters = {}) {
const domain = parameters.$domain ? parameters.$domain : getDomain()
const config = parameters.$config
let path = '/api/v0/settings/values'
let path = '/api/v0/settings/bundle-save'
let body
let queryParameters = {}
let form = {}
@@ -232,16 +101,16 @@ export const SaveSettingsValue = function(parameters = {}) {
}
return request('post', domain + path, body, queryParameters, form, config)
}
export const SaveSettingsValue_RAW_URL = function() {
return '/api/v0/settings/values'
export const BundleService_SaveSettingsBundle_RAW_URL = function() {
return '/api/v0/settings/bundle-save'
}
export const SaveSettingsValue_TYPE = function() {
export const BundleService_SaveSettingsBundle_TYPE = function() {
return 'post'
}
export const SaveSettingsValueURL = function(parameters = {}) {
export const BundleService_SaveSettingsBundleURL = function(parameters = {}) {
let queryParameters = {}
const domain = parameters.$domain ? parameters.$domain : getDomain()
let path = '/api/v0/settings/values'
let path = '/api/v0/settings/bundle-save'
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
@@ -252,60 +121,42 @@ export const SaveSettingsValueURL = function(parameters = {}) {
}
/**
*
* request: ListSettingsValues
* url: ListSettingsValuesURL
* method: ListSettingsValues_TYPE
* raw_url: ListSettingsValues_RAW_URL
* @param identifierAccountUuid -
* @param identifierExtension -
* @param identifierBundleKey -
* @param identifierSettingKey -
* request: BundleService_ListSettingsBundles
* url: BundleService_ListSettingsBundlesURL
* method: BundleService_ListSettingsBundles_TYPE
* raw_url: BundleService_ListSettingsBundles_RAW_URL
* @param body -
*/
export const ListSettingsValues = function(parameters = {}) {
export const BundleService_ListSettingsBundles = function(parameters = {}) {
const domain = parameters.$domain ? parameters.$domain : getDomain()
const config = parameters.$config
let path = '/api/v0/settings/values/{identifier.account_uuid}/{identifier.extension}/{identifier.bundle_key}'
let path = '/api/v0/settings/bundles-list'
let body
let queryParameters = {}
let form = {}
path = path.replace('{identifier.account_uuid}', `${parameters['identifierAccountUuid']}`)
if (parameters['identifierAccountUuid'] === undefined) {
return Promise.reject(new Error('Missing required parameter: identifierAccountUuid'))
if (parameters['body'] !== undefined) {
body = parameters['body']
}
path = path.replace('{identifier.extension}', `${parameters['identifierExtension']}`)
if (parameters['identifierExtension'] === undefined) {
return Promise.reject(new Error('Missing required parameter: identifierExtension'))
}
path = path.replace('{identifier.bundle_key}', `${parameters['identifierBundleKey']}`)
if (parameters['identifierBundleKey'] === undefined) {
return Promise.reject(new Error('Missing required parameter: identifierBundleKey'))
}
if (parameters['identifierSettingKey'] !== undefined) {
queryParameters['identifier.setting_key'] = parameters['identifierSettingKey']
if (parameters['body'] === undefined) {
return Promise.reject(new Error('Missing required parameter: body'))
}
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
});
}
return request('get', domain + path, body, queryParameters, form, config)
return request('post', domain + path, body, queryParameters, form, config)
}
export const ListSettingsValues_RAW_URL = function() {
return '/api/v0/settings/values/{identifier.account_uuid}/{identifier.extension}/{identifier.bundle_key}'
export const BundleService_ListSettingsBundles_RAW_URL = function() {
return '/api/v0/settings/bundles-list'
}
export const ListSettingsValues_TYPE = function() {
return 'get'
export const BundleService_ListSettingsBundles_TYPE = function() {
return 'post'
}
export const ListSettingsValuesURL = function(parameters = {}) {
export const BundleService_ListSettingsBundlesURL = function(parameters = {}) {
let queryParameters = {}
const domain = parameters.$domain ? parameters.$domain : getDomain()
let path = '/api/v0/settings/values/{identifier.account_uuid}/{identifier.extension}/{identifier.bundle_key}'
path = path.replace('{identifier.account_uuid}', `${parameters['identifierAccountUuid']}`)
path = path.replace('{identifier.extension}', `${parameters['identifierExtension']}`)
path = path.replace('{identifier.bundle_key}', `${parameters['identifierBundleKey']}`)
if (parameters['identifierSettingKey'] !== undefined) {
queryParameters['identifier.setting_key'] = parameters['identifierSettingKey']
}
let path = '/api/v0/settings/bundles-list'
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
@@ -316,59 +167,134 @@ export const ListSettingsValuesURL = function(parameters = {}) {
}
/**
*
* request: GetSettingsValue
* url: GetSettingsValueURL
* method: GetSettingsValue_TYPE
* raw_url: GetSettingsValue_RAW_URL
* @param identifierAccountUuid -
* @param identifierExtension -
* @param identifierBundleKey -
* @param identifierSettingKey -
* request: ValueService_GetSettingsValue
* url: ValueService_GetSettingsValueURL
* method: ValueService_GetSettingsValue_TYPE
* raw_url: ValueService_GetSettingsValue_RAW_URL
* @param body -
*/
export const GetSettingsValue = function(parameters = {}) {
export const ValueService_GetSettingsValue = function(parameters = {}) {
const domain = parameters.$domain ? parameters.$domain : getDomain()
const config = parameters.$config
let path = '/api/v0/settings/values/{identifier.account_uuid}/{identifier.extension}/{identifier.bundle_key}/{identifier.setting_key}'
let path = '/api/v0/settings/value-get'
let body
let queryParameters = {}
let form = {}
path = path.replace('{identifier.account_uuid}', `${parameters['identifierAccountUuid']}`)
if (parameters['identifierAccountUuid'] === undefined) {
return Promise.reject(new Error('Missing required parameter: identifierAccountUuid'))
if (parameters['body'] !== undefined) {
body = parameters['body']
}
path = path.replace('{identifier.extension}', `${parameters['identifierExtension']}`)
if (parameters['identifierExtension'] === undefined) {
return Promise.reject(new Error('Missing required parameter: identifierExtension'))
}
path = path.replace('{identifier.bundle_key}', `${parameters['identifierBundleKey']}`)
if (parameters['identifierBundleKey'] === undefined) {
return Promise.reject(new Error('Missing required parameter: identifierBundleKey'))
}
path = path.replace('{identifier.setting_key}', `${parameters['identifierSettingKey']}`)
if (parameters['identifierSettingKey'] === undefined) {
return Promise.reject(new Error('Missing required parameter: identifierSettingKey'))
if (parameters['body'] === undefined) {
return Promise.reject(new Error('Missing required parameter: body'))
}
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
});
}
return request('get', domain + path, body, queryParameters, form, config)
return request('post', domain + path, body, queryParameters, form, config)
}
export const GetSettingsValue_RAW_URL = function() {
return '/api/v0/settings/values/{identifier.account_uuid}/{identifier.extension}/{identifier.bundle_key}/{identifier.setting_key}'
export const ValueService_GetSettingsValue_RAW_URL = function() {
return '/api/v0/settings/value-get'
}
export const GetSettingsValue_TYPE = function() {
return 'get'
export const ValueService_GetSettingsValue_TYPE = function() {
return 'post'
}
export const GetSettingsValueURL = function(parameters = {}) {
export const ValueService_GetSettingsValueURL = function(parameters = {}) {
let queryParameters = {}
const domain = parameters.$domain ? parameters.$domain : getDomain()
let path = '/api/v0/settings/values/{identifier.account_uuid}/{identifier.extension}/{identifier.bundle_key}/{identifier.setting_key}'
path = path.replace('{identifier.account_uuid}', `${parameters['identifierAccountUuid']}`)
path = path.replace('{identifier.extension}', `${parameters['identifierExtension']}`)
path = path.replace('{identifier.bundle_key}', `${parameters['identifierBundleKey']}`)
path = path.replace('{identifier.setting_key}', `${parameters['identifierSettingKey']}`)
let path = '/api/v0/settings/value-get'
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
})
}
let keys = Object.keys(queryParameters)
return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '')
}
/**
*
* request: ValueService_SaveSettingsValue
* url: ValueService_SaveSettingsValueURL
* method: ValueService_SaveSettingsValue_TYPE
* raw_url: ValueService_SaveSettingsValue_RAW_URL
* @param body -
*/
export const ValueService_SaveSettingsValue = function(parameters = {}) {
const domain = parameters.$domain ? parameters.$domain : getDomain()
const config = parameters.$config
let path = '/api/v0/settings/value-save'
let body
let queryParameters = {}
let form = {}
if (parameters['body'] !== undefined) {
body = parameters['body']
}
if (parameters['body'] === undefined) {
return Promise.reject(new Error('Missing required parameter: body'))
}
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
});
}
return request('post', domain + path, body, queryParameters, form, config)
}
export const ValueService_SaveSettingsValue_RAW_URL = function() {
return '/api/v0/settings/value-save'
}
export const ValueService_SaveSettingsValue_TYPE = function() {
return 'post'
}
export const ValueService_SaveSettingsValueURL = function(parameters = {}) {
let queryParameters = {}
const domain = parameters.$domain ? parameters.$domain : getDomain()
let path = '/api/v0/settings/value-save'
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
})
}
let keys = Object.keys(queryParameters)
return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '')
}
/**
*
* request: ValueService_ListSettingsValues
* url: ValueService_ListSettingsValuesURL
* method: ValueService_ListSettingsValues_TYPE
* raw_url: ValueService_ListSettingsValues_RAW_URL
* @param body -
*/
export const ValueService_ListSettingsValues = function(parameters = {}) {
const domain = parameters.$domain ? parameters.$domain : getDomain()
const config = parameters.$config
let path = '/api/v0/settings/values-list'
let body
let queryParameters = {}
let form = {}
if (parameters['body'] !== undefined) {
body = parameters['body']
}
if (parameters['body'] === undefined) {
return Promise.reject(new Error('Missing required parameter: body'))
}
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]
});
}
return request('post', domain + path, body, queryParameters, form, config)
}
export const ValueService_ListSettingsValues_RAW_URL = function() {
return '/api/v0/settings/values-list'
}
export const ValueService_ListSettingsValues_TYPE = function() {
return 'post'
}
export const ValueService_ListSettingsValuesURL = function(parameters = {}) {
let queryParameters = {}
const domain = parameters.$domain ? parameters.$domain : getDomain()
let path = '/api/v0/settings/values-list'
if (parameters.$queryParameters) {
Object.keys(parameters.$queryParameters).forEach(function(parameterName) {
queryParameters[parameterName] = parameters.$queryParameters[parameterName]

View File

@@ -11,6 +11,7 @@
:id="getElementId(bundle, setting)"
:bundle="bundle"
:setting="setting"
:persisted-value="getSettingsValue(bundle, setting)"
/>
</div>
</oc-grid>
@@ -18,6 +19,7 @@
</template>
<script>
import { mapGetters } from 'vuex'
import SettingBoolean from "./settings/SettingBoolean.vue";
import SettingMultiChoice from "./settings/SettingMultiChoice.vue";
import SettingNumber from "./settings/SettingNumber.vue";
@@ -33,12 +35,21 @@ export default {
required: true
}
},
computed: mapGetters('Settings', ['getSettingsValueByIdentifier']),
methods: {
getElementId(bundle, setting) {
return `setting-${bundle.identifier.bundleKey}-${setting.settingKey}`
},
getSettingComponent(setting) {
return 'Setting' + setting.type[0].toUpperCase() + setting.type.substr(1)
},
getSettingsValue(bundle, setting) {
const identifier = {
extension: bundle.identifier.extension,
bundleKey: bundle.identifier.bundleKey,
settingKey: setting.settingKey,
}
return this.getSettingsValueByIdentifier(identifier)
}
},
components: {

View File

@@ -5,6 +5,7 @@
</template>
<script>
import isNil from "lodash/isNil"
export default {
name: 'SettingBoolean',
props: {
@@ -15,6 +16,10 @@ export default {
setting: {
type: Object,
required: true
},
persistedValue: {
type: Object,
required: false
}
},
data() {
@@ -35,10 +40,13 @@ export default {
}
},
mounted() {
// TODO: load the settings value of the authenticated user and apply it to the value
if (this.value === null) {
if (!isNil(this.persistedValue)) {
this.value = this.persistedValue.boolValue
}
if (isNil(this.value) && !isNil(this.setting.boolValue.default)) {
this.value = this.setting.boolValue.default
}
this.initialValue = this.value
}
}
</script>

View File

@@ -48,6 +48,10 @@ export default {
setting: {
type: Object,
required: true
},
persistedValue: {
type: Object,
required: false
}
},
data() {

View File

@@ -22,6 +22,7 @@
</template>
<script>
import isNil from "lodash/isNil"
export default {
name: 'SettingNumber',
props: {
@@ -32,6 +33,10 @@ export default {
setting: {
type: Object,
required: true
},
persistedValue: {
type: Object,
required: false
}
},
data() {
@@ -46,13 +51,13 @@ export default {
},
inputAttributes() {
const attributes = {}
if (this.setting.intValue.min !== null && this.setting.intValue.min !== undefined) {
if (!isNil(this.setting.intValue.min)) {
attributes.min = this.setting.intValue.min
}
if (this.setting.intValue.max !== null && this.setting.intValue.max !== undefined) {
if (!isNil(this.setting.intValue.max)) {
attributes.max = this.setting.intValue.max
}
if (this.setting.intValue.step !== null && this.setting.intValue.step !== undefined) {
if (!isNil(this.setting.intValue.step)) {
attributes.step = this.setting.intValue.step
}
return attributes
@@ -69,7 +74,13 @@ export default {
}
},
mounted() {
// TODO: load the settings value of the authenticated user and apply it to the value
if (!isNil(this.persistedValue)) {
this.value = this.persistedValue.intValue
}
if (isNil(this.value) && !isNil(this.setting.intValue.default)) {
this.value = this.setting.intValue.default
}
this.initialValue = this.value
}
}
</script>

View File

@@ -49,6 +49,10 @@ export default {
setting: {
type: Object,
required: true
},
persistedValue: {
type: Object,
required: false
}
},
data() {

View File

@@ -20,6 +20,7 @@
</template>
<script>
import isNil from "lodash/isNil"
export default {
name: 'SettingString',
props: {
@@ -30,6 +31,10 @@ export default {
setting: {
type: Object,
required: true
},
persistedValue: {
type: Object,
required: false
}
},
data() {
@@ -54,7 +59,13 @@ export default {
}
},
mounted() {
// TODO: load the settings value of the authenticated user and apply it to the value
if (!isNil(this.persistedValue)) {
this.value = this.persistedValue.stringValue
}
if (isNil(this.value) && !isNil(this.setting.stringValue.default)) {
this.value = this.setting.stringValue.default
}
this.initialValue = this.value
}
}
</script>

View File

@@ -15,6 +15,10 @@ export default {
setting: {
type: Object,
required: true
},
persistedValue: {
type: Object,
required: false
}
}
}

View File

@@ -1,57 +1,87 @@
import { ListSettingsBundles, ListSettingsValues } from '../client/settings'
import {BundleService_ListSettingsBundles, ValueService_ListSettingsValues} from '../client/settings'
const state = {
config: null,
initialized: false,
settingsBundles: []
settingsBundles: {},
settingsValues: {}
}
const getters = {
config: state => state.config,
initialized: state => state.initialized,
settingsBundles: state => state.settingsBundles,
extensions: state => {
return [...new Set(Array.from(state.settingsBundles).map(bundle => bundle.identifier.extension))].sort()
return Array.from(state.settingsBundles.keys()).sort()
},
getSettingsBundlesByExtension: state => extension => {
return state.settingsBundles.filter(bundle => bundle.identifier.extension === extension).sort((b1,b2) => {
return b1.identifier.bundleKey.localeCompare(b2.identifier.bundleKey)
})
if (state.settingsBundles.has(extension)) {
return Array.from(state.settingsBundles.get(extension).values()).sort((b1, b2) => {
return b1.identifier.bundleKey.localeCompare(b2.identifier.bundleKey)
})
}
return []
},
getSettingsValueByIdentifier: state => ({extension, bundleKey, settingKey}) => {
if (state.settingsValues.has(extension)
&& state.settingsValues.get(extension).has(bundleKey)
&& state.settingsValues.get(extension).get(bundleKey).has(settingKey)) {
return state.settingsValues.get(extension).get(bundleKey).get(settingKey)
}
return null
}
}
const mutations = {
SET_INITIALIZED (state, value) {
SET_INITIALIZED(state, value) {
state.initialized = value
},
SET_SETTINGS_BUNDLES (state, payload) {
state.settingsBundles = payload
SET_SETTINGS_BUNDLES(state, payload) {
const map = new Map()
Array.from(payload).forEach(bundle => {
if (!map.has(bundle.identifier.extension)) {
map.set(bundle.identifier.extension, new Map())
}
map.get(bundle.identifier.extension).set(bundle.identifier.bundleKey, bundle)
})
state.settingsBundles = map
},
LOAD_CONFIG (state, config) {
SET_SETTINGS_VALUES(state, payload) {
const map = new Map()
Array.from(payload).forEach(value => {
if (!map.has(value.identifier.extension)) {
map.set(value.identifier.extension, new Map())
}
if (!map.get(value.identifier.extension).has(value.identifier.bundleKey)) {
map.get(value.identifier.extension).set(value.identifier.bundleKey, new Map())
}
map.get(value.identifier.extension).get(value.identifier.bundleKey).set(value.identifier.settingKey, value)
})
state.settingsValues = map
},
LOAD_CONFIG(state, config) {
state.config = config
}
}
const actions = {
loadConfig ({ commit }, config) {
loadConfig({commit}, config) {
commit('LOAD_CONFIG', config)
},
async initialize({ commit, dispatch }) {
async initialize({commit, dispatch}) {
await Promise.all([
dispatch('fetchSettingsBundles'),
// dispatch('fetchSettingsValues')
dispatch('fetchSettingsValues')
])
commit('SET_INITIALIZED', true)
},
async fetchSettingsBundles ({ commit, dispatch, getters }) {
const response = await ListSettingsBundles({
async fetchSettingsBundles({commit, dispatch, getters}) {
const response = await BundleService_ListSettingsBundles({
$domain: getters.config.url,
identifierExtension: "ocis-accounts"
body: {}
})
console.log(response)
if (response.status === 200) {
if (response.status === 201) {
// the settings markup has implicit typing. inject an explicit type variable here
const settingsBundles = response.data.settingsBundles
if (settingsBundles) {
@@ -81,19 +111,32 @@ const actions = {
title: 'Failed to fetch settings bundles.',
desc: response.statusText,
status: 'danger'
}, { root: true })
}, {root: true})
}
},
async fetchSettingsValues ({ commit, dispatch, getters }) {
const response = await ListSettingsValues({
async fetchSettingsValues({commit, dispatch, getters}) {
const response = await ValueService_ListSettingsValues({
$domain: getters.config.url,
identifierAccountUuid: "5681371F-4A6E-43BC-8BB5-9C9237FA9C58",
identifierExtension: "ocis-accounts",
identifierBundleKey: "notifications"
body: {
identifier: {
account_uuid: "me"
}
}
})
console.log(response)
if (response.status === 200) {
if (response.status === 201) {
const settingsValues = response.data.settingsValues
if (settingsValues) {
commit('SET_SETTINGS_VALUES', settingsValues)
} else {
commit('SET_SETTINGS_VALUES', [])
}
} else {
dispatch('showMessage', {
title: 'Failed to fetch settings values.',
desc: response.statusText,
status: 'danger'
}, {root: true})
}
}
}