auth/service/proto: add Delete RPC (#1836)

Co-authored-by: Asim Aslam <asim@aslam.me>
This commit is contained in:
ben-toogood 2020-07-14 13:41:35 +01:00 committed by GitHub
parent 42c28f2b6d
commit 0287ab8751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 224 additions and 81 deletions

View File

@ -130,6 +130,84 @@ func (m *ListAccountsResponse) GetAccounts() []*Account {
return nil
}
type DeleteAccountRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Options *Options `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteAccountRequest) Reset() { *m = DeleteAccountRequest{} }
func (m *DeleteAccountRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteAccountRequest) ProtoMessage() {}
func (*DeleteAccountRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{2}
}
func (m *DeleteAccountRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteAccountRequest.Unmarshal(m, b)
}
func (m *DeleteAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteAccountRequest.Marshal(b, m, deterministic)
}
func (m *DeleteAccountRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteAccountRequest.Merge(m, src)
}
func (m *DeleteAccountRequest) XXX_Size() int {
return xxx_messageInfo_DeleteAccountRequest.Size(m)
}
func (m *DeleteAccountRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteAccountRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteAccountRequest proto.InternalMessageInfo
func (m *DeleteAccountRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *DeleteAccountRequest) GetOptions() *Options {
if m != nil {
return m.Options
}
return nil
}
type DeleteAccountResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteAccountResponse) Reset() { *m = DeleteAccountResponse{} }
func (m *DeleteAccountResponse) String() string { return proto.CompactTextString(m) }
func (*DeleteAccountResponse) ProtoMessage() {}
func (*DeleteAccountResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{3}
}
func (m *DeleteAccountResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteAccountResponse.Unmarshal(m, b)
}
func (m *DeleteAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteAccountResponse.Marshal(b, m, deterministic)
}
func (m *DeleteAccountResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteAccountResponse.Merge(m, src)
}
func (m *DeleteAccountResponse) XXX_Size() int {
return xxx_messageInfo_DeleteAccountResponse.Size(m)
}
func (m *DeleteAccountResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteAccountResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteAccountResponse proto.InternalMessageInfo
type Token struct {
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
@ -144,7 +222,7 @@ func (m *Token) Reset() { *m = Token{} }
func (m *Token) String() string { return proto.CompactTextString(m) }
func (*Token) ProtoMessage() {}
func (*Token) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{2}
return fileDescriptor_21300bfacc51fc2a, []int{4}
}
func (m *Token) XXX_Unmarshal(b []byte) error {
@ -209,7 +287,7 @@ func (m *Account) Reset() { *m = Account{} }
func (m *Account) String() string { return proto.CompactTextString(m) }
func (*Account) ProtoMessage() {}
func (*Account) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{3}
return fileDescriptor_21300bfacc51fc2a, []int{5}
}
func (m *Account) XXX_Unmarshal(b []byte) error {
@ -285,7 +363,7 @@ func (m *Resource) Reset() { *m = Resource{} }
func (m *Resource) String() string { return proto.CompactTextString(m) }
func (*Resource) ProtoMessage() {}
func (*Resource) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{4}
return fileDescriptor_21300bfacc51fc2a, []int{6}
}
func (m *Resource) XXX_Unmarshal(b []byte) error {
@ -344,7 +422,7 @@ func (m *GenerateRequest) Reset() { *m = GenerateRequest{} }
func (m *GenerateRequest) String() string { return proto.CompactTextString(m) }
func (*GenerateRequest) ProtoMessage() {}
func (*GenerateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{5}
return fileDescriptor_21300bfacc51fc2a, []int{7}
}
func (m *GenerateRequest) XXX_Unmarshal(b []byte) error {
@ -425,7 +503,7 @@ func (m *GenerateResponse) Reset() { *m = GenerateResponse{} }
func (m *GenerateResponse) String() string { return proto.CompactTextString(m) }
func (*GenerateResponse) ProtoMessage() {}
func (*GenerateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{6}
return fileDescriptor_21300bfacc51fc2a, []int{8}
}
func (m *GenerateResponse) XXX_Unmarshal(b []byte) error {
@ -466,7 +544,7 @@ func (m *GrantRequest) Reset() { *m = GrantRequest{} }
func (m *GrantRequest) String() string { return proto.CompactTextString(m) }
func (*GrantRequest) ProtoMessage() {}
func (*GrantRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{7}
return fileDescriptor_21300bfacc51fc2a, []int{9}
}
func (m *GrantRequest) XXX_Unmarshal(b []byte) error {
@ -518,7 +596,7 @@ func (m *GrantResponse) Reset() { *m = GrantResponse{} }
func (m *GrantResponse) String() string { return proto.CompactTextString(m) }
func (*GrantResponse) ProtoMessage() {}
func (*GrantResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{8}
return fileDescriptor_21300bfacc51fc2a, []int{10}
}
func (m *GrantResponse) XXX_Unmarshal(b []byte) error {
@ -552,7 +630,7 @@ func (m *RevokeRequest) Reset() { *m = RevokeRequest{} }
func (m *RevokeRequest) String() string { return proto.CompactTextString(m) }
func (*RevokeRequest) ProtoMessage() {}
func (*RevokeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{9}
return fileDescriptor_21300bfacc51fc2a, []int{11}
}
func (m *RevokeRequest) XXX_Unmarshal(b []byte) error {
@ -604,7 +682,7 @@ func (m *RevokeResponse) Reset() { *m = RevokeResponse{} }
func (m *RevokeResponse) String() string { return proto.CompactTextString(m) }
func (*RevokeResponse) ProtoMessage() {}
func (*RevokeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{10}
return fileDescriptor_21300bfacc51fc2a, []int{12}
}
func (m *RevokeResponse) XXX_Unmarshal(b []byte) error {
@ -637,7 +715,7 @@ func (m *InspectRequest) Reset() { *m = InspectRequest{} }
func (m *InspectRequest) String() string { return proto.CompactTextString(m) }
func (*InspectRequest) ProtoMessage() {}
func (*InspectRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{11}
return fileDescriptor_21300bfacc51fc2a, []int{13}
}
func (m *InspectRequest) XXX_Unmarshal(b []byte) error {
@ -683,7 +761,7 @@ func (m *InspectResponse) Reset() { *m = InspectResponse{} }
func (m *InspectResponse) String() string { return proto.CompactTextString(m) }
func (*InspectResponse) ProtoMessage() {}
func (*InspectResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{12}
return fileDescriptor_21300bfacc51fc2a, []int{14}
}
func (m *InspectResponse) XXX_Unmarshal(b []byte) error {
@ -726,7 +804,7 @@ func (m *TokenRequest) Reset() { *m = TokenRequest{} }
func (m *TokenRequest) String() string { return proto.CompactTextString(m) }
func (*TokenRequest) ProtoMessage() {}
func (*TokenRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{13}
return fileDescriptor_21300bfacc51fc2a, []int{15}
}
func (m *TokenRequest) XXX_Unmarshal(b []byte) error {
@ -793,7 +871,7 @@ func (m *TokenResponse) Reset() { *m = TokenResponse{} }
func (m *TokenResponse) String() string { return proto.CompactTextString(m) }
func (*TokenResponse) ProtoMessage() {}
func (*TokenResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{14}
return fileDescriptor_21300bfacc51fc2a, []int{16}
}
func (m *TokenResponse) XXX_Unmarshal(b []byte) error {
@ -836,7 +914,7 @@ func (m *Rule) Reset() { *m = Rule{} }
func (m *Rule) String() string { return proto.CompactTextString(m) }
func (*Rule) ProtoMessage() {}
func (*Rule) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{15}
return fileDescriptor_21300bfacc51fc2a, []int{17}
}
func (m *Rule) XXX_Unmarshal(b []byte) error {
@ -903,7 +981,7 @@ func (m *Options) Reset() { *m = Options{} }
func (m *Options) String() string { return proto.CompactTextString(m) }
func (*Options) ProtoMessage() {}
func (*Options) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{16}
return fileDescriptor_21300bfacc51fc2a, []int{18}
}
func (m *Options) XXX_Unmarshal(b []byte) error {
@ -943,7 +1021,7 @@ func (m *CreateRequest) Reset() { *m = CreateRequest{} }
func (m *CreateRequest) String() string { return proto.CompactTextString(m) }
func (*CreateRequest) ProtoMessage() {}
func (*CreateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{17}
return fileDescriptor_21300bfacc51fc2a, []int{19}
}
func (m *CreateRequest) XXX_Unmarshal(b []byte) error {
@ -988,7 +1066,7 @@ func (m *CreateResponse) Reset() { *m = CreateResponse{} }
func (m *CreateResponse) String() string { return proto.CompactTextString(m) }
func (*CreateResponse) ProtoMessage() {}
func (*CreateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{18}
return fileDescriptor_21300bfacc51fc2a, []int{20}
}
func (m *CreateResponse) XXX_Unmarshal(b []byte) error {
@ -1021,7 +1099,7 @@ func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
func (m *DeleteRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteRequest) ProtoMessage() {}
func (*DeleteRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{19}
return fileDescriptor_21300bfacc51fc2a, []int{21}
}
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
@ -1066,7 +1144,7 @@ func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
func (m *DeleteResponse) String() string { return proto.CompactTextString(m) }
func (*DeleteResponse) ProtoMessage() {}
func (*DeleteResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{20}
return fileDescriptor_21300bfacc51fc2a, []int{22}
}
func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
@ -1098,7 +1176,7 @@ func (m *ListRequest) Reset() { *m = ListRequest{} }
func (m *ListRequest) String() string { return proto.CompactTextString(m) }
func (*ListRequest) ProtoMessage() {}
func (*ListRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{21}
return fileDescriptor_21300bfacc51fc2a, []int{23}
}
func (m *ListRequest) XXX_Unmarshal(b []byte) error {
@ -1137,7 +1215,7 @@ func (m *ListResponse) Reset() { *m = ListResponse{} }
func (m *ListResponse) String() string { return proto.CompactTextString(m) }
func (*ListResponse) ProtoMessage() {}
func (*ListResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_21300bfacc51fc2a, []int{22}
return fileDescriptor_21300bfacc51fc2a, []int{24}
}
func (m *ListResponse) XXX_Unmarshal(b []byte) error {
@ -1169,6 +1247,8 @@ func init() {
proto.RegisterEnum("go.micro.auth.Access", Access_name, Access_value)
proto.RegisterType((*ListAccountsRequest)(nil), "go.micro.auth.ListAccountsRequest")
proto.RegisterType((*ListAccountsResponse)(nil), "go.micro.auth.ListAccountsResponse")
proto.RegisterType((*DeleteAccountRequest)(nil), "go.micro.auth.DeleteAccountRequest")
proto.RegisterType((*DeleteAccountResponse)(nil), "go.micro.auth.DeleteAccountResponse")
proto.RegisterType((*Token)(nil), "go.micro.auth.Token")
proto.RegisterType((*Account)(nil), "go.micro.auth.Account")
proto.RegisterMapType((map[string]string)(nil), "go.micro.auth.Account.MetadataEntry")
@ -1197,66 +1277,68 @@ func init() {
func init() { proto.RegisterFile("auth/service/proto/auth.proto", fileDescriptor_21300bfacc51fc2a) }
var fileDescriptor_21300bfacc51fc2a = []byte{
// 944 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x8f, 0xdb, 0x44,
0x14, 0x5f, 0xdb, 0xb1, 0x93, 0x7d, 0x49, 0x76, 0xa3, 0xe9, 0x52, 0xac, 0xb4, 0x5b, 0xb6, 0x2e,
0x52, 0x97, 0x0a, 0xb2, 0x55, 0x7a, 0x01, 0x7a, 0x80, 0x55, 0x13, 0x85, 0x16, 0x9a, 0xaa, 0x56,
0x11, 0x5c, 0x50, 0x65, 0x9c, 0x07, 0x6b, 0x36, 0x6b, 0x9b, 0x99, 0xf1, 0x8a, 0x1c, 0x39, 0xc3,
0x47, 0xe1, 0xc0, 0x99, 0xcf, 0xc2, 0x9d, 0x2f, 0xc0, 0x07, 0x40, 0x9e, 0x3f, 0x5e, 0xdb, 0x71,
0xaa, 0x68, 0xb9, 0xf4, 0xe6, 0xf7, 0xe6, 0xcd, 0x6f, 0xde, 0xef, 0x37, 0xef, 0x3d, 0x0f, 0x1c,
0x06, 0x19, 0x3f, 0x3b, 0x61, 0x48, 0x2f, 0xa3, 0x10, 0x4f, 0x52, 0x9a, 0xf0, 0xe4, 0x24, 0x77,
0x8d, 0xc4, 0x27, 0xe9, 0xff, 0x98, 0x8c, 0x2e, 0xa2, 0x90, 0x26, 0xa3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 0xf1,
0x6a, 0x7b, 0x1a, 0xde, 0x88, 0xc3, 0x7b, 0x6f, 0x8c, 0x29, 0xe0, 0xff, 0x36, 0xc0, 0xce, 0x2f,
0x82, 0x91, 0x19, 0x38, 0xb2, 0xea, 0x48, 0x3d, 0xa5, 0x4a, 0xe1, 0x0f, 0x0f, 0x37, 0xac, 0x16,
0xbc, 0x67, 0xe0, 0xc8, 0xca, 0x5a, 0x03, 0xaa, 0xd4, 0xf0, 0x1a, 0x50, 0xad, 0x1c, 0x77, 0xc8,
0xa9, 0xa2, 0x3b, 0x6c, 0xa0, 0xa2, 0x41, 0x6e, 0x35, 0xae, 0x69, 0x88, 0xef, 0x1d, 0xf1, 0xac,
0x7e, 0xf4, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x52, 0x98, 0x4d, 0x77, 0x0b, 0x00, 0x00,
// 976 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x6e, 0xdb, 0x46,
0x10, 0x36, 0xf5, 0xef, 0xd1, 0x8f, 0x85, 0x8d, 0x92, 0x08, 0x8a, 0x9d, 0x3a, 0x4c, 0x80, 0xb8,
0x41, 0x2b, 0x07, 0xca, 0xa5, 0x6d, 0x0e, 0xad, 0x11, 0x09, 0x6a, 0xd2, 0x46, 0x41, 0x88, 0x04,
0xcd, 0xcd, 0x60, 0xa9, 0x69, 0xcd, 0x5a, 0x26, 0xd9, 0xdd, 0xa5, 0x51, 0x1d, 0x7b, 0x6e, 0x1f,
0xa5, 0x87, 0x1e, 0x7a, 0xea, 0xb3, 0xf4, 0xde, 0x17, 0xe8, 0x03, 0x14, 0xdc, 0x9d, 0xa5, 0x29,
0x9a, 0x32, 0x04, 0xb7, 0x87, 0xdc, 0x38, 0x3f, 0x3b, 0xfb, 0xcd, 0xb7, 0x33, 0xb3, 0x4b, 0xd8,
0x73, 0x63, 0x79, 0x72,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c, 0x6c, 0xb1, 0x17, 0x50, 0xa7, 0x9e, 0x67, 0x7b, 0x39, 0xef, 0xd5,
0x29, 0x33, 0xb8, 0xbb, 0xce, 0x9c, 0xc6, 0x1a, 0x9b, 0x67, 0xd2, 0x9d, 0xc2, 0x86, 0xa1, 0x38,
0xbb, 0xc5, 0x46, 0x13, 0x65, 0xf4, 0x87, 0x05, 0x0d, 0xf3, 0x52, 0x64, 0xaf, 0xa1, 0x92, 0x30,
0xcc, 0xec, 0xdc, 0xa2, 0x82, 0x77, 0xe9, 0xe0, 0xfe, 0x95, 0x3e, 0x29, 0xca, 0xb7, 0x50, 0xd3,
0x75, 0xc0, 0xf2, 0x0b, 0x8a, 0xde, 0x95, 0x83, 0x07, 0x57, 0x3b, 0xa5, 0xb0, 0xff, 0xb2, 0xa0,
0x9a, 0x1c, 0xb0, 0x60, 0x53, 0xa8, 0xe9, 0x6a, 0x66, 0xf9, 0x54, 0x57, 0x1a, 0x6a, 0xb0, 0xb7,
0xc6, 0x9a, 0x22, 0x9d, 0xa6, 0x48, 0x77, 0x0b, 0x41, 0xac, 0x0b, 0x94, 0x2b, 0xf3, 0x2d, 0x76,
0x44, 0x2c, 0x0e, 0x0a, 0x18, 0x32, 0x41, 0xee, 0x14, 0xda, 0x4c, 0x88, 0x6f, 0x6b, 0xea, 0x0f,
0xe1, 0xc9, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6a, 0xc6, 0x9f, 0x04, 0x42, 0x0c, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1416,6 +1498,7 @@ var _Auth_serviceDesc = grpc.ServiceDesc{
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AccountsClient interface {
List(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
Delete(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error)
}
type accountsClient struct {
@ -1435,9 +1518,19 @@ func (c *accountsClient) List(ctx context.Context, in *ListAccountsRequest, opts
return out, nil
}
func (c *accountsClient) Delete(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error) {
out := new(DeleteAccountResponse)
err := c.cc.Invoke(ctx, "/go.micro.auth.Accounts/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AccountsServer is the server API for Accounts service.
type AccountsServer interface {
List(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
Delete(context.Context, *DeleteAccountRequest) (*DeleteAccountResponse, error)
}
// UnimplementedAccountsServer can be embedded to have forward compatible implementations.
@ -1447,6 +1540,9 @@ type UnimplementedAccountsServer struct {
func (*UnimplementedAccountsServer) List(ctx context.Context, req *ListAccountsRequest) (*ListAccountsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (*UnimplementedAccountsServer) Delete(ctx context.Context, req *DeleteAccountRequest) (*DeleteAccountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func RegisterAccountsServer(s *grpc.Server, srv AccountsServer) {
s.RegisterService(&_Accounts_serviceDesc, srv)
@ -1470,6 +1566,24 @@ func _Accounts_List_Handler(srv interface{}, ctx context.Context, dec func(inter
return interceptor(ctx, in, info, handler)
}
func _Accounts_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountsServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/go.micro.auth.Accounts/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountsServer).Delete(ctx, req.(*DeleteAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Accounts_serviceDesc = grpc.ServiceDesc{
ServiceName: "go.micro.auth.Accounts",
HandlerType: (*AccountsServer)(nil),
@ -1478,6 +1592,10 @@ var _Accounts_serviceDesc = grpc.ServiceDesc{
MethodName: "List",
Handler: _Accounts_List_Handler,
},
{
MethodName: "Delete",
Handler: _Accounts_Delete_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "auth/service/proto/auth.proto",

View File

@ -136,6 +136,7 @@ func NewAccountsEndpoints() []*api.Endpoint {
type AccountsService interface {
List(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error)
Delete(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*DeleteAccountResponse, error)
}
type accountsService struct {
@ -160,15 +161,27 @@ func (c *accountsService) List(ctx context.Context, in *ListAccountsRequest, opt
return out, nil
}
func (c *accountsService) Delete(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*DeleteAccountResponse, error) {
req := c.c.NewRequest(c.name, "Accounts.Delete", in)
out := new(DeleteAccountResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Accounts service
type AccountsHandler interface {
List(context.Context, *ListAccountsRequest, *ListAccountsResponse) error
Delete(context.Context, *DeleteAccountRequest, *DeleteAccountResponse) error
}
func RegisterAccountsHandler(s server.Server, hdlr AccountsHandler, opts ...server.HandlerOption) error {
type accounts interface {
List(ctx context.Context, in *ListAccountsRequest, out *ListAccountsResponse) error
Delete(ctx context.Context, in *DeleteAccountRequest, out *DeleteAccountResponse) error
}
type Accounts struct {
accounts
@ -185,6 +198,10 @@ func (h *accountsHandler) List(ctx context.Context, in *ListAccountsRequest, out
return h.AccountsHandler.List(ctx, in, out)
}
func (h *accountsHandler) Delete(ctx context.Context, in *DeleteAccountRequest, out *DeleteAccountResponse) error {
return h.AccountsHandler.Delete(ctx, in, out)
}
// Api Endpoints for Rules service
func NewRulesEndpoints() []*api.Endpoint {

View File

@ -10,6 +10,7 @@ service Auth {
service Accounts {
rpc List(ListAccountsRequest) returns (ListAccountsResponse) {};
rpc Delete(DeleteAccountRequest) returns (DeleteAccountResponse) {};
}
service Rules {
@ -26,6 +27,13 @@ message ListAccountsResponse {
repeated Account accounts = 1;
}
message DeleteAccountRequest {
string id = 1;
Options options = 2;
}
message DeleteAccountResponse {}
message Token {
string access_token = 1;
string refresh_token = 2;