From c04ce20d2b7040c02af660567cb2b38f72008797 Mon Sep 17 00:00:00 2001 From: cyli Date: Wed, 31 Aug 2016 13:26:46 -0700 Subject: [PATCH] Add a secrets proto file that contains messages and rpc calls for manipulating secrets. Also update some of the object protos to make things easier to look up. Signed-off-by: cyli --- api/gen.go | 2 +- api/objects.pb.go | 409 ++++++-- api/objects.proto | 12 +- api/secrets.pb.go | 2551 +++++++++++++++++++++++++++++++++++++++++++++ api/secrets.proto | 77 ++ api/specs.pb.go | 245 +++-- api/specs.proto | 4 + api/types.pb.go | 11 + 8 files changed, 3113 insertions(+), 198 deletions(-) create mode 100644 api/secrets.pb.go create mode 100644 api/secrets.proto diff --git a/api/gen.go b/api/gen.go index d0fb1ede1d..0c2b8e142c 100644 --- a/api/gen.go +++ b/api/gen.go @@ -1,3 +1,3 @@ package api -//go:generate protoc -I.:../protobuf:../vendor:../vendor/github.com/gogo/protobuf --gogoswarm_out=plugins=grpc+deepcopy+raftproxy+authenticatedwrapper,import_path=github.com/docker/swarmkit/api,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mtimestamp/timestamp.proto=github.com/docker/swarmkit/api/timestamp,Mduration/duration.proto=github.com/docker/swarmkit/api/duration,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,Mplugin/plugin.proto=github.com/docker/swarmkit/protobuf/plugin:. types.proto specs.proto objects.proto control.proto dispatcher.proto ca.proto snapshot.proto raft.proto health.proto resource.proto +//go:generate protoc -I.:../protobuf:../vendor:../vendor/github.com/gogo/protobuf --gogoswarm_out=plugins=grpc+deepcopy+raftproxy+authenticatedwrapper,import_path=github.com/docker/swarmkit/api,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mtimestamp/timestamp.proto=github.com/docker/swarmkit/api/timestamp,Mduration/duration.proto=github.com/docker/swarmkit/api/duration,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,Mplugin/plugin.proto=github.com/docker/swarmkit/protobuf/plugin:. types.proto specs.proto objects.proto control.proto dispatcher.proto ca.proto snapshot.proto raft.proto health.proto resource.proto secrets.proto diff --git a/api/objects.pb.go b/api/objects.pb.go index 613629195c..2a893218b3 100644 --- a/api/objects.pb.go +++ b/api/objects.pb.go @@ -15,6 +15,9 @@ import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" import sort "sort" import strconv "strconv" import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import errors "errors" import io "io" @@ -232,11 +235,13 @@ func (*Cluster) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []i // Secret type Secret struct { - ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"` - SecretData []*SecretData `protobuf:"bytes,3,rep,name=secret_data,json=secretData" json:"secret_data,omitempty"` - // Name of the secret + ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"` + SecretData map[string]*SecretData `protobuf:"bytes,3,rep,name=secret_data,json=secretData" json:"secret_data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + // Name of the secret, so that we can use it easily for lookups Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + // ID of the latest version, so that we can easily use it for lookups + LatestVersion string `protobuf:"bytes,5,opt,name=latest,proto3" json:"latest,omitempty"` } func (m *Secret) Reset() { *m = Secret{} } @@ -250,6 +255,8 @@ type SecretData struct { Spec SecretSpec `protobuf:"bytes,3,opt,name=spec" json:"spec"` // Digest represents the cryptographic digest of the secret data Digest string `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` + // Size represents the size of the secret + SecretSize int32 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"` } func (m *SecretData) Reset() { *m = SecretData{} } @@ -459,15 +466,16 @@ func (m *Secret) Copy() *Secret { } o := &Secret{ - ID: m.ID, - Meta: *m.Meta.Copy(), - Name: m.Name, + ID: m.ID, + Meta: *m.Meta.Copy(), + Name: m.Name, + LatestVersion: m.LatestVersion, } if m.SecretData != nil { - o.SecretData = make([]*SecretData, 0, len(m.SecretData)) - for _, v := range m.SecretData { - o.SecretData = append(o.SecretData, v.Copy()) + o.SecretData = make(map[string]*SecretData) + for k, v := range m.SecretData { + o.SecretData[k] = v.Copy() } } @@ -480,10 +488,11 @@ func (m *SecretData) Copy() *SecretData { } o := &SecretData{ - ID: m.ID, - Meta: *m.Meta.Copy(), - Spec: *m.Spec.Copy(), - Digest: m.Digest, + ID: m.ID, + Meta: *m.Meta.Copy(), + Spec: *m.Spec.Copy(), + Digest: m.Digest, + SecretSize: m.SecretSize, } return o @@ -656,14 +665,25 @@ func (this *Secret) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 8) + s := make([]string, 0, 9) s = append(s, "&api.Secret{") s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n") s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n") + keysForSecretData := make([]string, 0, len(this.SecretData)) + for k, _ := range this.SecretData { + keysForSecretData = append(keysForSecretData, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForSecretData) + mapStringForSecretData := "map[string]*SecretData{" + for _, k := range keysForSecretData { + mapStringForSecretData += fmt.Sprintf("%#v: %#v,", k, this.SecretData[k]) + } + mapStringForSecretData += "}" if this.SecretData != nil { - s = append(s, "SecretData: "+fmt.Sprintf("%#v", this.SecretData)+",\n") + s = append(s, "SecretData: "+mapStringForSecretData+",\n") } s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "LatestVersion: "+fmt.Sprintf("%#v", this.LatestVersion)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -671,12 +691,13 @@ func (this *SecretData) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 8) + s := make([]string, 0, 9) s = append(s, "&api.SecretData{") s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n") s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n") s = append(s, "Spec: "+strings.Replace(this.Spec.GoString(), `&`, ``, 1)+",\n") s = append(s, "Digest: "+fmt.Sprintf("%#v", this.Digest)+",\n") + s = append(s, "SecretSize: "+fmt.Sprintf("%#v", this.SecretSize)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -1310,15 +1331,28 @@ func (m *Secret) MarshalTo(data []byte) (int, error) { } i += n31 if len(m.SecretData) > 0 { - for _, msg := range m.SecretData { + for k, _ := range m.SecretData { data[i] = 0x1a i++ - i = encodeVarintObjects(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) + v := m.SecretData[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovObjects(uint64(len(k))) + 1 + msgSize + sovObjects(uint64(msgSize)) + i = encodeVarintObjects(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintObjects(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintObjects(data, i, uint64(v.Size())) + n32, err := v.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n + i += n32 } } if len(m.Name) > 0 { @@ -1327,6 +1361,12 @@ func (m *Secret) MarshalTo(data []byte) (int, error) { i = encodeVarintObjects(data, i, uint64(len(m.Name))) i += copy(data[i:], m.Name) } + if len(m.LatestVersion) > 0 { + data[i] = 0x2a + i++ + i = encodeVarintObjects(data, i, uint64(len(m.LatestVersion))) + i += copy(data[i:], m.LatestVersion) + } return i, nil } @@ -1354,25 +1394,30 @@ func (m *SecretData) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintObjects(data, i, uint64(m.Meta.Size())) - n32, err := m.Meta.MarshalTo(data[i:]) + n33, err := m.Meta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n32 + i += n33 data[i] = 0x1a i++ i = encodeVarintObjects(data, i, uint64(m.Spec.Size())) - n33, err := m.Spec.MarshalTo(data[i:]) + n34, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n33 + i += n34 if len(m.Digest) > 0 { data[i] = 0x22 i++ i = encodeVarintObjects(data, i, uint64(len(m.Digest))) i += copy(data[i:], m.Digest) } + if m.SecretSize != 0 { + data[i] = 0x28 + i++ + i = encodeVarintObjects(data, i, uint64(m.SecretSize)) + } return i, nil } @@ -1635,15 +1680,25 @@ func (m *Secret) Size() (n int) { l = m.Meta.Size() n += 1 + l + sovObjects(uint64(l)) if len(m.SecretData) > 0 { - for _, e := range m.SecretData { - l = e.Size() - n += 1 + l + sovObjects(uint64(l)) + for k, v := range m.SecretData { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovObjects(uint64(len(k))) + 1 + l + sovObjects(uint64(l)) + n += mapEntrySize + 1 + sovObjects(uint64(mapEntrySize)) } } l = len(m.Name) if l > 0 { n += 1 + l + sovObjects(uint64(l)) } + l = len(m.LatestVersion) + if l > 0 { + n += 1 + l + sovObjects(uint64(l)) + } return n } @@ -1662,6 +1717,9 @@ func (m *SecretData) Size() (n int) { if l > 0 { n += 1 + l + sovObjects(uint64(l)) } + if m.SecretSize != 0 { + n += 1 + sovObjects(uint64(m.SecretSize)) + } return n } @@ -1811,11 +1869,22 @@ func (this *Secret) String() string { if this == nil { return "nil" } + keysForSecretData := make([]string, 0, len(this.SecretData)) + for k, _ := range this.SecretData { + keysForSecretData = append(keysForSecretData, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForSecretData) + mapStringForSecretData := "map[string]*SecretData{" + for _, k := range keysForSecretData { + mapStringForSecretData += fmt.Sprintf("%v: %v,", k, this.SecretData[k]) + } + mapStringForSecretData += "}" s := strings.Join([]string{`&Secret{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`, - `SecretData:` + strings.Replace(fmt.Sprintf("%v", this.SecretData), "SecretData", "SecretData", 1) + `,`, + `SecretData:` + mapStringForSecretData + `,`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `LatestVersion:` + fmt.Sprintf("%v", this.LatestVersion) + `,`, `}`, }, "") return s @@ -1829,6 +1898,7 @@ func (this *SecretData) String() string { `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SecretSpec", "SecretSpec", 1), `&`, ``, 1) + `,`, `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`, + `SecretSize:` + fmt.Sprintf("%v", this.SecretSize) + `,`, `}`, }, "") return s @@ -3844,10 +3914,95 @@ func (m *Secret) Unmarshal(data []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SecretData = append(m.SecretData, &SecretData{}) - if err := m.SecretData[len(m.SecretData)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowObjects + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowObjects + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthObjects + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowObjects + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowObjects + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthObjects + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthObjects + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &SecretData{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { return err } + iNdEx = postmsgIndex + if m.SecretData == nil { + m.SecretData = make(map[string]*SecretData) + } + m.SecretData[mapkey] = mapvalue iNdEx = postIndex case 4: if wireType != 2 { @@ -3878,6 +4033,35 @@ func (m *Secret) Unmarshal(data []byte) error { } m.Name = string(data[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LatestVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowObjects + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthObjects + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LatestVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipObjects(data[iNdEx:]) @@ -4046,6 +4230,25 @@ func (m *SecretData) Unmarshal(data []byte) error { } m.Digest = string(data[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SecretSize", wireType) + } + m.SecretSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowObjects + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.SecretSize |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipObjects(data[iNdEx:]) @@ -4173,73 +4376,79 @@ var ( ) var fileDescriptorObjects = []byte{ - // 1087 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x1b, 0xc5, - 0x1b, 0xce, 0xda, 0x1b, 0xdb, 0xfb, 0x3a, 0x8e, 0xf4, 0x9b, 0x5f, 0x15, 0x6d, 0x43, 0xb0, 0x83, - 0x2b, 0x50, 0x0f, 0x95, 0x2b, 0x4a, 0x41, 0xad, 0x68, 0x55, 0xf9, 0x4f, 0x04, 0x56, 0x09, 0x44, - 0x93, 0x92, 0x1e, 0x57, 0x93, 0xdd, 0xa9, 0x59, 0xec, 0xdd, 0x59, 0xcd, 0x4c, 0x52, 0xe5, 0x86, - 0xf8, 0x00, 0x48, 0x7c, 0x01, 0xee, 0xf0, 0x25, 0xb8, 0xe6, 0xc0, 0x81, 0x23, 0x27, 0x8b, 0xf8, - 0xc6, 0x09, 0x3e, 0x02, 0x9a, 0xd9, 0x59, 0x7b, 0x23, 0xaf, 0x43, 0x2b, 0x45, 0xb9, 0xcd, 0xec, - 0x3c, 0xcf, 0x33, 0xef, 0xfb, 0xce, 0x33, 0xef, 0xd8, 0xd0, 0x60, 0xc7, 0xdf, 0x52, 0x5f, 0x8a, - 0x4e, 0xc2, 0x99, 0x64, 0x08, 0x05, 0xcc, 0x1f, 0x53, 0xde, 0x11, 0xaf, 0x09, 0x8f, 0xc6, 0xa1, - 0xec, 0x9c, 0x7e, 0xb8, 0x5d, 0x97, 0x67, 0x09, 0x35, 0x80, 0xed, 0xba, 0x48, 0xa8, 0x9f, 0x4d, - 0x6e, 0xcb, 0x30, 0xa2, 0x42, 0x92, 0x28, 0xb9, 0x3f, 0x1f, 0x99, 0xa5, 0x5b, 0x23, 0x36, 0x62, - 0x7a, 0x78, 0x5f, 0x8d, 0xd2, 0xaf, 0xed, 0x5f, 0x2d, 0xb0, 0xf7, 0xa9, 0x24, 0xe8, 0x53, 0xa8, - 0x9e, 0x52, 0x2e, 0x42, 0x16, 0xbb, 0xd6, 0xae, 0x75, 0xb7, 0xfe, 0xe0, 0x9d, 0xce, 0xf2, 0xce, - 0x9d, 0xa3, 0x14, 0xd2, 0xb3, 0xcf, 0xa7, 0xad, 0x35, 0x9c, 0x31, 0xd0, 0x13, 0x00, 0x9f, 0x53, - 0x22, 0x69, 0xe0, 0x11, 0xe9, 0x96, 0x34, 0xff, 0xdd, 0x22, 0xfe, 0x8b, 0x2c, 0x28, 0xec, 0x18, - 0x42, 0x57, 0x2a, 0xf6, 0x49, 0x12, 0x64, 0xec, 0xf2, 0x1b, 0xb1, 0x0d, 0xa1, 0x2b, 0xdb, 0x7f, - 0x95, 0xc1, 0xfe, 0x92, 0x05, 0x14, 0x6d, 0x41, 0x29, 0x0c, 0x74, 0xf0, 0x4e, 0xaf, 0x32, 0x9b, - 0xb6, 0x4a, 0xc3, 0x01, 0x2e, 0x85, 0x01, 0x7a, 0x00, 0x76, 0x44, 0x25, 0x31, 0x61, 0xb9, 0x45, - 0xc2, 0xaa, 0x02, 0x26, 0x27, 0x8d, 0x45, 0x9f, 0x80, 0xad, 0xca, 0x6a, 0x82, 0xd9, 0x29, 0xe2, - 0xa8, 0x3d, 0x0f, 0x13, 0xea, 0x67, 0x3c, 0x85, 0x47, 0x7b, 0x50, 0x0f, 0xa8, 0xf0, 0x79, 0x98, - 0x48, 0x55, 0x49, 0x5b, 0xd3, 0xef, 0xac, 0x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 0x76, - 0xcb, 0xab, 0xdc, 0x76, 0xc0, 0xb8, 0xec, 0xb3, 0xf8, 0x55, 0x38, 0xc2, 0x29, 0x18, 0xbd, 0x84, - 0xfa, 0x69, 0xc8, 0xe5, 0x09, 0x99, 0x78, 0x61, 0x22, 0xdc, 0xb2, 0xe6, 0x7e, 0x70, 0xd5, 0x96, - 0x9d, 0xa3, 0x14, 0x3f, 0x3c, 0xe8, 0x6d, 0xce, 0xa6, 0x2d, 0x98, 0x4f, 0x05, 0x06, 0x23, 0x35, - 0x4c, 0xc4, 0xf6, 0x3e, 0x38, 0xf3, 0x15, 0x74, 0x0f, 0x20, 0x4e, 0xcd, 0xe5, 0xcd, 0x8f, 0xbb, - 0x31, 0x9b, 0xb6, 0x1c, 0x63, 0xb9, 0xe1, 0x00, 0x3b, 0x06, 0x30, 0x0c, 0x10, 0x02, 0x9b, 0x04, - 0x01, 0xd7, 0x87, 0xef, 0x60, 0x3d, 0x6e, 0xff, 0xb6, 0x0e, 0xf6, 0x0b, 0x22, 0xc6, 0x37, 0xdd, - 0x20, 0xd4, 0x9e, 0x4b, 0x76, 0xb9, 0x07, 0x20, 0x52, 0x27, 0xa9, 0x74, 0xec, 0x45, 0x3a, 0xc6, - 0x5f, 0x2a, 0x1d, 0x03, 0x48, 0xd3, 0x11, 0x13, 0x26, 0xb5, 0x33, 0x6c, 0xac, 0xc7, 0xe8, 0x0e, - 0x54, 0x63, 0x16, 0x68, 0x7a, 0x45, 0xd3, 0x61, 0x36, 0x6d, 0x55, 0x54, 0x33, 0x18, 0x0e, 0x70, - 0x45, 0x2d, 0x0d, 0x03, 0x75, 0xe3, 0x48, 0x1c, 0x33, 0x49, 0x54, 0x3b, 0x11, 0xe6, 0xe6, 0x16, - 0xfa, 0xba, 0xbb, 0x80, 0x65, 0x37, 0x2e, 0xc7, 0x44, 0x47, 0xf0, 0xff, 0x2c, 0xde, 0xbc, 0x60, - 0xed, 0x6d, 0x04, 0x91, 0x51, 0xc8, 0xad, 0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, 0xb8, 0x68, 0xae, 0xfd, 0x73, 0xd1, 0xb4, 0xbe, 0x9b, 0x35, 0xad, - 0xf3, 0x59, 0xd3, 0xfa, 0x7d, 0xd6, 0xb4, 0xfe, 0x9c, 0x35, 0xad, 0xe3, 0x8a, 0xfe, 0xdf, 0xf0, - 0xd1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xb8, 0x67, 0x67, 0xa7, 0x0c, 0x00, 0x00, + // 1170 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x57, 0x5d, 0x6f, 0x1b, 0x45, + 0x17, 0xee, 0xda, 0x1b, 0xdb, 0x7b, 0x1c, 0xe7, 0x7d, 0x3b, 0x54, 0xd5, 0x36, 0x04, 0x3b, 0xb8, + 0x02, 0x15, 0x54, 0xb9, 0xa2, 0x14, 0xd4, 0x42, 0x2b, 0xe4, 0x2f, 0x81, 0x95, 0x06, 0xa2, 0x49, + 0x49, 0xaf, 0x90, 0x35, 0xd9, 0x9d, 0x9a, 0xc5, 0xf6, 0xce, 0x6a, 0x67, 0xec, 0xca, 0xbd, 0x42, + 0xfc, 0x00, 0x24, 0xfe, 0x00, 0x7f, 0xa5, 0xb7, 0xb9, 0x40, 0x88, 0x4b, 0xae, 0x2c, 0xe2, 0x3b, + 0xae, 0xe0, 0x27, 0xa0, 0xf9, 0x58, 0xdb, 0xc1, 0xeb, 0xd0, 0x4a, 0x51, 0xae, 0x3c, 0x1f, 0xcf, + 0xf3, 0xcc, 0x39, 0x67, 0xce, 0x39, 0xb3, 0x86, 0x12, 0x3b, 0xfe, 0x8e, 0x7a, 0x82, 0xd7, 0xa2, + 0x98, 0x09, 0x86, 0x90, 0xcf, 0xbc, 0x3e, 0x8d, 0x6b, 0xfc, 0x39, 0x89, 0x87, 0xfd, 0x40, 0xd4, + 0xc6, 0x1f, 0x6c, 0x17, 0xc5, 0x24, 0xa2, 0x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87, 0x90, 0xe3, + 0x82, 0x88, 0x11, 0x77, 0x37, 0x94, 0x42, 0x79, 0xad, 0x01, 0x0a, 0x65, 0x4c, 0x30, 0x1c, 0xf4, + 0x05, 0x6c, 0x0d, 0x49, 0x48, 0x7a, 0x34, 0xee, 0x1a, 0x95, 0x9c, 0x52, 0x79, 0x3b, 0xd5, 0x75, + 0x8d, 0xd4, 0x42, 0xb8, 0x34, 0x5c, 0x9e, 0xa2, 0x36, 0x00, 0x11, 0x82, 0x78, 0xdf, 0x0e, 0x69, + 0x28, 0xdc, 0xbc, 0x52, 0x79, 0x27, 0xd5, 0x16, 0x2a, 0x9e, 0xb3, 0xb8, 0x5f, 0x9f, 0x83, 0xf1, + 0x12, 0x11, 0x7d, 0x0e, 0x45, 0x8f, 0xc6, 0x22, 0x78, 0x16, 0x78, 0x44, 0x50, 0xb7, 0xa0, 0x74, + 0x2a, 0x69, 0x3a, 0xcd, 0x05, 0xcc, 0x38, 0xb5, 0xcc, 0xac, 0xfe, 0x94, 0x81, 0xfc, 0x21, 0x8d, + 0xc7, 0x81, 0x77, 0xb1, 0xd7, 0xfd, 0xe0, 0xcc, 0x75, 0xa7, 0x5a, 0x66, 0x8e, 0x5d, 0xb9, 0xf1, + 0xfb, 0x50, 0xa0, 0xa1, 0x1f, 0xb1, 0x20, 0x14, 0xe6, 0xba, 0x53, 0xb3, 0xa5, 0x6d, 0x30, 0x78, + 0x8e, 0x46, 0x6d, 0x28, 0xe9, 0x2c, 0xee, 0x9e, 0xb9, 0xeb, 0xdd, 0x34, 0xfa, 0xd7, 0x0a, 0x68, + 0x2e, 0x69, 0x73, 0xb4, 0x34, 0xab, 0xfe, 0x9c, 0x81, 0x42, 0xa2, 0x8e, 0xee, 0x19, 0x47, 0xac, + 0xf5, 0x52, 0x09, 0x56, 0x7a, 0x62, 0x7c, 0xb8, 0x07, 0x1b, 0x11, 0x8b, 0x05, 0x77, 0x33, 0xbb, + 0xd9, 0x75, 0xd9, 0x76, 0xc0, 0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e, 0x9d, 0x68, 0x5f, 0xb1, 0x1c, + 0xca, 0xc7, 0x7b, 0x4c, 0x06, 0x23, 0x6a, 0xbc, 0x2c, 0xaf, 0x37, 0x55, 0xaa, 0x60, 0x0d, 0xfe, + 0x24, 0x73, 0xdf, 0xaa, 0xfe, 0x6a, 0x01, 0x2c, 0x76, 0x2e, 0x34, 0x8a, 0xf7, 0xcf, 0xa4, 0xed, + 0x39, 0x36, 0xad, 0x64, 0xed, 0x75, 0xc8, 0xf9, 0x41, 0x4f, 0x86, 0x47, 0x07, 0xcd, 0xcc, 0x50, + 0x15, 0x6c, 0x1e, 0xbc, 0xa0, 0x2a, 0x68, 0x1b, 0xfa, 0xf3, 0xc1, 0x28, 0x04, 0x2f, 0x28, 0x56, + 0x7b, 0x8d, 0x9d, 0x93, 0xd3, 0xf2, 0x95, 0xdf, 0x4f, 0xcb, 0x57, 0xfe, 0x3e, 0x2d, 0x5b, 0xdf, + 0xcf, 0xca, 0xd6, 0xc9, 0xac, 0x6c, 0xfd, 0x36, 0x2b, 0x5b, 0x7f, 0xcc, 0xca, 0xd6, 0x71, 0x4e, + 0xfd, 0xe3, 0xf9, 0xf0, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x56, 0x3a, 0x26, 0xb4, 0x61, 0x0d, + 0x00, 0x00, } diff --git a/api/objects.proto b/api/objects.proto index 917f458612..60f390fffc 100644 --- a/api/objects.proto +++ b/api/objects.proto @@ -229,10 +229,13 @@ message Secret { Meta meta = 2 [(gogoproto.nullable) = false]; - repeated SecretData secret_data = 3; + map secret_data = 3; - // Name of the secret + // Name of the secret, so that we can use it easily for lookups string name = 4; + + // ID of the latest version, so that we can easily use it for lookups + string latest = 5 [(gogoproto.customname) = "LatestVersion"]; } // SecretData is represents a specific version of a secret, and is immutable @@ -241,9 +244,12 @@ message SecretData { Meta meta = 2 [(gogoproto.nullable) = false]; - SecretSpec spec = 3 [(gogoproto.nullable) = false]; + SecretSpec spec = 3 [(gogoproto.nullable) = false]; // Digest represents the cryptographic digest of the secret data string digest = 4; + + // Size represents the size of the secret + int32 size = 5 [(gogoproto.customname) = "SecretSize"]; } diff --git a/api/secrets.pb.go b/api/secrets.pb.go new file mode 100644 index 0000000000..d9fdf3c6e0 --- /dev/null +++ b/api/secrets.pb.go @@ -0,0 +1,2551 @@ +// Code generated by protoc-gen-gogo. +// source: secrets.proto +// DO NOT EDIT! + +package api + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/docker/swarmkit/protobuf/plugin" + +import strings "strings" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +import raftpicker "github.com/docker/swarmkit/manager/raftpicker" +import codes "google.golang.org/grpc/codes" +import metadata "google.golang.org/grpc/metadata" +import transport "google.golang.org/grpc/transport" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type GetSecretRequest struct { + // Name is name of the secret to get info for. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *GetSecretRequest) Reset() { *m = GetSecretRequest{} } +func (*GetSecretRequest) ProtoMessage() {} +func (*GetSecretRequest) Descriptor() ([]byte, []int) { return fileDescriptorSecrets, []int{0} } + +type GetSecretResponse struct { + // Secret is the secret corresponding to that ID, but each version in `secret.spec.data` should have its `.data` field be nil + Secret *Secret `protobuf:"bytes,1,opt,name=secret" json:"secret,omitempty"` +} + +func (m *GetSecretResponse) Reset() { *m = GetSecretResponse{} } +func (*GetSecretResponse) ProtoMessage() {} +func (*GetSecretResponse) Descriptor() ([]byte, []int) { return fileDescriptorSecrets, []int{1} } + +type ListSecretsRequest struct { + Filters *ListSecretsRequest_Filters `protobuf:"bytes,1,opt,name=filters" json:"filters,omitempty"` +} + +func (m *ListSecretsRequest) Reset() { *m = ListSecretsRequest{} } +func (*ListSecretsRequest) ProtoMessage() {} +func (*ListSecretsRequest) Descriptor() ([]byte, []int) { return fileDescriptorSecrets, []int{2} } + +type ListSecretsRequest_Filters struct { + Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"` + NamePrefixes []string `protobuf:"bytes,2,rep,name=name_prefixes,json=namePrefixes" json:"name_prefixes,omitempty"` +} + +func (m *ListSecretsRequest_Filters) Reset() { *m = ListSecretsRequest_Filters{} } +func (*ListSecretsRequest_Filters) ProtoMessage() {} +func (*ListSecretsRequest_Filters) Descriptor() ([]byte, []int) { + return fileDescriptorSecrets, []int{2, 0} +} + +type ListSecretsResponse struct { + // Each Secret is the secret corresponding to that ID, but each version in `secret.spec.data` should have its `.data` field be nil + Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets" json:"secrets,omitempty"` +} + +func (m *ListSecretsResponse) Reset() { *m = ListSecretsResponse{} } +func (*ListSecretsResponse) ProtoMessage() {} +func (*ListSecretsResponse) Descriptor() ([]byte, []int) { return fileDescriptorSecrets, []int{3} } + +// Note CreateSecretRequest does not contain a SecretSpec, since that can contain multiple SecretData objects, which have digests +// which should be generated by the +type CreateSecretRequest struct { + Spec *SecretSpec `protobuf:"bytes,1,opt,name=spec" json:"spec,omitempty"` +} + +func (m *CreateSecretRequest) Reset() { *m = CreateSecretRequest{} } +func (*CreateSecretRequest) ProtoMessage() {} +func (*CreateSecretRequest) Descriptor() ([]byte, []int) { return fileDescriptorSecrets, []int{4} } + +type CreateSecretResponse struct { + Secret *Secret `protobuf:"bytes,1,opt,name=secret" json:"secret,omitempty"` +} + +func (m *CreateSecretResponse) Reset() { *m = CreateSecretResponse{} } +func (*CreateSecretResponse) ProtoMessage() {} +func (*CreateSecretResponse) Descriptor() ([]byte, []int) { return fileDescriptorSecrets, []int{5} } + +type UpdateSecretRequest struct { + Spec *SecretSpec `protobuf:"bytes,1,opt,name=spec" json:"spec,omitempty"` +} + +func (m *UpdateSecretRequest) Reset() { *m = UpdateSecretRequest{} } +func (*UpdateSecretRequest) ProtoMessage() {} +func (*UpdateSecretRequest) Descriptor() ([]byte, []int) { return fileDescriptorSecrets, []int{6} } + +type UpdateSecretResponse struct { + Secret *Secret `protobuf:"bytes,1,opt,name=secret" json:"secret,omitempty"` +} + +func (m *UpdateSecretResponse) Reset() { *m = UpdateSecretResponse{} } +func (*UpdateSecretResponse) ProtoMessage() {} +func (*UpdateSecretResponse) Descriptor() ([]byte, []int) { return fileDescriptorSecrets, []int{7} } + +type RemoveSecretRequest struct { + // Name is name of the secret to remove. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Version is the version to remove + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` +} + +func (m *RemoveSecretRequest) Reset() { *m = RemoveSecretRequest{} } +func (*RemoveSecretRequest) ProtoMessage() {} +func (*RemoveSecretRequest) Descriptor() ([]byte, []int) { return fileDescriptorSecrets, []int{8} } + +type RemoveSecretResponse struct { +} + +func (m *RemoveSecretResponse) Reset() { *m = RemoveSecretResponse{} } +func (*RemoveSecretResponse) ProtoMessage() {} +func (*RemoveSecretResponse) Descriptor() ([]byte, []int) { return fileDescriptorSecrets, []int{9} } + +func init() { + proto.RegisterType((*GetSecretRequest)(nil), "docker.swarmkit.v1.GetSecretRequest") + proto.RegisterType((*GetSecretResponse)(nil), "docker.swarmkit.v1.GetSecretResponse") + proto.RegisterType((*ListSecretsRequest)(nil), "docker.swarmkit.v1.ListSecretsRequest") + proto.RegisterType((*ListSecretsRequest_Filters)(nil), "docker.swarmkit.v1.ListSecretsRequest.Filters") + proto.RegisterType((*ListSecretsResponse)(nil), "docker.swarmkit.v1.ListSecretsResponse") + proto.RegisterType((*CreateSecretRequest)(nil), "docker.swarmkit.v1.CreateSecretRequest") + proto.RegisterType((*CreateSecretResponse)(nil), "docker.swarmkit.v1.CreateSecretResponse") + proto.RegisterType((*UpdateSecretRequest)(nil), "docker.swarmkit.v1.UpdateSecretRequest") + proto.RegisterType((*UpdateSecretResponse)(nil), "docker.swarmkit.v1.UpdateSecretResponse") + proto.RegisterType((*RemoveSecretRequest)(nil), "docker.swarmkit.v1.RemoveSecretRequest") + proto.RegisterType((*RemoveSecretResponse)(nil), "docker.swarmkit.v1.RemoveSecretResponse") +} + +type authenticatedWrapperSecretsServer struct { + local SecretsServer + authorize func(context.Context, []string) error +} + +func NewAuthenticatedWrapperSecretsServer(local SecretsServer, authorize func(context.Context, []string) error) SecretsServer { + return &authenticatedWrapperSecretsServer{ + local: local, + authorize: authorize, + } +} + +func (p *authenticatedWrapperSecretsServer) GetSecret(ctx context.Context, r *GetSecretRequest) (*GetSecretResponse, error) { + + if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil { + return nil, err + } + return p.local.GetSecret(ctx, r) +} + +func (p *authenticatedWrapperSecretsServer) ListSecrets(ctx context.Context, r *ListSecretsRequest) (*ListSecretsResponse, error) { + + if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil { + return nil, err + } + return p.local.ListSecrets(ctx, r) +} + +func (p *authenticatedWrapperSecretsServer) CreateSecret(ctx context.Context, r *CreateSecretRequest) (*CreateSecretResponse, error) { + + if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil { + return nil, err + } + return p.local.CreateSecret(ctx, r) +} + +func (p *authenticatedWrapperSecretsServer) UpdateSecret(ctx context.Context, r *UpdateSecretRequest) (*UpdateSecretResponse, error) { + + if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil { + return nil, err + } + return p.local.UpdateSecret(ctx, r) +} + +func (p *authenticatedWrapperSecretsServer) RemoveSecret(ctx context.Context, r *RemoveSecretRequest) (*RemoveSecretResponse, error) { + + if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil { + return nil, err + } + return p.local.RemoveSecret(ctx, r) +} + +func (m *GetSecretRequest) Copy() *GetSecretRequest { + if m == nil { + return nil + } + + o := &GetSecretRequest{ + Name: m.Name, + } + + return o +} + +func (m *GetSecretResponse) Copy() *GetSecretResponse { + if m == nil { + return nil + } + + o := &GetSecretResponse{ + Secret: m.Secret.Copy(), + } + + return o +} + +func (m *ListSecretsRequest) Copy() *ListSecretsRequest { + if m == nil { + return nil + } + + o := &ListSecretsRequest{ + Filters: m.Filters.Copy(), + } + + return o +} + +func (m *ListSecretsRequest_Filters) Copy() *ListSecretsRequest_Filters { + if m == nil { + return nil + } + + o := &ListSecretsRequest_Filters{} + + if m.Names != nil { + o.Names = make([]string, 0, len(m.Names)) + for _, v := range m.Names { + o.Names = append(o.Names, v) + } + } + + if m.NamePrefixes != nil { + o.NamePrefixes = make([]string, 0, len(m.NamePrefixes)) + for _, v := range m.NamePrefixes { + o.NamePrefixes = append(o.NamePrefixes, v) + } + } + + return o +} + +func (m *ListSecretsResponse) Copy() *ListSecretsResponse { + if m == nil { + return nil + } + + o := &ListSecretsResponse{} + + if m.Secrets != nil { + o.Secrets = make([]*Secret, 0, len(m.Secrets)) + for _, v := range m.Secrets { + o.Secrets = append(o.Secrets, v.Copy()) + } + } + + return o +} + +func (m *CreateSecretRequest) Copy() *CreateSecretRequest { + if m == nil { + return nil + } + + o := &CreateSecretRequest{ + Spec: m.Spec.Copy(), + } + + return o +} + +func (m *CreateSecretResponse) Copy() *CreateSecretResponse { + if m == nil { + return nil + } + + o := &CreateSecretResponse{ + Secret: m.Secret.Copy(), + } + + return o +} + +func (m *UpdateSecretRequest) Copy() *UpdateSecretRequest { + if m == nil { + return nil + } + + o := &UpdateSecretRequest{ + Spec: m.Spec.Copy(), + } + + return o +} + +func (m *UpdateSecretResponse) Copy() *UpdateSecretResponse { + if m == nil { + return nil + } + + o := &UpdateSecretResponse{ + Secret: m.Secret.Copy(), + } + + return o +} + +func (m *RemoveSecretRequest) Copy() *RemoveSecretRequest { + if m == nil { + return nil + } + + o := &RemoveSecretRequest{ + Name: m.Name, + Version: m.Version, + } + + return o +} + +func (m *RemoveSecretResponse) Copy() *RemoveSecretResponse { + if m == nil { + return nil + } + + o := &RemoveSecretResponse{} + + return o +} + +func (this *GetSecretRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&api.GetSecretRequest{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GetSecretResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&api.GetSecretResponse{") + if this.Secret != nil { + s = append(s, "Secret: "+fmt.Sprintf("%#v", this.Secret)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ListSecretsRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&api.ListSecretsRequest{") + if this.Filters != nil { + s = append(s, "Filters: "+fmt.Sprintf("%#v", this.Filters)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ListSecretsRequest_Filters) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&api.ListSecretsRequest_Filters{") + s = append(s, "Names: "+fmt.Sprintf("%#v", this.Names)+",\n") + s = append(s, "NamePrefixes: "+fmt.Sprintf("%#v", this.NamePrefixes)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ListSecretsResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&api.ListSecretsResponse{") + if this.Secrets != nil { + s = append(s, "Secrets: "+fmt.Sprintf("%#v", this.Secrets)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CreateSecretRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&api.CreateSecretRequest{") + if this.Spec != nil { + s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CreateSecretResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&api.CreateSecretResponse{") + if this.Secret != nil { + s = append(s, "Secret: "+fmt.Sprintf("%#v", this.Secret)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UpdateSecretRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&api.UpdateSecretRequest{") + if this.Spec != nil { + s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UpdateSecretResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&api.UpdateSecretResponse{") + if this.Secret != nil { + s = append(s, "Secret: "+fmt.Sprintf("%#v", this.Secret)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *RemoveSecretRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&api.RemoveSecretRequest{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Version: "+fmt.Sprintf("%#v", this.Version)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *RemoveSecretResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&api.RemoveSecretResponse{") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringSecrets(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func extensionToGoStringSecrets(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "map[int32]proto.Extension{" + keys := make([]int, 0, len(e)) + for k := range e { + keys = append(keys, int(k)) + } + sort.Ints(keys) + ss := []string{} + for _, k := range keys { + ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) + } + s += strings.Join(ss, ",") + "}" + return s +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion2 + +// Client API for Secrets service + +type SecretsClient interface { + GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*GetSecretResponse, error) + ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error) + CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*CreateSecretResponse, error) + UpdateSecret(ctx context.Context, in *UpdateSecretRequest, opts ...grpc.CallOption) (*UpdateSecretResponse, error) + RemoveSecret(ctx context.Context, in *RemoveSecretRequest, opts ...grpc.CallOption) (*RemoveSecretResponse, error) +} + +type secretsClient struct { + cc *grpc.ClientConn +} + +func NewSecretsClient(cc *grpc.ClientConn) SecretsClient { + return &secretsClient{cc} +} + +func (c *secretsClient) GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*GetSecretResponse, error) { + out := new(GetSecretResponse) + err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Secrets/GetSecret", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *secretsClient) ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error) { + out := new(ListSecretsResponse) + err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Secrets/ListSecrets", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *secretsClient) CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*CreateSecretResponse, error) { + out := new(CreateSecretResponse) + err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Secrets/CreateSecret", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *secretsClient) UpdateSecret(ctx context.Context, in *UpdateSecretRequest, opts ...grpc.CallOption) (*UpdateSecretResponse, error) { + out := new(UpdateSecretResponse) + err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Secrets/UpdateSecret", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *secretsClient) RemoveSecret(ctx context.Context, in *RemoveSecretRequest, opts ...grpc.CallOption) (*RemoveSecretResponse, error) { + out := new(RemoveSecretResponse) + err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Secrets/RemoveSecret", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Secrets service + +type SecretsServer interface { + GetSecret(context.Context, *GetSecretRequest) (*GetSecretResponse, error) + ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error) + CreateSecret(context.Context, *CreateSecretRequest) (*CreateSecretResponse, error) + UpdateSecret(context.Context, *UpdateSecretRequest) (*UpdateSecretResponse, error) + RemoveSecret(context.Context, *RemoveSecretRequest) (*RemoveSecretResponse, error) +} + +func RegisterSecretsServer(s *grpc.Server, srv SecretsServer) { + s.RegisterService(&_Secrets_serviceDesc, srv) +} + +func _Secrets_GetSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SecretsServer).GetSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/docker.swarmkit.v1.Secrets/GetSecret", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SecretsServer).GetSecret(ctx, req.(*GetSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Secrets_ListSecrets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSecretsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SecretsServer).ListSecrets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/docker.swarmkit.v1.Secrets/ListSecrets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SecretsServer).ListSecrets(ctx, req.(*ListSecretsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Secrets_CreateSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SecretsServer).CreateSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/docker.swarmkit.v1.Secrets/CreateSecret", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SecretsServer).CreateSecret(ctx, req.(*CreateSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Secrets_UpdateSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SecretsServer).UpdateSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/docker.swarmkit.v1.Secrets/UpdateSecret", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SecretsServer).UpdateSecret(ctx, req.(*UpdateSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Secrets_RemoveSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SecretsServer).RemoveSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/docker.swarmkit.v1.Secrets/RemoveSecret", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SecretsServer).RemoveSecret(ctx, req.(*RemoveSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Secrets_serviceDesc = grpc.ServiceDesc{ + ServiceName: "docker.swarmkit.v1.Secrets", + HandlerType: (*SecretsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetSecret", + Handler: _Secrets_GetSecret_Handler, + }, + { + MethodName: "ListSecrets", + Handler: _Secrets_ListSecrets_Handler, + }, + { + MethodName: "CreateSecret", + Handler: _Secrets_CreateSecret_Handler, + }, + { + MethodName: "UpdateSecret", + Handler: _Secrets_UpdateSecret_Handler, + }, + { + MethodName: "RemoveSecret", + Handler: _Secrets_RemoveSecret_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, +} + +func (m *GetSecretRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *GetSecretRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + data[i] = 0xa + i++ + i = encodeVarintSecrets(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + } + return i, nil +} + +func (m *GetSecretResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *GetSecretResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Secret != nil { + data[i] = 0xa + i++ + i = encodeVarintSecrets(data, i, uint64(m.Secret.Size())) + n1, err := m.Secret.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + return i, nil +} + +func (m *ListSecretsRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ListSecretsRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Filters != nil { + data[i] = 0xa + i++ + i = encodeVarintSecrets(data, i, uint64(m.Filters.Size())) + n2, err := m.Filters.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} + +func (m *ListSecretsRequest_Filters) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ListSecretsRequest_Filters) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Names) > 0 { + for _, s := range m.Names { + data[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.NamePrefixes) > 0 { + for _, s := range m.NamePrefixes { + data[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + return i, nil +} + +func (m *ListSecretsResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ListSecretsResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Secrets) > 0 { + for _, msg := range m.Secrets { + data[i] = 0xa + i++ + i = encodeVarintSecrets(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *CreateSecretRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CreateSecretRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Spec != nil { + data[i] = 0xa + i++ + i = encodeVarintSecrets(data, i, uint64(m.Spec.Size())) + n3, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + } + return i, nil +} + +func (m *CreateSecretResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CreateSecretResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Secret != nil { + data[i] = 0xa + i++ + i = encodeVarintSecrets(data, i, uint64(m.Secret.Size())) + n4, err := m.Secret.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} + +func (m *UpdateSecretRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UpdateSecretRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Spec != nil { + data[i] = 0xa + i++ + i = encodeVarintSecrets(data, i, uint64(m.Spec.Size())) + n5, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} + +func (m *UpdateSecretResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UpdateSecretResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Secret != nil { + data[i] = 0xa + i++ + i = encodeVarintSecrets(data, i, uint64(m.Secret.Size())) + n6, err := m.Secret.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + } + return i, nil +} + +func (m *RemoveSecretRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RemoveSecretRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + data[i] = 0xa + i++ + i = encodeVarintSecrets(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + } + if len(m.Version) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintSecrets(data, i, uint64(len(m.Version))) + i += copy(data[i:], m.Version) + } + return i, nil +} + +func (m *RemoveSecretResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RemoveSecretResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func encodeFixed64Secrets(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Secrets(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintSecrets(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} + +type raftProxySecretsServer struct { + local SecretsServer + connSelector raftpicker.Interface + cluster raftpicker.RaftCluster + ctxMods []func(context.Context) (context.Context, error) +} + +func NewRaftProxySecretsServer(local SecretsServer, connSelector raftpicker.Interface, cluster raftpicker.RaftCluster, ctxMod func(context.Context) (context.Context, error)) SecretsServer { + redirectChecker := func(ctx context.Context) (context.Context, error) { + s, ok := transport.StreamFromContext(ctx) + if !ok { + return ctx, grpc.Errorf(codes.InvalidArgument, "remote addr is not found in context") + } + addr := s.ServerTransport().RemoteAddr().String() + md, ok := metadata.FromContext(ctx) + if ok && len(md["redirect"]) != 0 { + return ctx, grpc.Errorf(codes.ResourceExhausted, "more than one redirect to leader from: %s", md["redirect"]) + } + if !ok { + md = metadata.New(map[string]string{}) + } + md["redirect"] = append(md["redirect"], addr) + return metadata.NewContext(ctx, md), nil + } + mods := []func(context.Context) (context.Context, error){redirectChecker} + mods = append(mods, ctxMod) + + return &raftProxySecretsServer{ + local: local, + cluster: cluster, + connSelector: connSelector, + ctxMods: mods, + } +} +func (p *raftProxySecretsServer) runCtxMods(ctx context.Context) (context.Context, error) { + var err error + for _, mod := range p.ctxMods { + ctx, err = mod(ctx) + if err != nil { + return ctx, err + } + } + return ctx, nil +} + +func (p *raftProxySecretsServer) GetSecret(ctx context.Context, r *GetSecretRequest) (*GetSecretResponse, error) { + + if p.cluster.IsLeader() { + return p.local.GetSecret(ctx, r) + } + ctx, err := p.runCtxMods(ctx) + if err != nil { + return nil, err + } + conn, err := p.connSelector.Conn() + if err != nil { + return nil, err + } + + defer func() { + if err != nil { + errStr := err.Error() + if strings.Contains(errStr, grpc.ErrClientConnClosing.Error()) || + strings.Contains(errStr, grpc.ErrClientConnTimeout.Error()) || + strings.Contains(errStr, "connection error") || + grpc.Code(err) == codes.Internal { + p.connSelector.Reset() + } + } + }() + + return NewSecretsClient(conn).GetSecret(ctx, r) +} + +func (p *raftProxySecretsServer) ListSecrets(ctx context.Context, r *ListSecretsRequest) (*ListSecretsResponse, error) { + + if p.cluster.IsLeader() { + return p.local.ListSecrets(ctx, r) + } + ctx, err := p.runCtxMods(ctx) + if err != nil { + return nil, err + } + conn, err := p.connSelector.Conn() + if err != nil { + return nil, err + } + + defer func() { + if err != nil { + errStr := err.Error() + if strings.Contains(errStr, grpc.ErrClientConnClosing.Error()) || + strings.Contains(errStr, grpc.ErrClientConnTimeout.Error()) || + strings.Contains(errStr, "connection error") || + grpc.Code(err) == codes.Internal { + p.connSelector.Reset() + } + } + }() + + return NewSecretsClient(conn).ListSecrets(ctx, r) +} + +func (p *raftProxySecretsServer) CreateSecret(ctx context.Context, r *CreateSecretRequest) (*CreateSecretResponse, error) { + + if p.cluster.IsLeader() { + return p.local.CreateSecret(ctx, r) + } + ctx, err := p.runCtxMods(ctx) + if err != nil { + return nil, err + } + conn, err := p.connSelector.Conn() + if err != nil { + return nil, err + } + + defer func() { + if err != nil { + errStr := err.Error() + if strings.Contains(errStr, grpc.ErrClientConnClosing.Error()) || + strings.Contains(errStr, grpc.ErrClientConnTimeout.Error()) || + strings.Contains(errStr, "connection error") || + grpc.Code(err) == codes.Internal { + p.connSelector.Reset() + } + } + }() + + return NewSecretsClient(conn).CreateSecret(ctx, r) +} + +func (p *raftProxySecretsServer) UpdateSecret(ctx context.Context, r *UpdateSecretRequest) (*UpdateSecretResponse, error) { + + if p.cluster.IsLeader() { + return p.local.UpdateSecret(ctx, r) + } + ctx, err := p.runCtxMods(ctx) + if err != nil { + return nil, err + } + conn, err := p.connSelector.Conn() + if err != nil { + return nil, err + } + + defer func() { + if err != nil { + errStr := err.Error() + if strings.Contains(errStr, grpc.ErrClientConnClosing.Error()) || + strings.Contains(errStr, grpc.ErrClientConnTimeout.Error()) || + strings.Contains(errStr, "connection error") || + grpc.Code(err) == codes.Internal { + p.connSelector.Reset() + } + } + }() + + return NewSecretsClient(conn).UpdateSecret(ctx, r) +} + +func (p *raftProxySecretsServer) RemoveSecret(ctx context.Context, r *RemoveSecretRequest) (*RemoveSecretResponse, error) { + + if p.cluster.IsLeader() { + return p.local.RemoveSecret(ctx, r) + } + ctx, err := p.runCtxMods(ctx) + if err != nil { + return nil, err + } + conn, err := p.connSelector.Conn() + if err != nil { + return nil, err + } + + defer func() { + if err != nil { + errStr := err.Error() + if strings.Contains(errStr, grpc.ErrClientConnClosing.Error()) || + strings.Contains(errStr, grpc.ErrClientConnTimeout.Error()) || + strings.Contains(errStr, "connection error") || + grpc.Code(err) == codes.Internal { + p.connSelector.Reset() + } + } + }() + + return NewSecretsClient(conn).RemoveSecret(ctx, r) +} + +func (m *GetSecretRequest) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovSecrets(uint64(l)) + } + return n +} + +func (m *GetSecretResponse) Size() (n int) { + var l int + _ = l + if m.Secret != nil { + l = m.Secret.Size() + n += 1 + l + sovSecrets(uint64(l)) + } + return n +} + +func (m *ListSecretsRequest) Size() (n int) { + var l int + _ = l + if m.Filters != nil { + l = m.Filters.Size() + n += 1 + l + sovSecrets(uint64(l)) + } + return n +} + +func (m *ListSecretsRequest_Filters) Size() (n int) { + var l int + _ = l + if len(m.Names) > 0 { + for _, s := range m.Names { + l = len(s) + n += 1 + l + sovSecrets(uint64(l)) + } + } + if len(m.NamePrefixes) > 0 { + for _, s := range m.NamePrefixes { + l = len(s) + n += 1 + l + sovSecrets(uint64(l)) + } + } + return n +} + +func (m *ListSecretsResponse) Size() (n int) { + var l int + _ = l + if len(m.Secrets) > 0 { + for _, e := range m.Secrets { + l = e.Size() + n += 1 + l + sovSecrets(uint64(l)) + } + } + return n +} + +func (m *CreateSecretRequest) Size() (n int) { + var l int + _ = l + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovSecrets(uint64(l)) + } + return n +} + +func (m *CreateSecretResponse) Size() (n int) { + var l int + _ = l + if m.Secret != nil { + l = m.Secret.Size() + n += 1 + l + sovSecrets(uint64(l)) + } + return n +} + +func (m *UpdateSecretRequest) Size() (n int) { + var l int + _ = l + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovSecrets(uint64(l)) + } + return n +} + +func (m *UpdateSecretResponse) Size() (n int) { + var l int + _ = l + if m.Secret != nil { + l = m.Secret.Size() + n += 1 + l + sovSecrets(uint64(l)) + } + return n +} + +func (m *RemoveSecretRequest) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovSecrets(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovSecrets(uint64(l)) + } + return n +} + +func (m *RemoveSecretResponse) Size() (n int) { + var l int + _ = l + return n +} + +func sovSecrets(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozSecrets(x uint64) (n int) { + return sovSecrets(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *GetSecretRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetSecretRequest{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *GetSecretResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetSecretResponse{`, + `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "Secret", "Secret", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ListSecretsRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListSecretsRequest{`, + `Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "ListSecretsRequest_Filters", "ListSecretsRequest_Filters", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ListSecretsRequest_Filters) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListSecretsRequest_Filters{`, + `Names:` + fmt.Sprintf("%v", this.Names) + `,`, + `NamePrefixes:` + fmt.Sprintf("%v", this.NamePrefixes) + `,`, + `}`, + }, "") + return s +} +func (this *ListSecretsResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListSecretsResponse{`, + `Secrets:` + strings.Replace(fmt.Sprintf("%v", this.Secrets), "Secret", "Secret", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CreateSecretRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateSecretRequest{`, + `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "SecretSpec", "SecretSpec", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CreateSecretResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateSecretResponse{`, + `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "Secret", "Secret", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateSecretRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateSecretRequest{`, + `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "SecretSpec", "SecretSpec", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateSecretResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateSecretResponse{`, + `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "Secret", "Secret", 1) + `,`, + `}`, + }, "") + return s +} +func (this *RemoveSecretRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemoveSecretRequest{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `}`, + }, "") + return s +} +func (this *RemoveSecretResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemoveSecretResponse{`, + `}`, + }, "") + return s +} +func valueToStringSecrets(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *GetSecretRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetSecretRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSecretRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSecrets + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSecrets(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSecrets + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetSecretResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetSecretResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSecretResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSecrets + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Secret == nil { + m.Secret = &Secret{} + } + if err := m.Secret.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSecrets(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSecrets + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListSecretsRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListSecretsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListSecretsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSecrets + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Filters == nil { + m.Filters = &ListSecretsRequest_Filters{} + } + if err := m.Filters.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSecrets(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSecrets + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListSecretsRequest_Filters) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Filters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Filters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSecrets + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Names = append(m.Names, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NamePrefixes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSecrets + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NamePrefixes = append(m.NamePrefixes, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSecrets(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSecrets + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListSecretsResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListSecretsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListSecretsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSecrets + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Secrets = append(m.Secrets, &Secret{}) + if err := m.Secrets[len(m.Secrets)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSecrets(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSecrets + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateSecretRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateSecretRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateSecretRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSecrets + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Spec == nil { + m.Spec = &SecretSpec{} + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSecrets(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSecrets + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateSecretResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateSecretResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateSecretResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSecrets + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Secret == nil { + m.Secret = &Secret{} + } + if err := m.Secret.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSecrets(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSecrets + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateSecretRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateSecretRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateSecretRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSecrets + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Spec == nil { + m.Spec = &SecretSpec{} + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSecrets(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSecrets + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateSecretResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateSecretResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateSecretResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSecrets + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Secret == nil { + m.Secret = &Secret{} + } + if err := m.Secret.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSecrets(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSecrets + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveSecretRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveSecretRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveSecretRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSecrets + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSecrets + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSecrets(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSecrets + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveSecretResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSecrets + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveSecretResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveSecretResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipSecrets(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSecrets + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSecrets(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSecrets + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSecrets + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSecrets + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthSecrets + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSecrets + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipSecrets(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthSecrets = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSecrets = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorSecrets = []byte{ + // 484 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x54, 0x41, 0x6e, 0xd3, 0x40, + 0x14, 0xad, 0x43, 0xa8, 0x95, 0x9f, 0x46, 0xc0, 0x38, 0xa0, 0x68, 0x84, 0x46, 0x68, 0x80, 0x92, + 0x0d, 0x46, 0x04, 0x4e, 0x40, 0x11, 0xa5, 0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0x56, 0x3e, 0x4b, 0x40, 0xe9, 0xb8, 0x1d, 0xd8, 0xaa, 0x5c, 0x8f, 0x85, + 0x5d, 0xd9, 0x92, 0x41, 0xbb, 0xb2, 0x2d, 0x61, 0x4b, 0x94, 0xeb, 0xfb, 0xb7, 0x2b, 0x5b, 0x62, + 0x66, 0x57, 0xb6, 0x45, 0xe9, 0x1c, 0xe5, 0x27, 0x37, 0x4f, 0x17, 0x6c, 0xed, 0xfb, 0x82, 0xad, + 0xfd, 0x5e, 0x30, 0xe7, 0x63, 0xce, 0x9c, 0xd3, 0x9c, 0x39, 0xdf, 0x72, 0xe6, 0xfc, 0xcc, 0x99, + 0xb3, 0xb7, 0xae, 0x3f, 0xbb, 0x8f, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x0f, 0xdc, 0x27, 0x76, + 0xcc, 0x05, 0x00, 0x00, +} diff --git a/api/secrets.proto b/api/secrets.proto new file mode 100644 index 0000000000..33b2f1ddd7 --- /dev/null +++ b/api/secrets.proto @@ -0,0 +1,77 @@ +syntax = "proto3"; + +package docker.swarmkit.v1; + +import "specs.proto"; +import "objects.proto"; +import "plugin/plugin.proto"; + +// Secrets defines the RPC methods for controlling secrets in a cluster. +service Secrets { + rpc GetSecret(GetSecretRequest) returns (GetSecretResponse) { + option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-manager" }; + } + rpc ListSecrets(ListSecretsRequest) returns (ListSecretsResponse) { + option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-manager" }; + } + rpc CreateSecret(CreateSecretRequest) returns (CreateSecretResponse) { + option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-manager" }; + } + rpc UpdateSecret(UpdateSecretRequest) returns (UpdateSecretResponse) { + option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-manager" }; + } + rpc RemoveSecret(RemoveSecretRequest) returns (RemoveSecretResponse) { + option (docker.protobuf.plugin.tls_authorization) = { roles: "swarm-manager" }; + } +} + +message GetSecretRequest { + // Name is name of the secret to get info for. + string name = 1; +} + +message GetSecretResponse { + // Secret is the secret corresponding to that ID, but each version in `secret.spec.data` should have its `.data` field be nil + Secret secret = 1; +} + +message ListSecretsRequest { + message Filters { + repeated string names = 1; + repeated string name_prefixes = 2; + } + + Filters filters = 1; +} + +message ListSecretsResponse { + // Each Secret is the secret corresponding to that ID, but each version in `secret.spec.data` should have its `.data` field be nil + repeated Secret secrets = 1; +} + +// Note CreateSecretRequest does not contain a SecretSpec, since that can contain multiple SecretData objects, which have digests +// which should be generated by the +message CreateSecretRequest { + SecretSpec spec = 1; +} + +message CreateSecretResponse { + Secret secret = 1; +} + +message UpdateSecretRequest { + SecretSpec spec = 1; +} + +message UpdateSecretResponse { + Secret secret = 1; +} + +message RemoveSecretRequest { + // Name is name of the secret to remove. + string name = 1; + // Version is the version to remove + string version = 2; +} + +message RemoveSecretResponse {} diff --git a/api/specs.pb.go b/api/specs.pb.go index fcc1f2252a..b81180d67e 100644 --- a/api/specs.pb.go +++ b/api/specs.pb.go @@ -9,6 +9,7 @@ import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" import docker_swarmkit_v11 "github.com/docker/swarmkit/api/duration" +import docker_swarmkit_v1 "github.com/docker/swarmkit/api/timestamp" import strings "strings" import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" @@ -565,6 +566,8 @@ type SecretSpec struct { Type SecretType `protobuf:"varint,2,opt,name=type,proto3,enum=docker.swarmkit.v1.SecretType" json:"type,omitempty"` // Secret payload. Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + // When this secret-spec should expire and no longer be available + Expiry *docker_swarmkit_v1.Timestamp `protobuf:"bytes,4,opt,name=expiry" json:"expiry,omitempty"` } func (m *SecretSpec) Reset() { *m = SecretSpec{} } @@ -852,6 +855,7 @@ func (m *SecretSpec) Copy() *SecretSpec { Annotations: *m.Annotations.Copy(), Type: m.Type, Data: m.Data, + Expiry: m.Expiry.Copy(), } return o @@ -1084,11 +1088,14 @@ func (this *SecretSpec) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) + s := make([]string, 0, 8) s = append(s, "&api.SecretSpec{") s = append(s, "Annotations: "+strings.Replace(this.Annotations.GoString(), `&`, ``, 1)+",\n") s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + if this.Expiry != nil { + s = append(s, "Expiry: "+fmt.Sprintf("%#v", this.Expiry)+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -1831,6 +1838,16 @@ func (m *SecretSpec) MarshalTo(data []byte) (int, error) { i = encodeVarintSpecs(data, i, uint64(len(m.Data))) i += copy(data[i:], m.Data) } + if m.Expiry != nil { + data[i] = 0x22 + i++ + i = encodeVarintSpecs(data, i, uint64(m.Expiry.Size())) + n29, err := m.Expiry.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n29 + } return i, nil } @@ -2150,6 +2167,10 @@ func (m *SecretSpec) Size() (n int) { if l > 0 { n += 1 + l + sovSpecs(uint64(l)) } + if m.Expiry != nil { + l = m.Expiry.Size() + n += 1 + l + sovSpecs(uint64(l)) + } return n } @@ -2369,6 +2390,7 @@ func (this *SecretSpec) String() string { `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `Expiry:` + strings.Replace(fmt.Sprintf("%v", this.Expiry), "Timestamp", "docker_swarmkit_v1.Timestamp", 1) + `,`, `}`, }, "") return s @@ -4510,6 +4532,39 @@ func (m *SecretSpec) Unmarshal(data []byte) error { m.Data = []byte{} } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Expiry", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpecs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpecs + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Expiry == nil { + m.Expiry = &docker_swarmkit_v1.Timestamp{} + } + if err := m.Expiry.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSpecs(data[iNdEx:]) @@ -4637,97 +4692,99 @@ var ( ) var fileDescriptorSpecs = []byte{ - // 1461 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x57, 0x4f, 0x6f, 0xdb, 0xc8, - 0x15, 0x17, 0x6d, 0x5a, 0x96, 0x1e, 0xe5, 0x44, 0x19, 0xe4, 0x0f, 0xa3, 0xa4, 0xb2, 0xa2, 0xa4, - 0xa9, 0xd3, 0xa2, 0x76, 0xab, 0x16, 0x69, 0xd2, 0x34, 0x68, 0xf5, 0xaf, 0x8e, 0xea, 0xda, 0x11, - 0xc6, 0x4e, 0x80, 0x9e, 0x84, 0x31, 0x39, 0x96, 0x09, 0x53, 0x1c, 0x76, 0x38, 0x54, 0xe0, 0x5b, - 0x8f, 0x81, 0x0f, 0xfd, 0x06, 0x3e, 0x15, 0xe8, 0x37, 0xe8, 0x77, 0xc8, 0xb1, 0xc7, 0x3d, 0x19, - 0x6b, 0x5f, 0x17, 0x0b, 0x2c, 0xb0, 0x5f, 0x60, 0x31, 0xc3, 0x91, 0x44, 0x6d, 0xe8, 0x24, 0xc0, - 0xfa, 0x36, 0xf3, 0xf8, 0xfb, 0xbd, 0x79, 0x7c, 0xef, 0xc7, 0xf7, 0x86, 0x60, 0x45, 0x21, 0x75, - 0xa2, 0xf5, 0x90, 0x33, 0xc1, 0x10, 0x72, 0x99, 0x73, 0x44, 0xf9, 0x7a,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, 0x29, 0x56, 0x58, 0x39, 0x91, 0x5c, 0x22, 0x88, 0xaa, - 0x7b, 0x09, 0xab, 0x75, 0xeb, 0xfe, 0x87, 0xf3, 0x6a, 0xee, 0xab, 0xf3, 0x6a, 0xee, 0xbb, 0xf3, - 0xaa, 0xf1, 0xaf, 0x8b, 0xaa, 0xf1, 0xe1, 0xa2, 0x6a, 0xfc, 0xff, 0xa2, 0x6a, 0x7c, 0x7d, 0x51, - 0x35, 0xf6, 0xf3, 0xea, 0xef, 0xef, 0x77, 0x3f, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x1b, 0xa1, - 0x1a, 0x5c, 0x0e, 0x00, 0x00, + // 1493 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x57, 0xcd, 0x6e, 0xdb, 0xc6, + 0x16, 0x16, 0x6d, 0x5a, 0x96, 0x0e, 0xe5, 0x44, 0x19, 0xe4, 0x87, 0x51, 0x72, 0x65, 0x45, 0xc9, + 0xcd, 0x75, 0xee, 0xc5, 0xb5, 0xef, 0x55, 0xdb, 0x34, 0x69, 0x1a, 0xb4, 0xfa, 0xab, 0xa3, 0xba, + 0x76, 0x84, 0xb1, 0x13, 0xa0, 0x2b, 0x61, 0x4c, 0x8e, 0x65, 0xc2, 0x14, 0xc9, 0x0e, 0x87, 0x4a, + 0xb5, 0xeb, 0x32, 0xf0, 0xa2, 0x6f, 0xe0, 0x55, 0x81, 0xbe, 0x41, 0xdf, 0x21, 0xcb, 0x2e, 0xba, + 0xe8, 0xca, 0xa8, 0xbd, 0x2d, 0x0a, 0x14, 0xe8, 0x0b, 0x14, 0x33, 0x1c, 0x49, 0x54, 0x43, 0x27, + 0x01, 0xea, 0xdd, 0xcc, 0xe1, 0xf7, 0x9d, 0x39, 0x3c, 0xe7, 0xe3, 0x39, 0x43, 0x30, 0xc2, 0x80, + 0x5a, 0xe1, 0x6a, 0xc0, 0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, 0x84, 0xad, 0xfa, 0x93, + 0x06, 0x10, 0xb7, 0xb8, 0xf3, 0xd5, 0x49, 0x0d, 0x74, 0xf1, 0xa7, 0xa7, 0x7e, 0x9d, 0xca, 0x67, + 0x77, 0xd6, 0x9d, 0x51, 0x40, 0xb1, 0xc4, 0x8a, 0x89, 0x64, 0x13, 0x4e, 0x64, 0xdd, 0x0b, 0x58, + 0xae, 0xd1, 0x07, 0x90, 0xa5, 0x5f, 0x07, 0x0e, 0x1b, 0xa9, 0x0a, 0xa6, 0xde, 0x64, 0x76, 0xc6, + 0x7f, 0x83, 0x58, 0x81, 0x1b, 0x37, 0x5f, 0x9d, 0x94, 0x33, 0x3f, 0x9f, 0x94, 0x33, 0xbf, 0x9f, + 0x94, 0xb5, 0x6f, 0x4e, 0xcb, 0xda, 0xab, 0xd3, 0xb2, 0xf6, 0xe3, 0x69, 0x59, 0xfb, 0xe5, 0xb4, + 0xac, 0xed, 0x66, 0xe5, 0x4f, 0xe3, 0x7b, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x5b, 0x76, 0x48, + 0xc7, 0xae, 0x0e, 0x00, 0x00, } diff --git a/api/specs.proto b/api/specs.proto index 92c865f4c6..062d2347ab 100644 --- a/api/specs.proto +++ b/api/specs.proto @@ -5,6 +5,7 @@ package docker.swarmkit.v1; import "types.proto"; import "gogoproto/gogo.proto"; import "duration/duration.proto"; // TODO(stevvooe): use our own until we fix gogoproto/deepcopy +import "timestamp/timestamp.proto"; // TODO(stevvooe): use our own until we fix gogoproto/deepcopy // Specs are container objects for user provided input. All creations and // updates are done through spec types. As a convention, user input from a spec @@ -285,4 +286,7 @@ message SecretSpec { // Secret payload. bytes data = 3; + + // When this secret-spec should expire and no longer be available + Timestamp expiry = 4; } diff --git a/api/types.pb.go b/api/types.pb.go index ef35faa67c..a7154519fe 100644 --- a/api/types.pb.go +++ b/api/types.pb.go @@ -16,6 +16,7 @@ raft.proto health.proto resource.proto + secrets.proto It has these top-level messages: Version @@ -151,6 +152,16 @@ AttachNetworkResponse DetachNetworkRequest DetachNetworkResponse + GetSecretRequest + GetSecretResponse + ListSecretsRequest + ListSecretsResponse + CreateSecretRequest + CreateSecretResponse + UpdateSecretRequest + UpdateSecretResponse + RemoveSecretRequest + RemoveSecretResponse */ package api