Documentation ¶
Overview ¶
Package rpc is a generated GoMock package.
Index ¶
- Constants
- Variables
- func RegisterApiSampleServer(s grpc.ServiceRegistrar, srv ApiSampleServer)
- type ApiSampleClient
- type ApiSampleGrpcServer
- type ApiSampleServer
- type Exception
- func (*Exception) Descriptor() ([]byte, []int)deprecated
- func (x *Exception) GetCode() uint32
- func (x *Exception) GetErrors() []string
- func (x *Exception) GetMessage() string
- func (*Exception) ProtoMessage()
- func (x *Exception) ProtoReflect() protoreflect.Message
- func (x *Exception) Reset()
- func (x *Exception) String() string
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetPassword() string
- func (x *LoginRequest) GetUsername() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResponse) GetResources() []string
- func (x *LoginResponse) GetRole() string
- func (x *LoginResponse) GetToken() string
- func (x *LoginResponse) GetUsername() string
- func (*LoginResponse) ProtoMessage()
- func (x *LoginResponse) ProtoReflect() protoreflect.Message
- func (x *LoginResponse) Reset()
- func (x *LoginResponse) String() string
- type MockApiSampleClient
- func (m *MockApiSampleClient) EXPECT() *MockApiSampleClientMockRecorder
- func (m *MockApiSampleClient) GetPrincipal(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Principal, error)
- func (m *MockApiSampleClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
- type MockApiSampleClientMockRecorder
- type MockApiSampleServer
- type MockApiSampleServerMockRecorder
- type MockUnsafeApiSampleServer
- type MockUnsafeApiSampleServerMockRecorder
- type Principal
- func (*Principal) Descriptor() ([]byte, []int)deprecated
- func (x *Principal) GetEnabled() bool
- func (x *Principal) GetNonExpired() bool
- func (x *Principal) GetNonLocked() bool
- func (x *Principal) GetPassphrase() string
- func (x *Principal) GetPassword() string
- func (x *Principal) GetPasswordNonExpired() bool
- func (x *Principal) GetResources() []string
- func (x *Principal) GetRole() string
- func (x *Principal) GetSignupDone() bool
- func (x *Principal) GetToken() string
- func (x *Principal) GetUsername() string
- func (*Principal) ProtoMessage()
- func (x *Principal) ProtoReflect() protoreflect.Message
- func (x *Principal) Reset()
- func (x *Principal) String() string
- type UnimplementedApiSampleServer
- type UnsafeApiSampleServer
Constants ¶
const ( ApiSample_Login_FullMethodName = "/ApiSample/Login" ApiSample_GetPrincipal_FullMethodName = "/ApiSample/GetPrincipal" )
Variables ¶
var ApiSample_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ApiSample", HandlerType: (*ApiSampleServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _ApiSample_Login_Handler, }, { MethodName: "GetPrincipal", Handler: _ApiSample_GetPrincipal_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "resources/proto/api.proto", }
ApiSample_ServiceDesc is the grpc.ServiceDesc for ApiSample service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_resources_proto_api_proto protoreflect.FileDescriptor
Functions ¶
func RegisterApiSampleServer ¶
func RegisterApiSampleServer(s grpc.ServiceRegistrar, srv ApiSampleServer)
Types ¶
type ApiSampleClient ¶
type ApiSampleClient interface { Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) GetPrincipal(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Principal, error) }
ApiSampleClient is the client API for ApiSample service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewApiSampleClient ¶
func NewApiSampleClient(cc grpc.ClientConnInterface) ApiSampleClient
type ApiSampleGrpcServer ¶
type ApiSampleGrpcServer struct {
// contains filtered or unexported fields
}
func NewApiSampleGrpcServer ¶
func NewApiSampleGrpcServer(authenticationService feather_security.AuthenticationService, authorizationService feather_security.AuthorizationService, principalManager feather_security.PrincipalManager) *ApiSampleGrpcServer
func (*ApiSampleGrpcServer) GetPrincipal ¶
func (*ApiSampleGrpcServer) Login ¶
func (server *ApiSampleGrpcServer) Login(ctx context.Context, request *LoginRequest) (*LoginResponse, error)
type ApiSampleServer ¶
type ApiSampleServer interface { Login(context.Context, *LoginRequest) (*LoginResponse, error) GetPrincipal(context.Context, *emptypb.Empty) (*Principal, error) // contains filtered or unexported methods }
ApiSampleServer is the server API for ApiSample service. All implementations must embed UnimplementedApiSampleServer for forward compatibility
type Exception ¶
type Exception struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Errors []string `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` // contains filtered or unexported fields }
func (*Exception) Descriptor
deprecated
func (*Exception) GetMessage ¶
func (*Exception) ProtoMessage ¶
func (*Exception) ProtoMessage()
func (*Exception) ProtoReflect ¶
func (x *Exception) ProtoReflect() protoreflect.Message
type LoginRequest ¶
type LoginRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) GetUsername ¶
func (x *LoginRequest) GetUsername() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type LoginResponse ¶
type LoginResponse struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` Resources []string `protobuf:"bytes,10,rep,name=resources,proto3" json:"resources,omitempty"` Token string `protobuf:"bytes,11,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetResources ¶
func (x *LoginResponse) GetResources() []string
func (*LoginResponse) GetRole ¶
func (x *LoginResponse) GetRole() string
func (*LoginResponse) GetToken ¶
func (x *LoginResponse) GetToken() string
func (*LoginResponse) GetUsername ¶
func (x *LoginResponse) GetUsername() string
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type MockApiSampleClient ¶
type MockApiSampleClient struct {
// contains filtered or unexported fields
}
MockApiSampleClient is a mock of ApiSampleClient interface.
func NewMockApiSampleClient ¶
func NewMockApiSampleClient(ctrl *gomock.Controller) *MockApiSampleClient
NewMockApiSampleClient creates a new mock instance.
func (*MockApiSampleClient) EXPECT ¶
func (m *MockApiSampleClient) EXPECT() *MockApiSampleClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockApiSampleClient) GetPrincipal ¶
func (m *MockApiSampleClient) GetPrincipal(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Principal, error)
GetPrincipal mocks base method.
func (*MockApiSampleClient) Login ¶
func (m *MockApiSampleClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
Login mocks base method.
type MockApiSampleClientMockRecorder ¶
type MockApiSampleClientMockRecorder struct {
// contains filtered or unexported fields
}
MockApiSampleClientMockRecorder is the mock recorder for MockApiSampleClient.
func (*MockApiSampleClientMockRecorder) GetPrincipal ¶
func (mr *MockApiSampleClientMockRecorder) GetPrincipal(ctx, in interface{}, opts ...interface{}) *gomock.Call
GetPrincipal indicates an expected call of GetPrincipal.
func (*MockApiSampleClientMockRecorder) Login ¶
func (mr *MockApiSampleClientMockRecorder) Login(ctx, in interface{}, opts ...interface{}) *gomock.Call
Login indicates an expected call of Login.
type MockApiSampleServer ¶
type MockApiSampleServer struct {
// contains filtered or unexported fields
}
MockApiSampleServer is a mock of ApiSampleServer interface.
func NewMockApiSampleServer ¶
func NewMockApiSampleServer(ctrl *gomock.Controller) *MockApiSampleServer
NewMockApiSampleServer creates a new mock instance.
func (*MockApiSampleServer) EXPECT ¶
func (m *MockApiSampleServer) EXPECT() *MockApiSampleServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockApiSampleServer) GetPrincipal ¶
func (m *MockApiSampleServer) GetPrincipal(arg0 context.Context, arg1 *emptypb.Empty) (*Principal, error)
GetPrincipal mocks base method.
func (*MockApiSampleServer) Login ¶
func (m *MockApiSampleServer) Login(arg0 context.Context, arg1 *LoginRequest) (*LoginResponse, error)
Login mocks base method.
type MockApiSampleServerMockRecorder ¶
type MockApiSampleServerMockRecorder struct {
// contains filtered or unexported fields
}
MockApiSampleServerMockRecorder is the mock recorder for MockApiSampleServer.
func (*MockApiSampleServerMockRecorder) GetPrincipal ¶
func (mr *MockApiSampleServerMockRecorder) GetPrincipal(arg0, arg1 interface{}) *gomock.Call
GetPrincipal indicates an expected call of GetPrincipal.
func (*MockApiSampleServerMockRecorder) Login ¶
func (mr *MockApiSampleServerMockRecorder) Login(arg0, arg1 interface{}) *gomock.Call
Login indicates an expected call of Login.
type MockUnsafeApiSampleServer ¶
type MockUnsafeApiSampleServer struct {
// contains filtered or unexported fields
}
MockUnsafeApiSampleServer is a mock of UnsafeApiSampleServer interface.
func NewMockUnsafeApiSampleServer ¶
func NewMockUnsafeApiSampleServer(ctrl *gomock.Controller) *MockUnsafeApiSampleServer
NewMockUnsafeApiSampleServer creates a new mock instance.
func (*MockUnsafeApiSampleServer) EXPECT ¶
func (m *MockUnsafeApiSampleServer) EXPECT() *MockUnsafeApiSampleServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockUnsafeApiSampleServerMockRecorder ¶
type MockUnsafeApiSampleServerMockRecorder struct {
// contains filtered or unexported fields
}
MockUnsafeApiSampleServerMockRecorder is the mock recorder for MockUnsafeApiSampleServer.
type Principal ¶
type Principal struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` Passphrase string `protobuf:"bytes,4,opt,name=passphrase,proto3" json:"passphrase,omitempty"` Enabled bool `protobuf:"varint,5,opt,name=enabled,proto3" json:"enabled,omitempty"` NonLocked bool `protobuf:"varint,6,opt,name=non_locked,json=nonLocked,proto3" json:"non_locked,omitempty"` NonExpired bool `protobuf:"varint,7,opt,name=non_expired,json=nonExpired,proto3" json:"non_expired,omitempty"` PasswordNonExpired bool `protobuf:"varint,8,opt,name=password_non_expired,json=passwordNonExpired,proto3" json:"password_non_expired,omitempty"` SignupDone bool `protobuf:"varint,9,opt,name=signup_done,json=signupDone,proto3" json:"signup_done,omitempty"` Resources []string `protobuf:"bytes,10,rep,name=resources,proto3" json:"resources,omitempty"` Token string `protobuf:"bytes,11,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*Principal) Descriptor
deprecated
func (*Principal) GetEnabled ¶
func (*Principal) GetNonExpired ¶
func (*Principal) GetNonLocked ¶
func (*Principal) GetPassphrase ¶
func (*Principal) GetPassword ¶
func (*Principal) GetPasswordNonExpired ¶
func (*Principal) GetResources ¶
func (*Principal) GetSignupDone ¶
func (*Principal) GetUsername ¶
func (*Principal) ProtoMessage ¶
func (*Principal) ProtoMessage()
func (*Principal) ProtoReflect ¶
func (x *Principal) ProtoReflect() protoreflect.Message
type UnimplementedApiSampleServer ¶
type UnimplementedApiSampleServer struct { }
UnimplementedApiSampleServer must be embedded to have forward compatible implementations.
func (UnimplementedApiSampleServer) GetPrincipal ¶
func (UnimplementedApiSampleServer) Login ¶
func (UnimplementedApiSampleServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
type UnsafeApiSampleServer ¶
type UnsafeApiSampleServer interface {
// contains filtered or unexported methods
}
UnsafeApiSampleServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ApiSampleServer will result in compilation errors.