Files
zeekay 187be9e719 proto, settings: fix stale argoproj.argo_cd.v3 package path and hanzocd part-of drift
repository.proto and 11 sibling hand-written .proto files referenced
generated.proto's application/v1alpha1 types under the pre-fork package
path (github.com.argoproj.argo_cd.v3...); protoc silently kept compiling
because generated.proto still carried that same stale package too. Point
both at the real, mechanically-derived path
(github.com.hanzoai.cd.pkg.apis.application.v1alpha1, no v3 segment) and
regenerate everything protoc/go-to-protobuf own: generated.proto/pb.go,
every pkg/apiclient and reposerver/cmpserver/commitserver *.pb.go,
assets/swagger.json, and the CRD manifests.

That regeneration surfaced a second, unrelated bug: hack/gen-crd-spec
stamped app.kubernetes.io/part-of: cd on the CRDs, but
util/settings.isSettingsObject (and the ConfigMap informer built on it)
only ever recognizes part-of=hanzocd. The same wrong "cd" value was
baked into cmd/cd/commands/admin/settings.go's setSettingsMeta and the
shared test/testdata.go fixtures ~30 files import — util/settings' own
test suite was panicking on an empty slice because its fixture was
invisible to the informer it was supposedly seeding. Fixed the label
everywhere it's produced or asserted in the settings path; left the
~90 unrelated part-of:"cd" literals in other packages' local test
fixtures alone since they never touch this selector.

Also dropped 25 "TODO: Remove deprecated <dead upstream issue link>"
comments that duplicated the real explanation already sitting one line
away (a proper `Deprecated:` godoc, a cobra Deprecated field, or a
nolint:staticcheck marker) — kept the explanation, dropped the link, per
the standing rule for these citations.

And repointed the two Grafana dashboards' job selector from
argocd-server-metrics, a Service the manifests never create, to
hanzocd-server-metrics, the one they do.
2026-09-05 14:58:20 -07:00

