Generate http endpoints and add empty vue app entry point.
This commit is contained in:
+80
-62
@@ -1,11 +1,13 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: pkg/proto/v0/settings.proto
|
||||
// source: settings.proto
|
||||
|
||||
package proto
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
math "math"
|
||||
)
|
||||
|
||||
@@ -32,7 +34,7 @@ func (m *CreateSettingsBundleRequest) Reset() { *m = CreateSettingsBundl
|
||||
func (m *CreateSettingsBundleRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateSettingsBundleRequest) ProtoMessage() {}
|
||||
func (*CreateSettingsBundleRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{0}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{0}
|
||||
}
|
||||
|
||||
func (m *CreateSettingsBundleRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -71,7 +73,7 @@ func (m *CreateSettingsBundleResponse) Reset() { *m = CreateSettingsBund
|
||||
func (m *CreateSettingsBundleResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateSettingsBundleResponse) ProtoMessage() {}
|
||||
func (*CreateSettingsBundleResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{1}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{1}
|
||||
}
|
||||
|
||||
func (m *CreateSettingsBundleResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -111,7 +113,7 @@ func (m *GetSettingsBundleRequest) Reset() { *m = GetSettingsBundleReque
|
||||
func (m *GetSettingsBundleRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetSettingsBundleRequest) ProtoMessage() {}
|
||||
func (*GetSettingsBundleRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{2}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{2}
|
||||
}
|
||||
|
||||
func (m *GetSettingsBundleRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -157,7 +159,7 @@ func (m *GetSettingsBundleResponse) Reset() { *m = GetSettingsBundleResp
|
||||
func (m *GetSettingsBundleResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetSettingsBundleResponse) ProtoMessage() {}
|
||||
func (*GetSettingsBundleResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{3}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{3}
|
||||
}
|
||||
|
||||
func (m *GetSettingsBundleResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -196,7 +198,7 @@ func (m *ListSettingsBundlesRequest) Reset() { *m = ListSettingsBundlesR
|
||||
func (m *ListSettingsBundlesRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListSettingsBundlesRequest) ProtoMessage() {}
|
||||
func (*ListSettingsBundlesRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{4}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{4}
|
||||
}
|
||||
|
||||
func (m *ListSettingsBundlesRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -235,7 +237,7 @@ func (m *ListSettingsBundlesResponse) Reset() { *m = ListSettingsBundles
|
||||
func (m *ListSettingsBundlesResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListSettingsBundlesResponse) ProtoMessage() {}
|
||||
func (*ListSettingsBundlesResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{5}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{5}
|
||||
}
|
||||
|
||||
func (m *ListSettingsBundlesResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -278,7 +280,7 @@ func (m *SettingsBundle) Reset() { *m = SettingsBundle{} }
|
||||
func (m *SettingsBundle) String() string { return proto.CompactTextString(m) }
|
||||
func (*SettingsBundle) ProtoMessage() {}
|
||||
func (*SettingsBundle) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{6}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{6}
|
||||
}
|
||||
|
||||
func (m *SettingsBundle) XXX_Unmarshal(b []byte) error {
|
||||
@@ -347,7 +349,7 @@ func (m *Setting) Reset() { *m = Setting{} }
|
||||
func (m *Setting) String() string { return proto.CompactTextString(m) }
|
||||
func (*Setting) ProtoMessage() {}
|
||||
func (*Setting) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{7}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{7}
|
||||
}
|
||||
|
||||
func (m *Setting) XXX_Unmarshal(b []byte) error {
|
||||
@@ -491,7 +493,7 @@ func (m *IntSetting) Reset() { *m = IntSetting{} }
|
||||
func (m *IntSetting) String() string { return proto.CompactTextString(m) }
|
||||
func (*IntSetting) ProtoMessage() {}
|
||||
func (*IntSetting) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{8}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{8}
|
||||
}
|
||||
|
||||
func (m *IntSetting) XXX_Unmarshal(b []byte) error {
|
||||
@@ -562,7 +564,7 @@ func (m *StringSetting) Reset() { *m = StringSetting{} }
|
||||
func (m *StringSetting) String() string { return proto.CompactTextString(m) }
|
||||
func (*StringSetting) ProtoMessage() {}
|
||||
func (*StringSetting) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{9}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{9}
|
||||
}
|
||||
|
||||
func (m *StringSetting) XXX_Unmarshal(b []byte) error {
|
||||
@@ -629,7 +631,7 @@ func (m *BoolSetting) Reset() { *m = BoolSetting{} }
|
||||
func (m *BoolSetting) String() string { return proto.CompactTextString(m) }
|
||||
func (*BoolSetting) ProtoMessage() {}
|
||||
func (*BoolSetting) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{10}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{10}
|
||||
}
|
||||
|
||||
func (m *BoolSetting) XXX_Unmarshal(b []byte) error {
|
||||
@@ -668,7 +670,7 @@ func (m *SingleChoiceListSetting) Reset() { *m = SingleChoiceListSetting
|
||||
func (m *SingleChoiceListSetting) String() string { return proto.CompactTextString(m) }
|
||||
func (*SingleChoiceListSetting) ProtoMessage() {}
|
||||
func (*SingleChoiceListSetting) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{11}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{11}
|
||||
}
|
||||
|
||||
func (m *SingleChoiceListSetting) XXX_Unmarshal(b []byte) error {
|
||||
@@ -707,7 +709,7 @@ func (m *MultiChoiceListSetting) Reset() { *m = MultiChoiceListSetting{}
|
||||
func (m *MultiChoiceListSetting) String() string { return proto.CompactTextString(m) }
|
||||
func (*MultiChoiceListSetting) ProtoMessage() {}
|
||||
func (*MultiChoiceListSetting) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{12}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{12}
|
||||
}
|
||||
|
||||
func (m *MultiChoiceListSetting) XXX_Unmarshal(b []byte) error {
|
||||
@@ -751,7 +753,7 @@ func (m *ListOption) Reset() { *m = ListOption{} }
|
||||
func (m *ListOption) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListOption) ProtoMessage() {}
|
||||
func (*ListOption) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_199e73d7d5fd837b, []int{13}
|
||||
return fileDescriptor_6c7cab62fa432213, []int{13}
|
||||
}
|
||||
|
||||
func (m *ListOption) XXX_Unmarshal(b []byte) error {
|
||||
@@ -849,53 +851,69 @@ func init() {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("pkg/proto/v0/settings.proto", fileDescriptor_199e73d7d5fd837b)
|
||||
proto.RegisterFile("settings.proto", fileDescriptor_6c7cab62fa432213)
|
||||
}
|
||||
|
||||
var fileDescriptor_199e73d7d5fd837b = []byte{
|
||||
// 695 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6f, 0xd3, 0x4e,
|
||||
0x10, 0xad, 0x9b, 0xa4, 0x71, 0x26, 0xbf, 0xf6, 0xd7, 0x2e, 0x05, 0x4c, 0x5a, 0x20, 0x2c, 0x07,
|
||||
0x10, 0x48, 0x0d, 0x2a, 0x17, 0x84, 0x84, 0x90, 0x52, 0x01, 0x05, 0x4a, 0x91, 0xb6, 0x52, 0x0f,
|
||||
0x55, 0x01, 0xb9, 0xc9, 0x90, 0xae, 0xea, 0xd8, 0xae, 0x77, 0x53, 0xa5, 0x37, 0x3e, 0x01, 0x67,
|
||||
0xee, 0x20, 0x3e, 0x27, 0xf2, 0xd8, 0x8e, 0xff, 0xc4, 0xa9, 0x5a, 0xc1, 0xc9, 0xbb, 0x6f, 0xe6,
|
||||
0xbd, 0x7d, 0x9e, 0xd9, 0x3f, 0xb0, 0xe6, 0x9f, 0x0c, 0x3a, 0x7e, 0xe0, 0x69, 0xaf, 0x73, 0xf6,
|
||||
0xa4, 0xa3, 0x50, 0x6b, 0xe9, 0x0e, 0xd4, 0x06, 0x21, 0xac, 0x46, 0x1f, 0x7e, 0x08, 0x6b, 0x5b,
|
||||
0x01, 0xda, 0x1a, 0xf7, 0xe2, 0x70, 0x77, 0xe4, 0xf6, 0x1d, 0x14, 0x78, 0x3a, 0x42, 0xa5, 0xd9,
|
||||
0x0b, 0x58, 0x52, 0xb9, 0x80, 0x65, 0xb4, 0x8d, 0x87, 0xcd, 0xcd, 0xeb, 0x91, 0xca, 0x46, 0x81,
|
||||
0x55, 0x48, 0xe6, 0x9f, 0x60, 0xbd, 0x5c, 0x5d, 0xf9, 0x9e, 0xab, 0xf0, 0x6f, 0xe5, 0xdf, 0x81,
|
||||
0xf5, 0x06, 0x75, 0xb9, 0xf3, 0x75, 0x68, 0xe0, 0x58, 0xa3, 0xab, 0xa4, 0xe7, 0x92, 0x6a, 0x43,
|
||||
0xa4, 0x00, 0x5b, 0x86, 0xca, 0x09, 0x9e, 0x5b, 0xf3, 0x84, 0x87, 0x43, 0x7e, 0x00, 0xb7, 0x4a,
|
||||
0xb4, 0xfe, 0x8d, 0xcf, 0xe7, 0xd0, 0xda, 0x91, 0xaa, 0x20, 0xae, 0x2e, 0xe5, 0x94, 0x7f, 0x86,
|
||||
0xb5, 0x52, 0x6e, 0xec, 0xec, 0x25, 0xfc, 0x9f, 0x5f, 0x4c, 0x59, 0x46, 0xbb, 0x32, 0xdb, 0x5a,
|
||||
0x31, 0x9b, 0x7f, 0x37, 0x60, 0x29, 0x9f, 0x73, 0xd5, 0xd2, 0xb1, 0x36, 0x34, 0xfb, 0x52, 0xf9,
|
||||
0x8e, 0x7d, 0xbe, 0x6b, 0x0f, 0xd1, 0xaa, 0x50, 0x24, 0x0b, 0xb1, 0x47, 0x60, 0x26, 0xeb, 0x5a,
|
||||
0x55, 0xb2, 0xb7, 0x94, 0xb7, 0x27, 0x26, 0x71, 0xfe, 0xab, 0x02, 0xf5, 0x18, 0x4d, 0xd6, 0x32,
|
||||
0x66, 0xae, 0x35, 0x3f, 0xbd, 0x56, 0x98, 0x81, 0xaa, 0x17, 0x48, 0x5f, 0x87, 0xfe, 0x13, 0x37,
|
||||
0x29, 0xc4, 0x3a, 0x60, 0x4a, 0x57, 0xef, 0xdb, 0xce, 0x08, 0xad, 0x2a, 0xf5, 0x71, 0x25, 0x76,
|
||||
0xf3, 0xd6, 0x4d, 0x0a, 0xbd, 0x3d, 0x27, 0x26, 0x49, 0xec, 0x19, 0x34, 0x95, 0x0e, 0xa4, 0x3b,
|
||||
0x88, 0x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0xd0, 0x1d, 0xe8, 0x63, 0x72, 0x55, 0x13, 0x29, 0x40, 0x51, 0x7b, 0x1c, 0x47, 0xab, 0x71, 0x34,
|
||||
0x01, 0x2e, 0xe1, 0xf2, 0x01, 0x34, 0x33, 0xad, 0x2e, 0x5a, 0x34, 0x27, 0x16, 0xf9, 0x6b, 0xb8,
|
||||
0x39, 0xa3, 0xaf, 0xec, 0x31, 0xd4, 0x3d, 0xda, 0xbb, 0xc9, 0xe9, 0x4e, 0x36, 0x6c, 0x98, 0xf4,
|
||||
0x91, 0x22, 0x22, 0xc9, 0xe0, 0xaf, 0xe0, 0x46, 0x79, 0x43, 0xaf, 0x26, 0xf3, 0xc3, 0x00, 0x48,
|
||||
0x71, 0xc6, 0xf3, 0x67, 0x80, 0xca, 0x5b, 0xdc, 0xed, 0xeb, 0x99, 0x83, 0x45, 0xfd, 0xce, 0x9d,
|
||||
0xa2, 0x56, 0x78, 0x09, 0x38, 0xd8, 0xd3, 0xd8, 0xa7, 0x2a, 0x9b, 0x62, 0x32, 0x67, 0x1c, 0xfe,
|
||||
0x8b, 0xcf, 0x70, 0x7a, 0x2c, 0x1b, 0x22, 0x87, 0x75, 0x4d, 0x58, 0x88, 0xbc, 0x6d, 0xfe, 0x9e,
|
||||
0x87, 0xc5, 0xe8, 0xae, 0xda, 0xc3, 0xe0, 0x4c, 0xf6, 0x90, 0x7d, 0x81, 0xd5, 0xb2, 0x87, 0x86,
|
||||
0xf1, 0xf8, 0x07, 0x2f, 0x78, 0xe3, 0x5a, 0xf7, 0x2f, 0xcc, 0x89, 0xef, 0xd9, 0x7d, 0x58, 0x99,
|
||||
0x7a, 0x1e, 0xd8, 0xdd, 0x98, 0x39, 0xeb, 0x11, 0x6a, 0xb5, 0x67, 0x27, 0xc4, 0xba, 0x87, 0x70,
|
||||
0xad, 0xe4, 0x7a, 0x67, 0xf7, 0x32, 0x8d, 0x29, 0x7f, 0x36, 0x5a, 0xfc, 0xa2, 0x94, 0x48, 0xbd,
|
||||
0x5b, 0x3f, 0x88, 0x9e, 0xf9, 0xa3, 0x05, 0xfa, 0x3c, 0xfd, 0x13, 0x00, 0x00, 0xff, 0xff, 0xf0,
|
||||
0xf2, 0x38, 0x59, 0x13, 0x08, 0x00, 0x00,
|
||||
var fileDescriptor_6c7cab62fa432213 = []byte{
|
||||
// 947 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x72, 0xe3, 0x44,
|
||||
0x10, 0x5e, 0xd9, 0x49, 0x6c, 0x77, 0x48, 0x36, 0x19, 0x02, 0x6b, 0xb4, 0x01, 0xbc, 0xda, 0x03,
|
||||
0x6c, 0x20, 0x56, 0xf0, 0x5e, 0x28, 0x57, 0x6d, 0xc1, 0x3a, 0x84, 0x64, 0xd9, 0x6c, 0xa0, 0x94,
|
||||
0x2a, 0x0e, 0x5b, 0xfc, 0xd4, 0x58, 0x6e, 0xe4, 0x61, 0xe5, 0x19, 0xad, 0x66, 0x94, 0x9f, 0x4a,
|
||||
0x6d, 0x15, 0x70, 0xe1, 0xc6, 0x01, 0x2e, 0x9c, 0x81, 0x2b, 0xbc, 0x0c, 0xaf, 0xc0, 0x83, 0x50,
|
||||
0x1a, 0xfd, 0xd9, 0xb2, 0x9d, 0x4a, 0x0a, 0x4e, 0x1a, 0x75, 0x7f, 0x5f, 0xf7, 0xa7, 0xe9, 0x99,
|
||||
0x6e, 0xc1, 0xaa, 0x44, 0xa5, 0x18, 0xf7, 0x64, 0x3b, 0x08, 0x85, 0x12, 0x64, 0x51, 0x3f, 0xcc,
|
||||
0x4d, 0x4f, 0x08, 0xcf, 0x47, 0x9b, 0x06, 0xcc, 0xa6, 0x9c, 0x0b, 0x45, 0x15, 0x13, 0x3c, 0x05,
|
||||
0x99, 0xef, 0xea, 0x87, 0xbb, 0xed, 0x21, 0xdf, 0x96, 0xa7, 0xd4, 0xf3, 0x30, 0xb4, 0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0x73, 0x55, 0xa6, 0x73,
|
||||
0xc5, 0x08, 0x94, 0x6e, 0xc8, 0xf4, 0x99, 0xcf, 0xd5, 0x14, 0x26, 0x62, 0x43, 0x9d, 0x71, 0xf5,
|
||||
0x39, 0xf5, 0x23, 0x6c, 0x2e, 0xe8, 0x3a, 0xae, 0xa7, 0x6a, 0x1e, 0xf1, 0x6c, 0xa3, 0x0f, 0x6e,
|
||||
0x38, 0x39, 0x88, 0xbc, 0x0f, 0xcb, 0x52, 0x85, 0x8c, 0x7b, 0x09, 0x67, 0x51, 0x73, 0x36, 0xb2,
|
||||
0x2f, 0xd0, 0x9e, 0x82, 0x36, 0x0e, 0x25, 0x1d, 0x68, 0xf4, 0x85, 0xf0, 0x13, 0xde, 0x92, 0xe6,
|
||||
0x91, 0x94, 0xd7, 0x13, 0xc2, 0x2f, 0x58, 0x05, 0x8c, 0x1c, 0xc1, 0xba, 0x64, 0xdc, 0xf3, 0x71,
|
||||
0x77, 0x28, 0x98, 0x8b, 0x09, 0xb7, 0xa6, 0xb9, 0x6f, 0x64, 0x39, 0xc7, 0xfc, 0x63, 0xa7, 0xe3,
|
||||
0xe0, 0x86, 0x33, 0x4d, 0x25, 0x8f, 0x61, 0x6d, 0x14, 0xf9, 0x8a, 0x8d, 0x87, 0xab, 0xeb, 0x70,
|
||||
0xaf, 0xa7, 0xe1, 0x9e, 0x14, 0xee, 0xc9, 0x68, 0x53, 0xc4, 0x5e, 0x0d, 0x16, 0x4f, 0xe2, 0x85,
|
||||
0xf5, 0x9d, 0x01, 0x50, 0x6c, 0x17, 0x69, 0x42, 0x6d, 0x80, 0xdf, 0xd0, 0xc8, 0x57, 0xba, 0x5a,
|
||||
0x55, 0x27, 0x7b, 0x8d, 0x6b, 0x38, 0x62, 0x5c, 0x57, 0xaa, 0xea, 0xc4, 0x4b, 0x6d, 0xa1, 0x67,
|
||||
0xba, 0x32, 0xb1, 0x85, 0x9e, 0x11, 0x02, 0x0b, 0x52, 0x61, 0xa0, 0x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0x01, 0x75, 0x87, 0xb8, 0xdd, 0x69, 0xef, 0x90, 0x07, 0x57,
|
||||
0x0e, 0x67, 0xf7, 0x7d, 0xd1, 0xb7, 0x47, 0x54, 0x2a, 0x0c, 0xed, 0xc3, 0x47, 0xbb, 0x7b, 0x47,
|
||||
0xc7, 0x7b, 0x9d, 0xea, 0x7b, 0xed, 0x9d, 0xad, 0x8a, 0x51, 0xe9, 0xac, 0xd1, 0x20, 0xf0, 0x99,
|
||||
0xab, 0x7f, 0x87, 0xec, 0x6f, 0xa5, 0xe0, 0xdd, 0x29, 0x4b, 0xb8, 0x0f, 0x6b, 0x1f, 0xe1, 0x09,
|
||||
0xfa, 0x22, 0xc0, 0xb0, 0xf5, 0x84, 0xf2, 0x88, 0xfa, 0xe4, 0x7e, 0x9c, 0xbf, 0x6b, 0xe7, 0x39,
|
||||
0xdb, 0xa9, 0x0e, 0x26, 0xec, 0xbc, 0x2c, 0x52, 0x0b, 0xf9, 0x3a, 0x17, 0xf2, 0x34, 0xf9, 0x75,
|
||||
0xeb, 0x2f, 0xe9, 0xc7, 0xfd, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x08, 0x45, 0x77, 0xf6, 0xda,
|
||||
0x09, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
||||
// source: pkg/proto/v0/settings.proto
|
||||
// source: settings.proto
|
||||
|
||||
package proto
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
math "math"
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,611 @@
|
||||
// Code generated by protoc-gen-microweb. DO NOT EDIT.
|
||||
// source: proto.proto
|
||||
|
||||
package proto
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/go-chi/render"
|
||||
"github.com/golang/protobuf/jsonpb"
|
||||
)
|
||||
|
||||
type webBundleServiceHandler struct {
|
||||
r chi.Router
|
||||
h BundleServiceHandler
|
||||
}
|
||||
|
||||
func (h *webBundleServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
h.r.ServeHTTP(w, r)
|
||||
}
|
||||
|
||||
func (h *webBundleServiceHandler) CreateSettingsBundle(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
req := &CreateSettingsBundleRequest{}
|
||||
|
||||
resp := &CreateSettingsBundleResponse{}
|
||||
|
||||
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusPreconditionFailed)
|
||||
return
|
||||
}
|
||||
|
||||
if err := h.h.CreateSettingsBundle(
|
||||
context.Background(),
|
||||
req,
|
||||
resp,
|
||||
); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
render.Status(r, http.StatusCreated)
|
||||
render.JSON(w, r, resp)
|
||||
}
|
||||
|
||||
func (h *webBundleServiceHandler) GetSettingsBundle(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
req := &GetSettingsBundleRequest{}
|
||||
|
||||
resp := &GetSettingsBundleResponse{}
|
||||
|
||||
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(),
|
||||
req,
|
||||
resp,
|
||||
); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
render.Status(r, http.StatusOK)
|
||||
render.JSON(w, r, resp)
|
||||
}
|
||||
|
||||
func (h *webBundleServiceHandler) ListSettingsBundles(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
req := &ListSettingsBundlesRequest{}
|
||||
|
||||
resp := &ListSettingsBundlesResponse{}
|
||||
|
||||
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(),
|
||||
req,
|
||||
resp,
|
||||
); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
render.Status(r, http.StatusOK)
|
||||
render.JSON(w, r, resp)
|
||||
}
|
||||
|
||||
func RegisterBundleServiceWeb(r chi.Router, i BundleServiceHandler, middlewares ...func(http.Handler) http.Handler) {
|
||||
handler := &webBundleServiceHandler{
|
||||
r: r,
|
||||
h: i,
|
||||
}
|
||||
|
||||
r.MethodFunc("POST", "/api/v0/bundles", handler.CreateSettingsBundle)
|
||||
r.MethodFunc("GET", "/api/v0/bundles/{extension}/{key}", handler.GetSettingsBundle)
|
||||
r.MethodFunc("GET", "/api/v0/bundles", handler.ListSettingsBundles)
|
||||
}
|
||||
|
||||
// CreateSettingsBundleRequestJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of CreateSettingsBundleRequest. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var CreateSettingsBundleRequestJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *CreateSettingsBundleRequest) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := CreateSettingsBundleRequestJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*CreateSettingsBundleRequest)(nil)
|
||||
|
||||
// CreateSettingsBundleRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of CreateSettingsBundleRequest. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var CreateSettingsBundleRequestJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *CreateSettingsBundleRequest) UnmarshalJSON(b []byte) error {
|
||||
return CreateSettingsBundleRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*CreateSettingsBundleRequest)(nil)
|
||||
|
||||
// CreateSettingsBundleResponseJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of CreateSettingsBundleResponse. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var CreateSettingsBundleResponseJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *CreateSettingsBundleResponse) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := CreateSettingsBundleResponseJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*CreateSettingsBundleResponse)(nil)
|
||||
|
||||
// CreateSettingsBundleResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of CreateSettingsBundleResponse. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var CreateSettingsBundleResponseJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *CreateSettingsBundleResponse) UnmarshalJSON(b []byte) error {
|
||||
return CreateSettingsBundleResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*CreateSettingsBundleResponse)(nil)
|
||||
|
||||
// GetSettingsBundleRequestJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of GetSettingsBundleRequest. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var GetSettingsBundleRequestJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *GetSettingsBundleRequest) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := GetSettingsBundleRequestJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*GetSettingsBundleRequest)(nil)
|
||||
|
||||
// GetSettingsBundleRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of GetSettingsBundleRequest. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var GetSettingsBundleRequestJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *GetSettingsBundleRequest) UnmarshalJSON(b []byte) error {
|
||||
return GetSettingsBundleRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*GetSettingsBundleRequest)(nil)
|
||||
|
||||
// GetSettingsBundleResponseJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of GetSettingsBundleResponse. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var GetSettingsBundleResponseJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *GetSettingsBundleResponse) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := GetSettingsBundleResponseJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*GetSettingsBundleResponse)(nil)
|
||||
|
||||
// GetSettingsBundleResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of GetSettingsBundleResponse. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var GetSettingsBundleResponseJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *GetSettingsBundleResponse) UnmarshalJSON(b []byte) error {
|
||||
return GetSettingsBundleResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*GetSettingsBundleResponse)(nil)
|
||||
|
||||
// ListSettingsBundlesRequestJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of ListSettingsBundlesRequest. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var ListSettingsBundlesRequestJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *ListSettingsBundlesRequest) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := ListSettingsBundlesRequestJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*ListSettingsBundlesRequest)(nil)
|
||||
|
||||
// ListSettingsBundlesRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of ListSettingsBundlesRequest. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var ListSettingsBundlesRequestJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *ListSettingsBundlesRequest) UnmarshalJSON(b []byte) error {
|
||||
return ListSettingsBundlesRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*ListSettingsBundlesRequest)(nil)
|
||||
|
||||
// ListSettingsBundlesResponseJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of ListSettingsBundlesResponse. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var ListSettingsBundlesResponseJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *ListSettingsBundlesResponse) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := ListSettingsBundlesResponseJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*ListSettingsBundlesResponse)(nil)
|
||||
|
||||
// ListSettingsBundlesResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of ListSettingsBundlesResponse. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var ListSettingsBundlesResponseJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *ListSettingsBundlesResponse) UnmarshalJSON(b []byte) error {
|
||||
return ListSettingsBundlesResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*ListSettingsBundlesResponse)(nil)
|
||||
|
||||
// SettingsBundleJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of SettingsBundle. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var SettingsBundleJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *SettingsBundle) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := SettingsBundleJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*SettingsBundle)(nil)
|
||||
|
||||
// SettingsBundleJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of SettingsBundle. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var SettingsBundleJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *SettingsBundle) UnmarshalJSON(b []byte) error {
|
||||
return SettingsBundleJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*SettingsBundle)(nil)
|
||||
|
||||
// SettingJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of Setting. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var SettingJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *Setting) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := SettingJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*Setting)(nil)
|
||||
|
||||
// SettingJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of Setting. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var SettingJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *Setting) UnmarshalJSON(b []byte) error {
|
||||
return SettingJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*Setting)(nil)
|
||||
|
||||
// IntSettingJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of IntSetting. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var IntSettingJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *IntSetting) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := IntSettingJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*IntSetting)(nil)
|
||||
|
||||
// IntSettingJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of IntSetting. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var IntSettingJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *IntSetting) UnmarshalJSON(b []byte) error {
|
||||
return IntSettingJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*IntSetting)(nil)
|
||||
|
||||
// StringSettingJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of StringSetting. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var StringSettingJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *StringSetting) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := StringSettingJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*StringSetting)(nil)
|
||||
|
||||
// StringSettingJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of StringSetting. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var StringSettingJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *StringSetting) UnmarshalJSON(b []byte) error {
|
||||
return StringSettingJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*StringSetting)(nil)
|
||||
|
||||
// BoolSettingJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of BoolSetting. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var BoolSettingJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *BoolSetting) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := BoolSettingJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*BoolSetting)(nil)
|
||||
|
||||
// BoolSettingJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of BoolSetting. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var BoolSettingJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *BoolSetting) UnmarshalJSON(b []byte) error {
|
||||
return BoolSettingJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*BoolSetting)(nil)
|
||||
|
||||
// SingleChoiceListSettingJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of SingleChoiceListSetting. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var SingleChoiceListSettingJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *SingleChoiceListSetting) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := SingleChoiceListSettingJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*SingleChoiceListSetting)(nil)
|
||||
|
||||
// SingleChoiceListSettingJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of SingleChoiceListSetting. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var SingleChoiceListSettingJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *SingleChoiceListSetting) UnmarshalJSON(b []byte) error {
|
||||
return SingleChoiceListSettingJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*SingleChoiceListSetting)(nil)
|
||||
|
||||
// MultiChoiceListSettingJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of MultiChoiceListSetting. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var MultiChoiceListSettingJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *MultiChoiceListSetting) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := MultiChoiceListSettingJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*MultiChoiceListSetting)(nil)
|
||||
|
||||
// MultiChoiceListSettingJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of MultiChoiceListSetting. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var MultiChoiceListSettingJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *MultiChoiceListSetting) UnmarshalJSON(b []byte) error {
|
||||
return MultiChoiceListSettingJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*MultiChoiceListSetting)(nil)
|
||||
|
||||
// ListOptionJSONMarshaler describes the default jsonpb.Marshaler used by all
|
||||
// instances of ListOption. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var ListOptionJSONMarshaler = new(jsonpb.Marshaler)
|
||||
|
||||
// MarshalJSON satisfies the encoding/json Marshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly marshal the message.
|
||||
func (m *ListOption) MarshalJSON() ([]byte, error) {
|
||||
if m == nil {
|
||||
return json.Marshal(nil)
|
||||
}
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if err := ListOptionJSONMarshaler.Marshal(buf, m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
var _ json.Marshaler = (*ListOption)(nil)
|
||||
|
||||
// ListOptionJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all
|
||||
// instances of ListOption. This struct is safe to replace or modify but
|
||||
// should not be done so concurrently.
|
||||
var ListOptionJSONUnmarshaler = new(jsonpb.Unmarshaler)
|
||||
|
||||
// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
|
||||
// uses the more correct jsonpb package to correctly unmarshal the message.
|
||||
func (m *ListOption) UnmarshalJSON(b []byte) error {
|
||||
return ListOptionJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m)
|
||||
}
|
||||
|
||||
var _ json.Unmarshaler = (*ListOption)(nil)
|
||||
@@ -3,10 +3,50 @@ syntax = "proto3";
|
||||
package proto;
|
||||
option go_package = "proto";
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "protoc-gen-swagger/options/annotations.proto";
|
||||
|
||||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
|
||||
info: {
|
||||
title: "Settings";
|
||||
version: "1.0";
|
||||
contact: {
|
||||
name: "ownCloud GmbH";
|
||||
url: "https://github.com/owncloud/ocis-settings";
|
||||
email: "support@owncloud.com";
|
||||
};
|
||||
license: {
|
||||
name: "Apache-2.0";
|
||||
url: "https://github.com/owncloud/ocis-settings/blob/master/LICENSE";
|
||||
};
|
||||
};
|
||||
schemes: HTTP;
|
||||
schemes: HTTPS;
|
||||
consumes: "application/json";
|
||||
produces: "application/json";
|
||||
external_docs: {
|
||||
description: "Developer Manual";
|
||||
url: "http://owncloud.github.io/extensions/ocis_settings/";
|
||||
};
|
||||
};
|
||||
|
||||
service BundleService {
|
||||
rpc CreateSettingsBundle(CreateSettingsBundleRequest) returns (CreateSettingsBundleResponse);
|
||||
rpc GetSettingsBundle(GetSettingsBundleRequest) returns (GetSettingsBundleResponse);
|
||||
rpc ListSettingsBundles(ListSettingsBundlesRequest) returns (ListSettingsBundlesResponse);
|
||||
rpc CreateSettingsBundle(CreateSettingsBundleRequest) returns (CreateSettingsBundleResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v0/bundles",
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
rpc GetSettingsBundle(GetSettingsBundleRequest) returns (GetSettingsBundleResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/v0/bundles/{extension}/{key}"
|
||||
};
|
||||
};
|
||||
rpc ListSettingsBundles(ListSettingsBundlesRequest) returns (ListSettingsBundlesResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/v0/bundles"
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
// requests and responses
|
||||
|
||||
@@ -0,0 +1,349 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "Settings",
|
||||
"version": "1.0",
|
||||
"contact": {
|
||||
"name": "ownCloud GmbH",
|
||||
"url": "https://github.com/owncloud/ocis-settings",
|
||||
"email": "support@owncloud.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache-2.0",
|
||||
"url": "https://github.com/owncloud/ocis-settings/blob/master/LICENSE"
|
||||
}
|
||||
},
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/api/v0/bundles": {
|
||||
"get": {
|
||||
"operationId": "ListSettingsBundles",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/protoListSettingsBundlesResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "extension",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"BundleService"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"operationId": "CreateSettingsBundle",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/protoCreateSettingsBundleResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/protoCreateSettingsBundleRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"BundleService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v0/bundles/{extension}/{key}": {
|
||||
"get": {
|
||||
"operationId": "GetSettingsBundle",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/protoGetSettingsBundleResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "extension",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "key",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"BundleService"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"protoBoolSetting": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"default": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protoCreateSettingsBundleRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"settingsBundle": {
|
||||
"$ref": "#/definitions/protoSettingsBundle"
|
||||
}
|
||||
},
|
||||
"title": "requests and responses"
|
||||
},
|
||||
"protoCreateSettingsBundleResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"settingsBundle": {
|
||||
"$ref": "#/definitions/protoSettingsBundle"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protoGetSettingsBundleResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"settingsBundle": {
|
||||
"$ref": "#/definitions/protoSettingsBundle"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protoIntSetting": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"default": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"min": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"max": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"step": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"placeholder": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protoListOption": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"stringValue": {
|
||||
"type": "string"
|
||||
},
|
||||
"intValue": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"selected": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"displayValue": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protoListSettingsBundlesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"settingsBundles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protoSettingsBundle"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"protoMultiChoiceListSetting": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protoListOption"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"protoSetting": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"displayName": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"intValue": {
|
||||
"$ref": "#/definitions/protoIntSetting"
|
||||
},
|
||||
"stringValue": {
|
||||
"$ref": "#/definitions/protoStringSetting"
|
||||
},
|
||||
"boolValue": {
|
||||
"$ref": "#/definitions/protoBoolSetting"
|
||||
},
|
||||
"singleChoiceValue": {
|
||||
"$ref": "#/definitions/protoSingleChoiceListSetting"
|
||||
},
|
||||
"multiChoiceValue": {
|
||||
"$ref": "#/definitions/protoMultiChoiceListSetting"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protoSettingsBundle": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"extension": {
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"displayName": {
|
||||
"type": "string"
|
||||
},
|
||||
"settings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protoSetting"
|
||||
}
|
||||
}
|
||||
},
|
||||
"title": "payloads"
|
||||
},
|
||||
"protoSingleChoiceListSetting": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protoListOption"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"protoStringSetting": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"default": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
"minLength": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"maxLength": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"placeholder": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type_url": {
|
||||
"type": "string",
|
||||
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "Must be a valid serialized protocol buffer of the above specified type."
|
||||
}
|
||||
},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
},
|
||||
"runtimeError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"externalDocs": {
|
||||
"description": "Developer Manual",
|
||||
"url": "http://owncloud.github.io/extensions/ocis_settings/"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user