rpc

package
v0.0.0-...-ebb038d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package rpc is a generated GoMock package.

Index

Constants

View Source
const (
	ApiSample_Login_FullMethodName        = "/ApiSample/Login"
	ApiSample_GetPrincipal_FullMethodName = "/ApiSample/GetPrincipal"
)

Variables

View Source
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)

View Source
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 (server *ApiSampleGrpcServer) GetPrincipal(ctx context.Context, _ *emptypb.Empty) (*Principal, error)

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) Descriptor() ([]byte, []int)

Deprecated: Use Exception.ProtoReflect.Descriptor instead.

func (*Exception) GetCode

func (x *Exception) GetCode() uint32

func (*Exception) GetErrors

func (x *Exception) GetErrors() []string

func (*Exception) GetMessage

func (x *Exception) GetMessage() string

func (*Exception) ProtoMessage

func (*Exception) ProtoMessage()

func (*Exception) ProtoReflect

func (x *Exception) ProtoReflect() protoreflect.Message

func (*Exception) Reset

func (x *Exception) Reset()

func (*Exception) String

func (x *Exception) String() string

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

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

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

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

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

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) Descriptor() ([]byte, []int)

Deprecated: Use Principal.ProtoReflect.Descriptor instead.

func (*Principal) GetEnabled

func (x *Principal) GetEnabled() bool

func (*Principal) GetNonExpired

func (x *Principal) GetNonExpired() bool

func (*Principal) GetNonLocked

func (x *Principal) GetNonLocked() bool

func (*Principal) GetPassphrase

func (x *Principal) GetPassphrase() string

func (*Principal) GetPassword

func (x *Principal) GetPassword() string

func (*Principal) GetPasswordNonExpired

func (x *Principal) GetPasswordNonExpired() bool

func (*Principal) GetResources

func (x *Principal) GetResources() []string

func (*Principal) GetRole

func (x *Principal) GetRole() string

func (*Principal) GetSignupDone

func (x *Principal) GetSignupDone() bool

func (*Principal) GetToken

func (x *Principal) GetToken() string

func (*Principal) GetUsername

func (x *Principal) GetUsername() string

func (*Principal) ProtoMessage

func (*Principal) ProtoMessage()

func (*Principal) ProtoReflect

func (x *Principal) ProtoReflect() protoreflect.Message

func (*Principal) Reset

func (x *Principal) Reset()

func (*Principal) String

func (x *Principal) String() string

type UnimplementedApiSampleServer

type UnimplementedApiSampleServer struct {
}

UnimplementedApiSampleServer must be embedded to have forward compatible implementations.

func (UnimplementedApiSampleServer) GetPrincipal

func (UnimplementedApiSampleServer) Login

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL