github.com/argoproj/argo-cd@v1.8.7/pkg/apiclient/repocreds/repocreds.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: server/repocreds/repocreds.proto 3 4 // Repository Service 5 // 6 // Repository Service API performs CRUD actions against repository resources 7 8 package repocreds 9 10 import ( 11 context "context" 12 fmt "fmt" 13 v1alpha1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1" 14 _ "github.com/gogo/protobuf/gogoproto" 15 proto "github.com/gogo/protobuf/proto" 16 _ "google.golang.org/genproto/googleapis/api/annotations" 17 grpc "google.golang.org/grpc" 18 codes "google.golang.org/grpc/codes" 19 status "google.golang.org/grpc/status" 20 io "io" 21 _ "k8s.io/api/core/v1" 22 math "math" 23 math_bits "math/bits" 24 ) 25 26 // Reference imports to suppress errors if they are not otherwise used. 27 var _ = proto.Marshal 28 var _ = fmt.Errorf 29 var _ = math.Inf 30 31 // This is a compile-time assertion to ensure that this generated file 32 // is compatible with the proto package it is being compiled against. 33 // A compilation error at this line likely means your copy of the 34 // proto package needs to be updated. 35 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 36 37 // RepoCredsQuery is a query for RepoCreds resources 38 type RepoCredsQuery struct { 39 // Repo URL for query 40 Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` 41 XXX_NoUnkeyedLiteral struct{} `json:"-"` 42 XXX_unrecognized []byte `json:"-"` 43 XXX_sizecache int32 `json:"-"` 44 } 45 46 func (m *RepoCredsQuery) Reset() { *m = RepoCredsQuery{} } 47 func (m *RepoCredsQuery) String() string { return proto.CompactTextString(m) } 48 func (*RepoCredsQuery) ProtoMessage() {} 49 func (*RepoCredsQuery) Descriptor() ([]byte, []int) { 50 return fileDescriptor_b0b5fce4710a8821, []int{0} 51 } 52 func (m *RepoCredsQuery) XXX_Unmarshal(b []byte) error { 53 return m.Unmarshal(b) 54 } 55 func (m *RepoCredsQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 56 if deterministic { 57 return xxx_messageInfo_RepoCredsQuery.Marshal(b, m, deterministic) 58 } else { 59 b = b[:cap(b)] 60 n, err := m.MarshalToSizedBuffer(b) 61 if err != nil { 62 return nil, err 63 } 64 return b[:n], nil 65 } 66 } 67 func (m *RepoCredsQuery) XXX_Merge(src proto.Message) { 68 xxx_messageInfo_RepoCredsQuery.Merge(m, src) 69 } 70 func (m *RepoCredsQuery) XXX_Size() int { 71 return m.Size() 72 } 73 func (m *RepoCredsQuery) XXX_DiscardUnknown() { 74 xxx_messageInfo_RepoCredsQuery.DiscardUnknown(m) 75 } 76 77 var xxx_messageInfo_RepoCredsQuery proto.InternalMessageInfo 78 79 func (m *RepoCredsQuery) GetUrl() string { 80 if m != nil { 81 return m.Url 82 } 83 return "" 84 } 85 86 type RepoCredsDeleteRequest struct { 87 Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` 88 XXX_NoUnkeyedLiteral struct{} `json:"-"` 89 XXX_unrecognized []byte `json:"-"` 90 XXX_sizecache int32 `json:"-"` 91 } 92 93 func (m *RepoCredsDeleteRequest) Reset() { *m = RepoCredsDeleteRequest{} } 94 func (m *RepoCredsDeleteRequest) String() string { return proto.CompactTextString(m) } 95 func (*RepoCredsDeleteRequest) ProtoMessage() {} 96 func (*RepoCredsDeleteRequest) Descriptor() ([]byte, []int) { 97 return fileDescriptor_b0b5fce4710a8821, []int{1} 98 } 99 func (m *RepoCredsDeleteRequest) XXX_Unmarshal(b []byte) error { 100 return m.Unmarshal(b) 101 } 102 func (m *RepoCredsDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 103 if deterministic { 104 return xxx_messageInfo_RepoCredsDeleteRequest.Marshal(b, m, deterministic) 105 } else { 106 b = b[:cap(b)] 107 n, err := m.MarshalToSizedBuffer(b) 108 if err != nil { 109 return nil, err 110 } 111 return b[:n], nil 112 } 113 } 114 func (m *RepoCredsDeleteRequest) XXX_Merge(src proto.Message) { 115 xxx_messageInfo_RepoCredsDeleteRequest.Merge(m, src) 116 } 117 func (m *RepoCredsDeleteRequest) XXX_Size() int { 118 return m.Size() 119 } 120 func (m *RepoCredsDeleteRequest) XXX_DiscardUnknown() { 121 xxx_messageInfo_RepoCredsDeleteRequest.DiscardUnknown(m) 122 } 123 124 var xxx_messageInfo_RepoCredsDeleteRequest proto.InternalMessageInfo 125 126 func (m *RepoCredsDeleteRequest) GetUrl() string { 127 if m != nil { 128 return m.Url 129 } 130 return "" 131 } 132 133 // RepoCredsResponse is a response to most repository credentials requests 134 type RepoCredsResponse struct { 135 XXX_NoUnkeyedLiteral struct{} `json:"-"` 136 XXX_unrecognized []byte `json:"-"` 137 XXX_sizecache int32 `json:"-"` 138 } 139 140 func (m *RepoCredsResponse) Reset() { *m = RepoCredsResponse{} } 141 func (m *RepoCredsResponse) String() string { return proto.CompactTextString(m) } 142 func (*RepoCredsResponse) ProtoMessage() {} 143 func (*RepoCredsResponse) Descriptor() ([]byte, []int) { 144 return fileDescriptor_b0b5fce4710a8821, []int{2} 145 } 146 func (m *RepoCredsResponse) XXX_Unmarshal(b []byte) error { 147 return m.Unmarshal(b) 148 } 149 func (m *RepoCredsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 150 if deterministic { 151 return xxx_messageInfo_RepoCredsResponse.Marshal(b, m, deterministic) 152 } else { 153 b = b[:cap(b)] 154 n, err := m.MarshalToSizedBuffer(b) 155 if err != nil { 156 return nil, err 157 } 158 return b[:n], nil 159 } 160 } 161 func (m *RepoCredsResponse) XXX_Merge(src proto.Message) { 162 xxx_messageInfo_RepoCredsResponse.Merge(m, src) 163 } 164 func (m *RepoCredsResponse) XXX_Size() int { 165 return m.Size() 166 } 167 func (m *RepoCredsResponse) XXX_DiscardUnknown() { 168 xxx_messageInfo_RepoCredsResponse.DiscardUnknown(m) 169 } 170 171 var xxx_messageInfo_RepoCredsResponse proto.InternalMessageInfo 172 173 // RepoCreateRequest is a request for creating repository credentials config 174 type RepoCredsCreateRequest struct { 175 // Repository definition 176 Creds *v1alpha1.RepoCreds `protobuf:"bytes,1,opt,name=creds,proto3" json:"creds,omitempty"` 177 // Whether to create in upsert mode 178 Upsert bool `protobuf:"varint,2,opt,name=upsert,proto3" json:"upsert,omitempty"` 179 XXX_NoUnkeyedLiteral struct{} `json:"-"` 180 XXX_unrecognized []byte `json:"-"` 181 XXX_sizecache int32 `json:"-"` 182 } 183 184 func (m *RepoCredsCreateRequest) Reset() { *m = RepoCredsCreateRequest{} } 185 func (m *RepoCredsCreateRequest) String() string { return proto.CompactTextString(m) } 186 func (*RepoCredsCreateRequest) ProtoMessage() {} 187 func (*RepoCredsCreateRequest) Descriptor() ([]byte, []int) { 188 return fileDescriptor_b0b5fce4710a8821, []int{3} 189 } 190 func (m *RepoCredsCreateRequest) XXX_Unmarshal(b []byte) error { 191 return m.Unmarshal(b) 192 } 193 func (m *RepoCredsCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 194 if deterministic { 195 return xxx_messageInfo_RepoCredsCreateRequest.Marshal(b, m, deterministic) 196 } else { 197 b = b[:cap(b)] 198 n, err := m.MarshalToSizedBuffer(b) 199 if err != nil { 200 return nil, err 201 } 202 return b[:n], nil 203 } 204 } 205 func (m *RepoCredsCreateRequest) XXX_Merge(src proto.Message) { 206 xxx_messageInfo_RepoCredsCreateRequest.Merge(m, src) 207 } 208 func (m *RepoCredsCreateRequest) XXX_Size() int { 209 return m.Size() 210 } 211 func (m *RepoCredsCreateRequest) XXX_DiscardUnknown() { 212 xxx_messageInfo_RepoCredsCreateRequest.DiscardUnknown(m) 213 } 214 215 var xxx_messageInfo_RepoCredsCreateRequest proto.InternalMessageInfo 216 217 func (m *RepoCredsCreateRequest) GetCreds() *v1alpha1.RepoCreds { 218 if m != nil { 219 return m.Creds 220 } 221 return nil 222 } 223 224 func (m *RepoCredsCreateRequest) GetUpsert() bool { 225 if m != nil { 226 return m.Upsert 227 } 228 return false 229 } 230 231 // RepoCredsUpdateRequest is a request for updating existing repository credentials config 232 type RepoCredsUpdateRequest struct { 233 Creds *v1alpha1.RepoCreds `protobuf:"bytes,1,opt,name=creds,proto3" json:"creds,omitempty"` 234 XXX_NoUnkeyedLiteral struct{} `json:"-"` 235 XXX_unrecognized []byte `json:"-"` 236 XXX_sizecache int32 `json:"-"` 237 } 238 239 func (m *RepoCredsUpdateRequest) Reset() { *m = RepoCredsUpdateRequest{} } 240 func (m *RepoCredsUpdateRequest) String() string { return proto.CompactTextString(m) } 241 func (*RepoCredsUpdateRequest) ProtoMessage() {} 242 func (*RepoCredsUpdateRequest) Descriptor() ([]byte, []int) { 243 return fileDescriptor_b0b5fce4710a8821, []int{4} 244 } 245 func (m *RepoCredsUpdateRequest) XXX_Unmarshal(b []byte) error { 246 return m.Unmarshal(b) 247 } 248 func (m *RepoCredsUpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 249 if deterministic { 250 return xxx_messageInfo_RepoCredsUpdateRequest.Marshal(b, m, deterministic) 251 } else { 252 b = b[:cap(b)] 253 n, err := m.MarshalToSizedBuffer(b) 254 if err != nil { 255 return nil, err 256 } 257 return b[:n], nil 258 } 259 } 260 func (m *RepoCredsUpdateRequest) XXX_Merge(src proto.Message) { 261 xxx_messageInfo_RepoCredsUpdateRequest.Merge(m, src) 262 } 263 func (m *RepoCredsUpdateRequest) XXX_Size() int { 264 return m.Size() 265 } 266 func (m *RepoCredsUpdateRequest) XXX_DiscardUnknown() { 267 xxx_messageInfo_RepoCredsUpdateRequest.DiscardUnknown(m) 268 } 269 270 var xxx_messageInfo_RepoCredsUpdateRequest proto.InternalMessageInfo 271 272 func (m *RepoCredsUpdateRequest) GetCreds() *v1alpha1.RepoCreds { 273 if m != nil { 274 return m.Creds 275 } 276 return nil 277 } 278 279 func init() { 280 proto.RegisterType((*RepoCredsQuery)(nil), "repocreds.RepoCredsQuery") 281 proto.RegisterType((*RepoCredsDeleteRequest)(nil), "repocreds.RepoCredsDeleteRequest") 282 proto.RegisterType((*RepoCredsResponse)(nil), "repocreds.RepoCredsResponse") 283 proto.RegisterType((*RepoCredsCreateRequest)(nil), "repocreds.RepoCredsCreateRequest") 284 proto.RegisterType((*RepoCredsUpdateRequest)(nil), "repocreds.RepoCredsUpdateRequest") 285 } 286 287 func init() { proto.RegisterFile("server/repocreds/repocreds.proto", fileDescriptor_b0b5fce4710a8821) } 288 289 var fileDescriptor_b0b5fce4710a8821 = []byte{ 290 // 497 bytes of a gzipped FileDescriptorProto 291 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x41, 0x6b, 0x14, 0x31, 292 0x14, 0xc7, 0x49, 0xa5, 0xc5, 0x46, 0x90, 0x76, 0x2a, 0xb5, 0x3b, 0x5b, 0xd7, 0x35, 0x07, 0x29, 293 0x45, 0x13, 0xb6, 0xbd, 0x88, 0x37, 0x6d, 0x0f, 0x0a, 0x5e, 0x1c, 0xf1, 0xd2, 0x8b, 0xa4, 0x33, 294 0x8f, 0x69, 0xdc, 0x71, 0x12, 0x93, 0xcc, 0x40, 0x11, 0x11, 0x3c, 0x7b, 0xeb, 0xd1, 0x2f, 0xe0, 295 0x07, 0xf0, 0x43, 0x78, 0x14, 0xfc, 0x02, 0xb2, 0xf8, 0x41, 0x24, 0xd9, 0x9d, 0x99, 0x1d, 0x76, 296 0x0e, 0x7b, 0x58, 0x7a, 0x7b, 0x93, 0xbc, 0xf9, 0xbf, 0xdf, 0xcb, 0x3f, 0x2f, 0x78, 0x68, 0x40, 297 0x97, 0xa0, 0x99, 0x06, 0x25, 0x63, 0x0d, 0x89, 0x69, 0x22, 0xaa, 0xb4, 0xb4, 0x32, 0xd8, 0xac, 298 0x17, 0xc2, 0x3b, 0xa9, 0x4c, 0xa5, 0x5f, 0x65, 0x2e, 0x9a, 0x26, 0x84, 0xfb, 0xa9, 0x94, 0x69, 299 0x06, 0x8c, 0x2b, 0xc1, 0x78, 0x9e, 0x4b, 0xcb, 0xad, 0x90, 0xf9, 0xec, 0xf7, 0x90, 0x8c, 0x9f, 300 0x18, 0x2a, 0xa4, 0xdf, 0x8d, 0xa5, 0x06, 0x56, 0x8e, 0x58, 0x0a, 0x39, 0x68, 0x6e, 0x21, 0x99, 301 0xe5, 0xbc, 0x4c, 0x85, 0xbd, 0x28, 0xce, 0x69, 0x2c, 0x3f, 0x30, 0xae, 0x7d, 0x89, 0xf7, 0x3e, 302 0x78, 0x1c, 0x27, 0x4c, 0x8d, 0x53, 0xf7, 0xb3, 0x61, 0x5c, 0xa9, 0x4c, 0xc4, 0x5e, 0x9c, 0x95, 303 0x23, 0x9e, 0xa9, 0x0b, 0xbe, 0x20, 0x45, 0x08, 0xbe, 0x1d, 0x81, 0x92, 0x27, 0x8e, 0xf7, 0x75, 304 0x01, 0xfa, 0x32, 0xd8, 0xc2, 0x37, 0x0a, 0x9d, 0xed, 0xa1, 0x21, 0x3a, 0xd8, 0x8c, 0x5c, 0x48, 305 0x0e, 0xf1, 0x6e, 0x9d, 0x73, 0x0a, 0x19, 0x58, 0x88, 0xe0, 0x63, 0x01, 0xc6, 0x76, 0xe4, 0xee, 306 0xe0, 0xed, 0x3a, 0x37, 0x02, 0xa3, 0x64, 0x6e, 0x80, 0x7c, 0x43, 0x73, 0x0a, 0x27, 0x1a, 0x78, 307 0xa3, 0x70, 0x86, 0xd7, 0xfd, 0x59, 0x79, 0x8d, 0x5b, 0x47, 0xa7, 0xb4, 0x69, 0x8d, 0x56, 0xad, 308 0xf9, 0xe0, 0x5d, 0x9c, 0x50, 0x35, 0x4e, 0xa9, 0x6b, 0x8d, 0xce, 0xb5, 0x46, 0xab, 0xd6, 0x68, 309 0x53, 0x77, 0x2a, 0x19, 0xec, 0xe2, 0x8d, 0x42, 0x19, 0xd0, 0x76, 0x6f, 0x6d, 0x88, 0x0e, 0x6e, 310 0x46, 0xb3, 0x2f, 0x62, 0xe7, 0x68, 0xde, 0xaa, 0xe4, 0x7a, 0x68, 0x8e, 0xae, 0xd6, 0xf1, 0x56, 311 0xbd, 0xf8, 0x06, 0x74, 0x29, 0x62, 0x08, 0xbe, 0x23, 0xdc, 0x7b, 0x25, 0x8c, 0x75, 0x1b, 0x46, 312 0x58, 0xa9, 0x2f, 0xdd, 0x36, 0xe4, 0x56, 0xf0, 0xcc, 0x04, 0x3d, 0xda, 0x5c, 0xae, 0xb6, 0x4b, 313 0xe1, 0x8b, 0x55, 0xa0, 0xb9, 0xca, 0xa4, 0xf7, 0xf5, 0xcf, 0xbf, 0xab, 0xb5, 0x9d, 0x60, 0xdb, 314 0x5f, 0xb9, 0x72, 0xd4, 0x5c, 0xe8, 0xe0, 0x07, 0xc2, 0xfd, 0xca, 0xae, 0x2e, 0xbe, 0x07, 0x5d, 315 0x7c, 0x2d, 0x7f, 0xc3, 0x95, 0x1c, 0x21, 0x19, 0x7a, 0xc6, 0x90, 0x2c, 0x32, 0x3e, 0x9d, 0x79, 316 0xfd, 0x13, 0xe1, 0x7e, 0xe5, 0xe5, 0xd2, 0xa8, 0x2d, 0xf3, 0x57, 0x84, 0xfa, 0xc8, 0xa3, 0x3e, 317 0x0c, 0xef, 0x2d, 0xa0, 0xb2, 0x4f, 0xd3, 0xf2, 0x85, 0xce, 0x3e, 0x57, 0xd8, 0x5f, 0x70, 0xbf, 318 0x9a, 0xa8, 0xa5, 0xa9, 0x5b, 0x23, 0x18, 0xee, 0x77, 0xa5, 0xd4, 0x93, 0x77, 0xdf, 0xd3, 0xf4, 319 0x0e, 0xef, 0x76, 0xd0, 0x38, 0x8e, 0xe7, 0xcf, 0x7e, 0x4d, 0x06, 0xe8, 0xf7, 0x64, 0x80, 0xfe, 320 0x4e, 0x06, 0xe8, 0xec, 0x78, 0x89, 0x87, 0x25, 0xce, 0x04, 0xe4, 0xb6, 0x11, 0x3a, 0xdf, 0xf0, 321 0x2f, 0xc9, 0xf1, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xae, 0xe4, 0x90, 0x83, 0x1b, 0x05, 0x00, 322 0x00, 323 } 324 325 // Reference imports to suppress errors if they are not otherwise used. 326 var _ context.Context 327 var _ grpc.ClientConn 328 329 // This is a compile-time assertion to ensure that this generated file 330 // is compatible with the grpc package it is being compiled against. 331 const _ = grpc.SupportPackageIsVersion4 332 333 // RepoCredsServiceClient is the client API for RepoCredsService service. 334 // 335 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 336 type RepoCredsServiceClient interface { 337 // ListRepositoryCredentials gets a list of all configured repository credential sets 338 ListRepositoryCredentials(ctx context.Context, in *RepoCredsQuery, opts ...grpc.CallOption) (*v1alpha1.RepoCredsList, error) 339 // CreateRepositoryCredentials creates a new repository credential set 340 CreateRepositoryCredentials(ctx context.Context, in *RepoCredsCreateRequest, opts ...grpc.CallOption) (*v1alpha1.RepoCreds, error) 341 // UpdateRepositoryCredentials updates a repository credential set 342 UpdateRepositoryCredentials(ctx context.Context, in *RepoCredsUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.RepoCreds, error) 343 // DeleteRepositoryCredentials deletes a repository credential set from the configuration 344 DeleteRepositoryCredentials(ctx context.Context, in *RepoCredsDeleteRequest, opts ...grpc.CallOption) (*RepoCredsResponse, error) 345 } 346 347 type repoCredsServiceClient struct { 348 cc *grpc.ClientConn 349 } 350 351 func NewRepoCredsServiceClient(cc *grpc.ClientConn) RepoCredsServiceClient { 352 return &repoCredsServiceClient{cc} 353 } 354 355 func (c *repoCredsServiceClient) ListRepositoryCredentials(ctx context.Context, in *RepoCredsQuery, opts ...grpc.CallOption) (*v1alpha1.RepoCredsList, error) { 356 out := new(v1alpha1.RepoCredsList) 357 err := c.cc.Invoke(ctx, "/repocreds.RepoCredsService/ListRepositoryCredentials", in, out, opts...) 358 if err != nil { 359 return nil, err 360 } 361 return out, nil 362 } 363 364 func (c *repoCredsServiceClient) CreateRepositoryCredentials(ctx context.Context, in *RepoCredsCreateRequest, opts ...grpc.CallOption) (*v1alpha1.RepoCreds, error) { 365 out := new(v1alpha1.RepoCreds) 366 err := c.cc.Invoke(ctx, "/repocreds.RepoCredsService/CreateRepositoryCredentials", in, out, opts...) 367 if err != nil { 368 return nil, err 369 } 370 return out, nil 371 } 372 373 func (c *repoCredsServiceClient) UpdateRepositoryCredentials(ctx context.Context, in *RepoCredsUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.RepoCreds, error) { 374 out := new(v1alpha1.RepoCreds) 375 err := c.cc.Invoke(ctx, "/repocreds.RepoCredsService/UpdateRepositoryCredentials", in, out, opts...) 376 if err != nil { 377 return nil, err 378 } 379 return out, nil 380 } 381 382 func (c *repoCredsServiceClient) DeleteRepositoryCredentials(ctx context.Context, in *RepoCredsDeleteRequest, opts ...grpc.CallOption) (*RepoCredsResponse, error) { 383 out := new(RepoCredsResponse) 384 err := c.cc.Invoke(ctx, "/repocreds.RepoCredsService/DeleteRepositoryCredentials", in, out, opts...) 385 if err != nil { 386 return nil, err 387 } 388 return out, nil 389 } 390 391 // RepoCredsServiceServer is the server API for RepoCredsService service. 392 type RepoCredsServiceServer interface { 393 // ListRepositoryCredentials gets a list of all configured repository credential sets 394 ListRepositoryCredentials(context.Context, *RepoCredsQuery) (*v1alpha1.RepoCredsList, error) 395 // CreateRepositoryCredentials creates a new repository credential set 396 CreateRepositoryCredentials(context.Context, *RepoCredsCreateRequest) (*v1alpha1.RepoCreds, error) 397 // UpdateRepositoryCredentials updates a repository credential set 398 UpdateRepositoryCredentials(context.Context, *RepoCredsUpdateRequest) (*v1alpha1.RepoCreds, error) 399 // DeleteRepositoryCredentials deletes a repository credential set from the configuration 400 DeleteRepositoryCredentials(context.Context, *RepoCredsDeleteRequest) (*RepoCredsResponse, error) 401 } 402 403 // UnimplementedRepoCredsServiceServer can be embedded to have forward compatible implementations. 404 type UnimplementedRepoCredsServiceServer struct { 405 } 406 407 func (*UnimplementedRepoCredsServiceServer) ListRepositoryCredentials(ctx context.Context, req *RepoCredsQuery) (*v1alpha1.RepoCredsList, error) { 408 return nil, status.Errorf(codes.Unimplemented, "method ListRepositoryCredentials not implemented") 409 } 410 func (*UnimplementedRepoCredsServiceServer) CreateRepositoryCredentials(ctx context.Context, req *RepoCredsCreateRequest) (*v1alpha1.RepoCreds, error) { 411 return nil, status.Errorf(codes.Unimplemented, "method CreateRepositoryCredentials not implemented") 412 } 413 func (*UnimplementedRepoCredsServiceServer) UpdateRepositoryCredentials(ctx context.Context, req *RepoCredsUpdateRequest) (*v1alpha1.RepoCreds, error) { 414 return nil, status.Errorf(codes.Unimplemented, "method UpdateRepositoryCredentials not implemented") 415 } 416 func (*UnimplementedRepoCredsServiceServer) DeleteRepositoryCredentials(ctx context.Context, req *RepoCredsDeleteRequest) (*RepoCredsResponse, error) { 417 return nil, status.Errorf(codes.Unimplemented, "method DeleteRepositoryCredentials not implemented") 418 } 419 420 func RegisterRepoCredsServiceServer(s *grpc.Server, srv RepoCredsServiceServer) { 421 s.RegisterService(&_RepoCredsService_serviceDesc, srv) 422 } 423 424 func _RepoCredsService_ListRepositoryCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 425 in := new(RepoCredsQuery) 426 if err := dec(in); err != nil { 427 return nil, err 428 } 429 if interceptor == nil { 430 return srv.(RepoCredsServiceServer).ListRepositoryCredentials(ctx, in) 431 } 432 info := &grpc.UnaryServerInfo{ 433 Server: srv, 434 FullMethod: "/repocreds.RepoCredsService/ListRepositoryCredentials", 435 } 436 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 437 return srv.(RepoCredsServiceServer).ListRepositoryCredentials(ctx, req.(*RepoCredsQuery)) 438 } 439 return interceptor(ctx, in, info, handler) 440 } 441 442 func _RepoCredsService_CreateRepositoryCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 443 in := new(RepoCredsCreateRequest) 444 if err := dec(in); err != nil { 445 return nil, err 446 } 447 if interceptor == nil { 448 return srv.(RepoCredsServiceServer).CreateRepositoryCredentials(ctx, in) 449 } 450 info := &grpc.UnaryServerInfo{ 451 Server: srv, 452 FullMethod: "/repocreds.RepoCredsService/CreateRepositoryCredentials", 453 } 454 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 455 return srv.(RepoCredsServiceServer).CreateRepositoryCredentials(ctx, req.(*RepoCredsCreateRequest)) 456 } 457 return interceptor(ctx, in, info, handler) 458 } 459 460 func _RepoCredsService_UpdateRepositoryCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 461 in := new(RepoCredsUpdateRequest) 462 if err := dec(in); err != nil { 463 return nil, err 464 } 465 if interceptor == nil { 466 return srv.(RepoCredsServiceServer).UpdateRepositoryCredentials(ctx, in) 467 } 468 info := &grpc.UnaryServerInfo{ 469 Server: srv, 470 FullMethod: "/repocreds.RepoCredsService/UpdateRepositoryCredentials", 471 } 472 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 473 return srv.(RepoCredsServiceServer).UpdateRepositoryCredentials(ctx, req.(*RepoCredsUpdateRequest)) 474 } 475 return interceptor(ctx, in, info, handler) 476 } 477 478 func _RepoCredsService_DeleteRepositoryCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 479 in := new(RepoCredsDeleteRequest) 480 if err := dec(in); err != nil { 481 return nil, err 482 } 483 if interceptor == nil { 484 return srv.(RepoCredsServiceServer).DeleteRepositoryCredentials(ctx, in) 485 } 486 info := &grpc.UnaryServerInfo{ 487 Server: srv, 488 FullMethod: "/repocreds.RepoCredsService/DeleteRepositoryCredentials", 489 } 490 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 491 return srv.(RepoCredsServiceServer).DeleteRepositoryCredentials(ctx, req.(*RepoCredsDeleteRequest)) 492 } 493 return interceptor(ctx, in, info, handler) 494 } 495 496 var _RepoCredsService_serviceDesc = grpc.ServiceDesc{ 497 ServiceName: "repocreds.RepoCredsService", 498 HandlerType: (*RepoCredsServiceServer)(nil), 499 Methods: []grpc.MethodDesc{ 500 { 501 MethodName: "ListRepositoryCredentials", 502 Handler: _RepoCredsService_ListRepositoryCredentials_Handler, 503 }, 504 { 505 MethodName: "CreateRepositoryCredentials", 506 Handler: _RepoCredsService_CreateRepositoryCredentials_Handler, 507 }, 508 { 509 MethodName: "UpdateRepositoryCredentials", 510 Handler: _RepoCredsService_UpdateRepositoryCredentials_Handler, 511 }, 512 { 513 MethodName: "DeleteRepositoryCredentials", 514 Handler: _RepoCredsService_DeleteRepositoryCredentials_Handler, 515 }, 516 }, 517 Streams: []grpc.StreamDesc{}, 518 Metadata: "server/repocreds/repocreds.proto", 519 } 520 521 func (m *RepoCredsQuery) Marshal() (dAtA []byte, err error) { 522 size := m.Size() 523 dAtA = make([]byte, size) 524 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 525 if err != nil { 526 return nil, err 527 } 528 return dAtA[:n], nil 529 } 530 531 func (m *RepoCredsQuery) MarshalTo(dAtA []byte) (int, error) { 532 size := m.Size() 533 return m.MarshalToSizedBuffer(dAtA[:size]) 534 } 535 536 func (m *RepoCredsQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { 537 i := len(dAtA) 538 _ = i 539 var l int 540 _ = l 541 if m.XXX_unrecognized != nil { 542 i -= len(m.XXX_unrecognized) 543 copy(dAtA[i:], m.XXX_unrecognized) 544 } 545 if len(m.Url) > 0 { 546 i -= len(m.Url) 547 copy(dAtA[i:], m.Url) 548 i = encodeVarintRepocreds(dAtA, i, uint64(len(m.Url))) 549 i-- 550 dAtA[i] = 0xa 551 } 552 return len(dAtA) - i, nil 553 } 554 555 func (m *RepoCredsDeleteRequest) Marshal() (dAtA []byte, err error) { 556 size := m.Size() 557 dAtA = make([]byte, size) 558 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 559 if err != nil { 560 return nil, err 561 } 562 return dAtA[:n], nil 563 } 564 565 func (m *RepoCredsDeleteRequest) MarshalTo(dAtA []byte) (int, error) { 566 size := m.Size() 567 return m.MarshalToSizedBuffer(dAtA[:size]) 568 } 569 570 func (m *RepoCredsDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 571 i := len(dAtA) 572 _ = i 573 var l int 574 _ = l 575 if m.XXX_unrecognized != nil { 576 i -= len(m.XXX_unrecognized) 577 copy(dAtA[i:], m.XXX_unrecognized) 578 } 579 if len(m.Url) > 0 { 580 i -= len(m.Url) 581 copy(dAtA[i:], m.Url) 582 i = encodeVarintRepocreds(dAtA, i, uint64(len(m.Url))) 583 i-- 584 dAtA[i] = 0xa 585 } 586 return len(dAtA) - i, nil 587 } 588 589 func (m *RepoCredsResponse) Marshal() (dAtA []byte, err error) { 590 size := m.Size() 591 dAtA = make([]byte, size) 592 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 593 if err != nil { 594 return nil, err 595 } 596 return dAtA[:n], nil 597 } 598 599 func (m *RepoCredsResponse) MarshalTo(dAtA []byte) (int, error) { 600 size := m.Size() 601 return m.MarshalToSizedBuffer(dAtA[:size]) 602 } 603 604 func (m *RepoCredsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 605 i := len(dAtA) 606 _ = i 607 var l int 608 _ = l 609 if m.XXX_unrecognized != nil { 610 i -= len(m.XXX_unrecognized) 611 copy(dAtA[i:], m.XXX_unrecognized) 612 } 613 return len(dAtA) - i, nil 614 } 615 616 func (m *RepoCredsCreateRequest) Marshal() (dAtA []byte, err error) { 617 size := m.Size() 618 dAtA = make([]byte, size) 619 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 620 if err != nil { 621 return nil, err 622 } 623 return dAtA[:n], nil 624 } 625 626 func (m *RepoCredsCreateRequest) MarshalTo(dAtA []byte) (int, error) { 627 size := m.Size() 628 return m.MarshalToSizedBuffer(dAtA[:size]) 629 } 630 631 func (m *RepoCredsCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 632 i := len(dAtA) 633 _ = i 634 var l int 635 _ = l 636 if m.XXX_unrecognized != nil { 637 i -= len(m.XXX_unrecognized) 638 copy(dAtA[i:], m.XXX_unrecognized) 639 } 640 if m.Upsert { 641 i-- 642 if m.Upsert { 643 dAtA[i] = 1 644 } else { 645 dAtA[i] = 0 646 } 647 i-- 648 dAtA[i] = 0x10 649 } 650 if m.Creds != nil { 651 { 652 size, err := m.Creds.MarshalToSizedBuffer(dAtA[:i]) 653 if err != nil { 654 return 0, err 655 } 656 i -= size 657 i = encodeVarintRepocreds(dAtA, i, uint64(size)) 658 } 659 i-- 660 dAtA[i] = 0xa 661 } 662 return len(dAtA) - i, nil 663 } 664 665 func (m *RepoCredsUpdateRequest) Marshal() (dAtA []byte, err error) { 666 size := m.Size() 667 dAtA = make([]byte, size) 668 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 669 if err != nil { 670 return nil, err 671 } 672 return dAtA[:n], nil 673 } 674 675 func (m *RepoCredsUpdateRequest) MarshalTo(dAtA []byte) (int, error) { 676 size := m.Size() 677 return m.MarshalToSizedBuffer(dAtA[:size]) 678 } 679 680 func (m *RepoCredsUpdateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 681 i := len(dAtA) 682 _ = i 683 var l int 684 _ = l 685 if m.XXX_unrecognized != nil { 686 i -= len(m.XXX_unrecognized) 687 copy(dAtA[i:], m.XXX_unrecognized) 688 } 689 if m.Creds != nil { 690 { 691 size, err := m.Creds.MarshalToSizedBuffer(dAtA[:i]) 692 if err != nil { 693 return 0, err 694 } 695 i -= size 696 i = encodeVarintRepocreds(dAtA, i, uint64(size)) 697 } 698 i-- 699 dAtA[i] = 0xa 700 } 701 return len(dAtA) - i, nil 702 } 703 704 func encodeVarintRepocreds(dAtA []byte, offset int, v uint64) int { 705 offset -= sovRepocreds(v) 706 base := offset 707 for v >= 1<<7 { 708 dAtA[offset] = uint8(v&0x7f | 0x80) 709 v >>= 7 710 offset++ 711 } 712 dAtA[offset] = uint8(v) 713 return base 714 } 715 func (m *RepoCredsQuery) Size() (n int) { 716 if m == nil { 717 return 0 718 } 719 var l int 720 _ = l 721 l = len(m.Url) 722 if l > 0 { 723 n += 1 + l + sovRepocreds(uint64(l)) 724 } 725 if m.XXX_unrecognized != nil { 726 n += len(m.XXX_unrecognized) 727 } 728 return n 729 } 730 731 func (m *RepoCredsDeleteRequest) Size() (n int) { 732 if m == nil { 733 return 0 734 } 735 var l int 736 _ = l 737 l = len(m.Url) 738 if l > 0 { 739 n += 1 + l + sovRepocreds(uint64(l)) 740 } 741 if m.XXX_unrecognized != nil { 742 n += len(m.XXX_unrecognized) 743 } 744 return n 745 } 746 747 func (m *RepoCredsResponse) Size() (n int) { 748 if m == nil { 749 return 0 750 } 751 var l int 752 _ = l 753 if m.XXX_unrecognized != nil { 754 n += len(m.XXX_unrecognized) 755 } 756 return n 757 } 758 759 func (m *RepoCredsCreateRequest) Size() (n int) { 760 if m == nil { 761 return 0 762 } 763 var l int 764 _ = l 765 if m.Creds != nil { 766 l = m.Creds.Size() 767 n += 1 + l + sovRepocreds(uint64(l)) 768 } 769 if m.Upsert { 770 n += 2 771 } 772 if m.XXX_unrecognized != nil { 773 n += len(m.XXX_unrecognized) 774 } 775 return n 776 } 777 778 func (m *RepoCredsUpdateRequest) Size() (n int) { 779 if m == nil { 780 return 0 781 } 782 var l int 783 _ = l 784 if m.Creds != nil { 785 l = m.Creds.Size() 786 n += 1 + l + sovRepocreds(uint64(l)) 787 } 788 if m.XXX_unrecognized != nil { 789 n += len(m.XXX_unrecognized) 790 } 791 return n 792 } 793 794 func sovRepocreds(x uint64) (n int) { 795 return (math_bits.Len64(x|1) + 6) / 7 796 } 797 func sozRepocreds(x uint64) (n int) { 798 return sovRepocreds(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 799 } 800 func (m *RepoCredsQuery) Unmarshal(dAtA []byte) error { 801 l := len(dAtA) 802 iNdEx := 0 803 for iNdEx < l { 804 preIndex := iNdEx 805 var wire uint64 806 for shift := uint(0); ; shift += 7 { 807 if shift >= 64 { 808 return ErrIntOverflowRepocreds 809 } 810 if iNdEx >= l { 811 return io.ErrUnexpectedEOF 812 } 813 b := dAtA[iNdEx] 814 iNdEx++ 815 wire |= uint64(b&0x7F) << shift 816 if b < 0x80 { 817 break 818 } 819 } 820 fieldNum := int32(wire >> 3) 821 wireType := int(wire & 0x7) 822 if wireType == 4 { 823 return fmt.Errorf("proto: RepoCredsQuery: wiretype end group for non-group") 824 } 825 if fieldNum <= 0 { 826 return fmt.Errorf("proto: RepoCredsQuery: illegal tag %d (wire type %d)", fieldNum, wire) 827 } 828 switch fieldNum { 829 case 1: 830 if wireType != 2 { 831 return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) 832 } 833 var stringLen uint64 834 for shift := uint(0); ; shift += 7 { 835 if shift >= 64 { 836 return ErrIntOverflowRepocreds 837 } 838 if iNdEx >= l { 839 return io.ErrUnexpectedEOF 840 } 841 b := dAtA[iNdEx] 842 iNdEx++ 843 stringLen |= uint64(b&0x7F) << shift 844 if b < 0x80 { 845 break 846 } 847 } 848 intStringLen := int(stringLen) 849 if intStringLen < 0 { 850 return ErrInvalidLengthRepocreds 851 } 852 postIndex := iNdEx + intStringLen 853 if postIndex < 0 { 854 return ErrInvalidLengthRepocreds 855 } 856 if postIndex > l { 857 return io.ErrUnexpectedEOF 858 } 859 m.Url = string(dAtA[iNdEx:postIndex]) 860 iNdEx = postIndex 861 default: 862 iNdEx = preIndex 863 skippy, err := skipRepocreds(dAtA[iNdEx:]) 864 if err != nil { 865 return err 866 } 867 if skippy < 0 { 868 return ErrInvalidLengthRepocreds 869 } 870 if (iNdEx + skippy) < 0 { 871 return ErrInvalidLengthRepocreds 872 } 873 if (iNdEx + skippy) > l { 874 return io.ErrUnexpectedEOF 875 } 876 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 877 iNdEx += skippy 878 } 879 } 880 881 if iNdEx > l { 882 return io.ErrUnexpectedEOF 883 } 884 return nil 885 } 886 func (m *RepoCredsDeleteRequest) Unmarshal(dAtA []byte) error { 887 l := len(dAtA) 888 iNdEx := 0 889 for iNdEx < l { 890 preIndex := iNdEx 891 var wire uint64 892 for shift := uint(0); ; shift += 7 { 893 if shift >= 64 { 894 return ErrIntOverflowRepocreds 895 } 896 if iNdEx >= l { 897 return io.ErrUnexpectedEOF 898 } 899 b := dAtA[iNdEx] 900 iNdEx++ 901 wire |= uint64(b&0x7F) << shift 902 if b < 0x80 { 903 break 904 } 905 } 906 fieldNum := int32(wire >> 3) 907 wireType := int(wire & 0x7) 908 if wireType == 4 { 909 return fmt.Errorf("proto: RepoCredsDeleteRequest: wiretype end group for non-group") 910 } 911 if fieldNum <= 0 { 912 return fmt.Errorf("proto: RepoCredsDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) 913 } 914 switch fieldNum { 915 case 1: 916 if wireType != 2 { 917 return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) 918 } 919 var stringLen uint64 920 for shift := uint(0); ; shift += 7 { 921 if shift >= 64 { 922 return ErrIntOverflowRepocreds 923 } 924 if iNdEx >= l { 925 return io.ErrUnexpectedEOF 926 } 927 b := dAtA[iNdEx] 928 iNdEx++ 929 stringLen |= uint64(b&0x7F) << shift 930 if b < 0x80 { 931 break 932 } 933 } 934 intStringLen := int(stringLen) 935 if intStringLen < 0 { 936 return ErrInvalidLengthRepocreds 937 } 938 postIndex := iNdEx + intStringLen 939 if postIndex < 0 { 940 return ErrInvalidLengthRepocreds 941 } 942 if postIndex > l { 943 return io.ErrUnexpectedEOF 944 } 945 m.Url = string(dAtA[iNdEx:postIndex]) 946 iNdEx = postIndex 947 default: 948 iNdEx = preIndex 949 skippy, err := skipRepocreds(dAtA[iNdEx:]) 950 if err != nil { 951 return err 952 } 953 if skippy < 0 { 954 return ErrInvalidLengthRepocreds 955 } 956 if (iNdEx + skippy) < 0 { 957 return ErrInvalidLengthRepocreds 958 } 959 if (iNdEx + skippy) > l { 960 return io.ErrUnexpectedEOF 961 } 962 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 963 iNdEx += skippy 964 } 965 } 966 967 if iNdEx > l { 968 return io.ErrUnexpectedEOF 969 } 970 return nil 971 } 972 func (m *RepoCredsResponse) Unmarshal(dAtA []byte) error { 973 l := len(dAtA) 974 iNdEx := 0 975 for iNdEx < l { 976 preIndex := iNdEx 977 var wire uint64 978 for shift := uint(0); ; shift += 7 { 979 if shift >= 64 { 980 return ErrIntOverflowRepocreds 981 } 982 if iNdEx >= l { 983 return io.ErrUnexpectedEOF 984 } 985 b := dAtA[iNdEx] 986 iNdEx++ 987 wire |= uint64(b&0x7F) << shift 988 if b < 0x80 { 989 break 990 } 991 } 992 fieldNum := int32(wire >> 3) 993 wireType := int(wire & 0x7) 994 if wireType == 4 { 995 return fmt.Errorf("proto: RepoCredsResponse: wiretype end group for non-group") 996 } 997 if fieldNum <= 0 { 998 return fmt.Errorf("proto: RepoCredsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 999 } 1000 switch fieldNum { 1001 default: 1002 iNdEx = preIndex 1003 skippy, err := skipRepocreds(dAtA[iNdEx:]) 1004 if err != nil { 1005 return err 1006 } 1007 if skippy < 0 { 1008 return ErrInvalidLengthRepocreds 1009 } 1010 if (iNdEx + skippy) < 0 { 1011 return ErrInvalidLengthRepocreds 1012 } 1013 if (iNdEx + skippy) > l { 1014 return io.ErrUnexpectedEOF 1015 } 1016 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1017 iNdEx += skippy 1018 } 1019 } 1020 1021 if iNdEx > l { 1022 return io.ErrUnexpectedEOF 1023 } 1024 return nil 1025 } 1026 func (m *RepoCredsCreateRequest) Unmarshal(dAtA []byte) error { 1027 l := len(dAtA) 1028 iNdEx := 0 1029 for iNdEx < l { 1030 preIndex := iNdEx 1031 var wire uint64 1032 for shift := uint(0); ; shift += 7 { 1033 if shift >= 64 { 1034 return ErrIntOverflowRepocreds 1035 } 1036 if iNdEx >= l { 1037 return io.ErrUnexpectedEOF 1038 } 1039 b := dAtA[iNdEx] 1040 iNdEx++ 1041 wire |= uint64(b&0x7F) << shift 1042 if b < 0x80 { 1043 break 1044 } 1045 } 1046 fieldNum := int32(wire >> 3) 1047 wireType := int(wire & 0x7) 1048 if wireType == 4 { 1049 return fmt.Errorf("proto: RepoCredsCreateRequest: wiretype end group for non-group") 1050 } 1051 if fieldNum <= 0 { 1052 return fmt.Errorf("proto: RepoCredsCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1053 } 1054 switch fieldNum { 1055 case 1: 1056 if wireType != 2 { 1057 return fmt.Errorf("proto: wrong wireType = %d for field Creds", wireType) 1058 } 1059 var msglen int 1060 for shift := uint(0); ; shift += 7 { 1061 if shift >= 64 { 1062 return ErrIntOverflowRepocreds 1063 } 1064 if iNdEx >= l { 1065 return io.ErrUnexpectedEOF 1066 } 1067 b := dAtA[iNdEx] 1068 iNdEx++ 1069 msglen |= int(b&0x7F) << shift 1070 if b < 0x80 { 1071 break 1072 } 1073 } 1074 if msglen < 0 { 1075 return ErrInvalidLengthRepocreds 1076 } 1077 postIndex := iNdEx + msglen 1078 if postIndex < 0 { 1079 return ErrInvalidLengthRepocreds 1080 } 1081 if postIndex > l { 1082 return io.ErrUnexpectedEOF 1083 } 1084 if m.Creds == nil { 1085 m.Creds = &v1alpha1.RepoCreds{} 1086 } 1087 if err := m.Creds.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1088 return err 1089 } 1090 iNdEx = postIndex 1091 case 2: 1092 if wireType != 0 { 1093 return fmt.Errorf("proto: wrong wireType = %d for field Upsert", wireType) 1094 } 1095 var v int 1096 for shift := uint(0); ; shift += 7 { 1097 if shift >= 64 { 1098 return ErrIntOverflowRepocreds 1099 } 1100 if iNdEx >= l { 1101 return io.ErrUnexpectedEOF 1102 } 1103 b := dAtA[iNdEx] 1104 iNdEx++ 1105 v |= int(b&0x7F) << shift 1106 if b < 0x80 { 1107 break 1108 } 1109 } 1110 m.Upsert = bool(v != 0) 1111 default: 1112 iNdEx = preIndex 1113 skippy, err := skipRepocreds(dAtA[iNdEx:]) 1114 if err != nil { 1115 return err 1116 } 1117 if skippy < 0 { 1118 return ErrInvalidLengthRepocreds 1119 } 1120 if (iNdEx + skippy) < 0 { 1121 return ErrInvalidLengthRepocreds 1122 } 1123 if (iNdEx + skippy) > l { 1124 return io.ErrUnexpectedEOF 1125 } 1126 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1127 iNdEx += skippy 1128 } 1129 } 1130 1131 if iNdEx > l { 1132 return io.ErrUnexpectedEOF 1133 } 1134 return nil 1135 } 1136 func (m *RepoCredsUpdateRequest) Unmarshal(dAtA []byte) error { 1137 l := len(dAtA) 1138 iNdEx := 0 1139 for iNdEx < l { 1140 preIndex := iNdEx 1141 var wire uint64 1142 for shift := uint(0); ; shift += 7 { 1143 if shift >= 64 { 1144 return ErrIntOverflowRepocreds 1145 } 1146 if iNdEx >= l { 1147 return io.ErrUnexpectedEOF 1148 } 1149 b := dAtA[iNdEx] 1150 iNdEx++ 1151 wire |= uint64(b&0x7F) << shift 1152 if b < 0x80 { 1153 break 1154 } 1155 } 1156 fieldNum := int32(wire >> 3) 1157 wireType := int(wire & 0x7) 1158 if wireType == 4 { 1159 return fmt.Errorf("proto: RepoCredsUpdateRequest: wiretype end group for non-group") 1160 } 1161 if fieldNum <= 0 { 1162 return fmt.Errorf("proto: RepoCredsUpdateRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1163 } 1164 switch fieldNum { 1165 case 1: 1166 if wireType != 2 { 1167 return fmt.Errorf("proto: wrong wireType = %d for field Creds", wireType) 1168 } 1169 var msglen int 1170 for shift := uint(0); ; shift += 7 { 1171 if shift >= 64 { 1172 return ErrIntOverflowRepocreds 1173 } 1174 if iNdEx >= l { 1175 return io.ErrUnexpectedEOF 1176 } 1177 b := dAtA[iNdEx] 1178 iNdEx++ 1179 msglen |= int(b&0x7F) << shift 1180 if b < 0x80 { 1181 break 1182 } 1183 } 1184 if msglen < 0 { 1185 return ErrInvalidLengthRepocreds 1186 } 1187 postIndex := iNdEx + msglen 1188 if postIndex < 0 { 1189 return ErrInvalidLengthRepocreds 1190 } 1191 if postIndex > l { 1192 return io.ErrUnexpectedEOF 1193 } 1194 if m.Creds == nil { 1195 m.Creds = &v1alpha1.RepoCreds{} 1196 } 1197 if err := m.Creds.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1198 return err 1199 } 1200 iNdEx = postIndex 1201 default: 1202 iNdEx = preIndex 1203 skippy, err := skipRepocreds(dAtA[iNdEx:]) 1204 if err != nil { 1205 return err 1206 } 1207 if skippy < 0 { 1208 return ErrInvalidLengthRepocreds 1209 } 1210 if (iNdEx + skippy) < 0 { 1211 return ErrInvalidLengthRepocreds 1212 } 1213 if (iNdEx + skippy) > l { 1214 return io.ErrUnexpectedEOF 1215 } 1216 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1217 iNdEx += skippy 1218 } 1219 } 1220 1221 if iNdEx > l { 1222 return io.ErrUnexpectedEOF 1223 } 1224 return nil 1225 } 1226 func skipRepocreds(dAtA []byte) (n int, err error) { 1227 l := len(dAtA) 1228 iNdEx := 0 1229 depth := 0 1230 for iNdEx < l { 1231 var wire uint64 1232 for shift := uint(0); ; shift += 7 { 1233 if shift >= 64 { 1234 return 0, ErrIntOverflowRepocreds 1235 } 1236 if iNdEx >= l { 1237 return 0, io.ErrUnexpectedEOF 1238 } 1239 b := dAtA[iNdEx] 1240 iNdEx++ 1241 wire |= (uint64(b) & 0x7F) << shift 1242 if b < 0x80 { 1243 break 1244 } 1245 } 1246 wireType := int(wire & 0x7) 1247 switch wireType { 1248 case 0: 1249 for shift := uint(0); ; shift += 7 { 1250 if shift >= 64 { 1251 return 0, ErrIntOverflowRepocreds 1252 } 1253 if iNdEx >= l { 1254 return 0, io.ErrUnexpectedEOF 1255 } 1256 iNdEx++ 1257 if dAtA[iNdEx-1] < 0x80 { 1258 break 1259 } 1260 } 1261 case 1: 1262 iNdEx += 8 1263 case 2: 1264 var length int 1265 for shift := uint(0); ; shift += 7 { 1266 if shift >= 64 { 1267 return 0, ErrIntOverflowRepocreds 1268 } 1269 if iNdEx >= l { 1270 return 0, io.ErrUnexpectedEOF 1271 } 1272 b := dAtA[iNdEx] 1273 iNdEx++ 1274 length |= (int(b) & 0x7F) << shift 1275 if b < 0x80 { 1276 break 1277 } 1278 } 1279 if length < 0 { 1280 return 0, ErrInvalidLengthRepocreds 1281 } 1282 iNdEx += length 1283 case 3: 1284 depth++ 1285 case 4: 1286 if depth == 0 { 1287 return 0, ErrUnexpectedEndOfGroupRepocreds 1288 } 1289 depth-- 1290 case 5: 1291 iNdEx += 4 1292 default: 1293 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1294 } 1295 if iNdEx < 0 { 1296 return 0, ErrInvalidLengthRepocreds 1297 } 1298 if depth == 0 { 1299 return iNdEx, nil 1300 } 1301 } 1302 return 0, io.ErrUnexpectedEOF 1303 } 1304 1305 var ( 1306 ErrInvalidLengthRepocreds = fmt.Errorf("proto: negative length found during unmarshaling") 1307 ErrIntOverflowRepocreds = fmt.Errorf("proto: integer overflow") 1308 ErrUnexpectedEndOfGroupRepocreds = fmt.Errorf("proto: unexpected end of group") 1309 )