1167 lines
33 KiB
Go
Generated

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: server/gpgkey/gpgkey.proto
// GPG public key service
//
// GPG public key API performs CRUD actions against GnuPGPublicKey resources
package gpgkey
import (
context "context"
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
v1alpha1 "github.com/hanzoai/cd/pkg/apis/application/v1alpha1"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// Message to query the server for configured GPG public keys
type GnuPGPublicKeyQuery struct {
// The GPG key ID to query for
KeyID string `protobuf:"bytes,1,opt,name=keyID,proto3" json:"keyID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GnuPGPublicKeyQuery) Reset() { *m = GnuPGPublicKeyQuery{} }
func (m *GnuPGPublicKeyQuery) String() string { return proto.CompactTextString(m) }
func (*GnuPGPublicKeyQuery) ProtoMessage() {}
func (*GnuPGPublicKeyQuery) Descriptor() ([]byte, []int) {
return fileDescriptor_8ba55a5eb76dc6fd, []int{0}
}
func (m *GnuPGPublicKeyQuery) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GnuPGPublicKeyQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GnuPGPublicKeyQuery.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *GnuPGPublicKeyQuery) XXX_Merge(src proto.Message) {
xxx_messageInfo_GnuPGPublicKeyQuery.Merge(m, src)
}
func (m *GnuPGPublicKeyQuery) XXX_Size() int {
return m.Size()
}
func (m *GnuPGPublicKeyQuery) XXX_DiscardUnknown() {
xxx_messageInfo_GnuPGPublicKeyQuery.DiscardUnknown(m)
}
var xxx_messageInfo_GnuPGPublicKeyQuery proto.InternalMessageInfo
func (m *GnuPGPublicKeyQuery) GetKeyID() string {
if m != nil {
return m.KeyID
}
return ""
}
// Request to create one or more public keys on the server
type GnuPGPublicKeyCreateRequest struct {
// Raw key data of the GPG key(s) to create
Publickey *v1alpha1.GnuPGPublicKey `protobuf:"bytes,1,opt,name=publickey,proto3" json:"publickey,omitempty"`
// Whether to upsert already existing public keys
Upsert bool `protobuf:"varint,2,opt,name=upsert,proto3" json:"upsert,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GnuPGPublicKeyCreateRequest) Reset() { *m = GnuPGPublicKeyCreateRequest{} }
func (m *GnuPGPublicKeyCreateRequest) String() string { return proto.CompactTextString(m) }
func (*GnuPGPublicKeyCreateRequest) ProtoMessage() {}
func (*GnuPGPublicKeyCreateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_8ba55a5eb76dc6fd, []int{1}
}
func (m *GnuPGPublicKeyCreateRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GnuPGPublicKeyCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GnuPGPublicKeyCreateRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *GnuPGPublicKeyCreateRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GnuPGPublicKeyCreateRequest.Merge(m, src)
}
func (m *GnuPGPublicKeyCreateRequest) XXX_Size() int {
return m.Size()
}
func (m *GnuPGPublicKeyCreateRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GnuPGPublicKeyCreateRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GnuPGPublicKeyCreateRequest proto.InternalMessageInfo
func (m *GnuPGPublicKeyCreateRequest) GetPublickey() *v1alpha1.GnuPGPublicKey {
if m != nil {
return m.Publickey
}
return nil
}
func (m *GnuPGPublicKeyCreateRequest) GetUpsert() bool {
if m != nil {
return m.Upsert
}
return false
}
// Response to a public key creation request
type GnuPGPublicKeyCreateResponse struct {
// List of GPG public keys that have been created
Created *v1alpha1.GnuPGPublicKeyList `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"`
// List of key IDs that haven been skipped because they already exist on the server
Skipped []string `protobuf:"bytes,2,rep,name=skipped,proto3" json:"skipped,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GnuPGPublicKeyCreateResponse) Reset() { *m = GnuPGPublicKeyCreateResponse{} }
func (m *GnuPGPublicKeyCreateResponse) String() string { return proto.CompactTextString(m) }
func (*GnuPGPublicKeyCreateResponse) ProtoMessage() {}
func (*GnuPGPublicKeyCreateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_8ba55a5eb76dc6fd, []int{2}
}
func (m *GnuPGPublicKeyCreateResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GnuPGPublicKeyCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GnuPGPublicKeyCreateResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *GnuPGPublicKeyCreateResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GnuPGPublicKeyCreateResponse.Merge(m, src)
}
func (m *GnuPGPublicKeyCreateResponse) XXX_Size() int {
return m.Size()
}
func (m *GnuPGPublicKeyCreateResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GnuPGPublicKeyCreateResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GnuPGPublicKeyCreateResponse proto.InternalMessageInfo
func (m *GnuPGPublicKeyCreateResponse) GetCreated() *v1alpha1.GnuPGPublicKeyList {
if m != nil {
return m.Created
}
return nil
}
func (m *GnuPGPublicKeyCreateResponse) GetSkipped() []string {
if m != nil {
return m.Skipped
}
return nil
}
// Generic (empty) response for GPG public key CRUD requests
type GnuPGPublicKeyResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GnuPGPublicKeyResponse) Reset() { *m = GnuPGPublicKeyResponse{} }
func (m *GnuPGPublicKeyResponse) String() string { return proto.CompactTextString(m) }
func (*GnuPGPublicKeyResponse) ProtoMessage() {}
func (*GnuPGPublicKeyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_8ba55a5eb76dc6fd, []int{3}
}
func (m *GnuPGPublicKeyResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *GnuPGPublicKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_GnuPGPublicKeyResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *GnuPGPublicKeyResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GnuPGPublicKeyResponse.Merge(m, src)
}
func (m *GnuPGPublicKeyResponse) XXX_Size() int {
return m.Size()
}
func (m *GnuPGPublicKeyResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GnuPGPublicKeyResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GnuPGPublicKeyResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*GnuPGPublicKeyQuery)(nil), "gpgkey.GnuPGPublicKeyQuery")
proto.RegisterType((*GnuPGPublicKeyCreateRequest)(nil), "gpgkey.GnuPGPublicKeyCreateRequest")
proto.RegisterType((*GnuPGPublicKeyCreateResponse)(nil), "gpgkey.GnuPGPublicKeyCreateResponse")
proto.RegisterType((*GnuPGPublicKeyResponse)(nil), "gpgkey.GnuPGPublicKeyResponse")
}
func init() { proto.RegisterFile("server/gpgkey/gpgkey.proto", fileDescriptor_8ba55a5eb76dc6fd) }
var fileDescriptor_8ba55a5eb76dc6fd = []byte{
// 470 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x41, 0x8b, 0xd3, 0x40,
0x14, 0xc7, 0x99, 0x56, 0xbb, 0x76, 0x96, 0xbd, 0x4c, 0x75, 0x09, 0xe9, 0x12, 0x4a, 0xf4, 0x50,
0x56, 0x98, 0xa1, 0xeb, 0x45, 0x3c, 0xda, 0x85, 0x20, 0xeb, 0xa1, 0xc6, 0xdb, 0xde, 0xa6, 0xc9,
0x23, 0x1d, 0x12, 0x33, 0x63, 0x66, 0x52, 0x88, 0xe2, 0x41, 0xf1, 0x1b, 0x78, 0x11, 0xfc, 0x42,
0x1e, 0x05, 0xbf, 0x80, 0x14, 0x6f, 0x7e, 0x09, 0x69, 0x32, 0x75, 0x53, 0x29, 0xdd, 0x4b, 0x4f,
0xe1, 0x65, 0xde, 0x7b, 0xff, 0xdf, 0x9b, 0xf7, 0x1f, 0xec, 0x6a, 0x28, 0x96, 0x50, 0xb0, 0x44,
0x25, 0x29, 0x54, 0xf6, 0x43, 0x55, 0x21, 0x8d, 0x24, 0xbd, 0x26, 0x72, 0xcf, 0x12, 0x29, 0x93,
0x0c, 0x18, 0x57, 0x82, 0xf1, 0x3c, 0x97, 0x86, 0x1b, 0x21, 0x73, 0xdd, 0x64, 0xb9, 0xd3, 0x44,
0x98, 0x45, 0x39, 0xa7, 0x91, 0x7c, 0xc3, 0x16, 0x3c, 0x7f, 0x27, 0xb9, 0x60, 0x51, 0xcc, 0x54,
0x9a, 0xac, 0x0b, 0x34, 0xe3, 0x4a, 0x65, 0x22, 0xaa, 0x4b, 0xd8, 0x72, 0xc2, 0x33, 0xb5, 0xe0,
0x13, 0x96, 0x40, 0x0e, 0x05, 0x37, 0x10, 0x37, 0x4d, 0xfc, 0xc7, 0x78, 0x10, 0xe4, 0xe5, 0x2c,
0x98, 0x95, 0xf3, 0x4c, 0x44, 0x57, 0x50, 0xbd, 0x2a, 0xa1, 0xa8, 0xc8, 0x7d, 0x7c, 0x37, 0x85,
0xea, 0xc5, 0xa5, 0x83, 0x46, 0x68, 0xdc, 0x0f, 0x9b, 0xc0, 0xff, 0x8a, 0xf0, 0x70, 0x3b, 0x7b,
0x5a, 0x00, 0x37, 0x10, 0xc2, 0xdb, 0x12, 0xb4, 0x21, 0x1c, 0xf7, 0x55, 0x7d, 0x92, 0x42, 0x55,
0x57, 0x1e, 0x5f, 0x4c, 0xe9, 0x0d, 0x25, 0xb5, 0x94, 0x34, 0x8a, 0xa9, 0x4a, 0x13, 0xba, 0xa6,
0xa4, 0x2d, 0x4a, 0xba, 0xa1, 0xa4, 0xdb, 0x22, 0xe1, 0x4d, 0x57, 0x72, 0x8a, 0x7b, 0xa5, 0xd2,
0x50, 0x18, 0xa7, 0x33, 0x42, 0xe3, 0x7b, 0xa1, 0x8d, 0xfc, 0x6f, 0x08, 0x9f, 0xed, 0x46, 0xd3,
0x4a, 0xe6, 0x1a, 0x08, 0xc7, 0x47, 0x51, 0xfd, 0x27, 0xb6, 0x64, 0xc1, 0x01, 0xc8, 0x5e, 0x0a,
0x6d, 0xc2, 0x4d, 0x5f, 0xe2, 0xe0, 0x23, 0x9d, 0x0a, 0xa5, 0x20, 0x76, 0x3a, 0xa3, 0xee, 0xb8,
0x1f, 0x6e, 0x42, 0xdf, 0xc1, 0xa7, 0xff, 0x8d, 0x64, 0xb1, 0x2e, 0xfe, 0x74, 0xf1, 0x49, 0x30,
0x0b, 0xae, 0xa0, 0x7a, 0x0d, 0xc5, 0x52, 0x44, 0x40, 0x3e, 0x22, 0x7c, 0x67, 0xdd, 0x97, 0x0c,
0xa9, 0x35, 0xc5, 0x8e, 0x05, 0xb9, 0x87, 0xa2, 0xf7, 0x07, 0x9f, 0x7e, 0xfe, 0xfe, 0xd2, 0x39,
0x21, 0xc7, 0x6c, 0x39, 0xb1, 0x2e, 0xd4, 0xe4, 0x33, 0xc2, 0xdd, 0x00, 0x6e, 0x41, 0x38, 0xc4,
0x6a, 0xfd, 0x61, 0x2d, 0xff, 0x80, 0x0c, 0x5a, 0xf2, 0xec, 0x7d, 0x6d, 0xb7, 0x0f, 0x44, 0xe3,
0x5e, 0xb3, 0x45, 0xf2, 0x70, 0x37, 0xc8, 0x96, 0xfd, 0xdc, 0x47, 0xfb, 0x93, 0x9a, 0x1b, 0xf7,
0xbd, 0x5a, 0xd1, 0xf1, 0xdb, 0x03, 0x3f, 0x6b, 0x39, 0xec, 0x1a, 0xf7, 0x2e, 0x21, 0x03, 0x03,
0xfb, 0xa7, 0xf7, 0x76, 0x1f, 0xfe, 0x93, 0xb1, 0xf7, 0x7a, 0xde, 0x96, 0x79, 0xfe, 0xf4, 0xfb,
0xca, 0x43, 0x3f, 0x56, 0x1e, 0xfa, 0xb5, 0xf2, 0xd0, 0xf5, 0xf9, 0xde, 0x07, 0x1c, 0x65, 0x02,
0x72, 0x63, 0x4b, 0xe7, 0xbd, 0xfa, 0xb9, 0x3e, 0xf9, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x84,
0x78, 0x9b, 0x37, 0x04, 0x00, 0x00,
}
// 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.SupportPackageIsVersion4
// GPGKeyServiceClient is the client API for GPGKeyService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type GPGKeyServiceClient interface {
// List all available repository certificates
List(ctx context.Context, in *GnuPGPublicKeyQuery, opts ...grpc.CallOption) (*v1alpha1.GnuPGPublicKeyList, error)
// Get information about specified GPG public key from the server
Get(ctx context.Context, in *GnuPGPublicKeyQuery, opts ...grpc.CallOption) (*v1alpha1.GnuPGPublicKey, error)
// Create one or more GPG public keys in the server's configuration
Create(ctx context.Context, in *GnuPGPublicKeyCreateRequest, opts ...grpc.CallOption) (*GnuPGPublicKeyCreateResponse, error)
// Delete specified GPG public key from the server's configuration
Delete(ctx context.Context, in *GnuPGPublicKeyQuery, opts ...grpc.CallOption) (*GnuPGPublicKeyResponse, error)
}
type gPGKeyServiceClient struct {
cc *grpc.ClientConn
}
func NewGPGKeyServiceClient(cc *grpc.ClientConn) GPGKeyServiceClient {
return &gPGKeyServiceClient{cc}
}
func (c *gPGKeyServiceClient) List(ctx context.Context, in *GnuPGPublicKeyQuery, opts ...grpc.CallOption) (*v1alpha1.GnuPGPublicKeyList, error) {
out := new(v1alpha1.GnuPGPublicKeyList)
err := c.cc.Invoke(ctx, "/gpgkey.GPGKeyService/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *gPGKeyServiceClient) Get(ctx context.Context, in *GnuPGPublicKeyQuery, opts ...grpc.CallOption) (*v1alpha1.GnuPGPublicKey, error) {
out := new(v1alpha1.GnuPGPublicKey)
err := c.cc.Invoke(ctx, "/gpgkey.GPGKeyService/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *gPGKeyServiceClient) Create(ctx context.Context, in *GnuPGPublicKeyCreateRequest, opts ...grpc.CallOption) (*GnuPGPublicKeyCreateResponse, error) {
out := new(GnuPGPublicKeyCreateResponse)
err := c.cc.Invoke(ctx, "/gpgkey.GPGKeyService/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *gPGKeyServiceClient) Delete(ctx context.Context, in *GnuPGPublicKeyQuery, opts ...grpc.CallOption) (*GnuPGPublicKeyResponse, error) {
out := new(GnuPGPublicKeyResponse)
err := c.cc.Invoke(ctx, "/gpgkey.GPGKeyService/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// GPGKeyServiceServer is the server API for GPGKeyService service.
type GPGKeyServiceServer interface {
// List all available repository certificates
List(context.Context, *GnuPGPublicKeyQuery) (*v1alpha1.GnuPGPublicKeyList, error)
// Get information about specified GPG public key from the server
Get(context.Context, *GnuPGPublicKeyQuery) (*v1alpha1.GnuPGPublicKey, error)
// Create one or more GPG public keys in the server's configuration
Create(context.Context, *GnuPGPublicKeyCreateRequest) (*GnuPGPublicKeyCreateResponse, error)
// Delete specified GPG public key from the server's configuration
Delete(context.Context, *GnuPGPublicKeyQuery) (*GnuPGPublicKeyResponse, error)
}
// UnimplementedGPGKeyServiceServer can be embedded to have forward compatible implementations.
type UnimplementedGPGKeyServiceServer struct {
}
func (*UnimplementedGPGKeyServiceServer) List(ctx context.Context, req *GnuPGPublicKeyQuery) (*v1alpha1.GnuPGPublicKeyList, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (*UnimplementedGPGKeyServiceServer) Get(ctx context.Context, req *GnuPGPublicKeyQuery) (*v1alpha1.GnuPGPublicKey, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (*UnimplementedGPGKeyServiceServer) Create(ctx context.Context, req *GnuPGPublicKeyCreateRequest) (*GnuPGPublicKeyCreateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (*UnimplementedGPGKeyServiceServer) Delete(ctx context.Context, req *GnuPGPublicKeyQuery) (*GnuPGPublicKeyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func RegisterGPGKeyServiceServer(s *grpc.Server, srv GPGKeyServiceServer) {
s.RegisterService(&_GPGKeyService_serviceDesc, srv)
}
func _GPGKeyService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GnuPGPublicKeyQuery)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GPGKeyServiceServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gpgkey.GPGKeyService/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GPGKeyServiceServer).List(ctx, req.(*GnuPGPublicKeyQuery))
}
return interceptor(ctx, in, info, handler)
}
func _GPGKeyService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GnuPGPublicKeyQuery)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GPGKeyServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gpgkey.GPGKeyService/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GPGKeyServiceServer).Get(ctx, req.(*GnuPGPublicKeyQuery))
}
return interceptor(ctx, in, info, handler)
}
func _GPGKeyService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GnuPGPublicKeyCreateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GPGKeyServiceServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gpgkey.GPGKeyService/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GPGKeyServiceServer).Create(ctx, req.(*GnuPGPublicKeyCreateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _GPGKeyService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GnuPGPublicKeyQuery)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GPGKeyServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gpgkey.GPGKeyService/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GPGKeyServiceServer).Delete(ctx, req.(*GnuPGPublicKeyQuery))
}
return interceptor(ctx, in, info, handler)
}
var _GPGKeyService_serviceDesc = grpc.ServiceDesc{
ServiceName: "gpgkey.GPGKeyService",
HandlerType: (*GPGKeyServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "List",
Handler: _GPGKeyService_List_Handler,
},
{
MethodName: "Get",
Handler: _GPGKeyService_Get_Handler,
},
{
MethodName: "Create",
Handler: _GPGKeyService_Create_Handler,
},
{
MethodName: "Delete",
Handler: _GPGKeyService_Delete_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "server/gpgkey/gpgkey.proto",
}
func (m *GnuPGPublicKeyQuery) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *GnuPGPublicKeyQuery) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GnuPGPublicKeyQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.KeyID) > 0 {
i -= len(m.KeyID)
copy(dAtA[i:], m.KeyID)
i = encodeVarintGpgkey(dAtA, i, uint64(len(m.KeyID)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *GnuPGPublicKeyCreateRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *GnuPGPublicKeyCreateRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GnuPGPublicKeyCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Upsert {
i--
if m.Upsert {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x10
}
if m.Publickey != nil {
{
size, err := m.Publickey.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGpgkey(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *GnuPGPublicKeyCreateResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *GnuPGPublicKeyCreateResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GnuPGPublicKeyCreateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Skipped) > 0 {
for iNdEx := len(m.Skipped) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Skipped[iNdEx])
copy(dAtA[i:], m.Skipped[iNdEx])
i = encodeVarintGpgkey(dAtA, i, uint64(len(m.Skipped[iNdEx])))
i--
dAtA[i] = 0x12
}
}
if m.Created != nil {
{
size, err := m.Created.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGpgkey(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *GnuPGPublicKeyResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *GnuPGPublicKeyResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *GnuPGPublicKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
return len(dAtA) - i, nil
}
func encodeVarintGpgkey(dAtA []byte, offset int, v uint64) int {
offset -= sovGpgkey(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *GnuPGPublicKeyQuery) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.KeyID)
if l > 0 {
n += 1 + l + sovGpgkey(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *GnuPGPublicKeyCreateRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Publickey != nil {
l = m.Publickey.Size()
n += 1 + l + sovGpgkey(uint64(l))
}
if m.Upsert {
n += 2
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *GnuPGPublicKeyCreateResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Created != nil {
l = m.Created.Size()
n += 1 + l + sovGpgkey(uint64(l))
}
if len(m.Skipped) > 0 {
for _, s := range m.Skipped {
l = len(s)
n += 1 + l + sovGpgkey(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *GnuPGPublicKeyResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovGpgkey(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozGpgkey(x uint64) (n int) {
return sovGpgkey(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *GnuPGPublicKeyQuery) 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 ErrIntOverflowGpgkey
}
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: GnuPGPublicKeyQuery: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GnuPGPublicKeyQuery: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field KeyID", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGpgkey
}
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 ErrInvalidLengthGpgkey
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGpgkey
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.KeyID = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGpgkey(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGpgkey
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *GnuPGPublicKeyCreateRequest) 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 ErrIntOverflowGpgkey
}
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: GnuPGPublicKeyCreateRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GnuPGPublicKeyCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Publickey", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGpgkey
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGpgkey
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGpgkey
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Publickey == nil {
m.Publickey = &v1alpha1.GnuPGPublicKey{}
}
if err := m.Publickey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Upsert", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGpgkey
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Upsert = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipGpgkey(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGpgkey
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *GnuPGPublicKeyCreateResponse) 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 ErrIntOverflowGpgkey
}
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: GnuPGPublicKeyCreateResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GnuPGPublicKeyCreateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGpgkey
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGpgkey
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGpgkey
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Created == nil {
m.Created = &v1alpha1.GnuPGPublicKeyList{}
}
if err := m.Created.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Skipped", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGpgkey
}
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 ErrInvalidLengthGpgkey
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGpgkey
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Skipped = append(m.Skipped, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGpgkey(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGpgkey
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *GnuPGPublicKeyResponse) 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 ErrIntOverflowGpgkey
}
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: GnuPGPublicKeyResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: GnuPGPublicKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipGpgkey(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGpgkey
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGpgkey(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGpgkey
}
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, ErrIntOverflowGpgkey
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGpgkey
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthGpgkey
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupGpgkey
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthGpgkey
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthGpgkey = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGpgkey = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupGpgkey = fmt.Errorf("proto: unexpected end of group")
)