Documentation ¶
Index ¶
- Variables
- func RegisterAuthorizationServer(s grpc.ServiceRegistrar, srv AuthorizationServer)
- type AuthorizationClient
- type AuthorizationServer
- type UnimplementedAuthorizationServer
- func (UnimplementedAuthorizationServer) ParseIdFromToken(context.Context, *common.EmptyMessage) (*accounts.AccountId, error)
- func (UnimplementedAuthorizationServer) RefreshToken(context.Context, *common.EmptyMessage) (*common.EmptyMessage, error)
- func (UnimplementedAuthorizationServer) ValidateToken(context.Context, *common.EmptyMessage) (*common.EmptyMessage, error)
- type UnsafeAuthorizationServer
Constants ¶
This section is empty.
Variables ¶
var Authorization_ServiceDesc = grpc.ServiceDesc{ ServiceName: "users.Authorization", HandlerType: (*AuthorizationServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RefreshToken", Handler: _Authorization_RefreshToken_Handler, }, { MethodName: "ValidateToken", Handler: _Authorization_ValidateToken_Handler, }, { MethodName: "ParseIdFromToken", Handler: _Authorization_ParseIdFromToken_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "users/authorization/authorization_v1.proto", }
Authorization_ServiceDesc is the grpc.ServiceDesc for Authorization service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAuthorizationServer ¶
func RegisterAuthorizationServer(s grpc.ServiceRegistrar, srv AuthorizationServer)
Types ¶
type AuthorizationClient ¶
type AuthorizationClient interface { /// Use to refresh access token RefreshToken(ctx context.Context, in *common.EmptyMessage, opts ...grpc.CallOption) (*common.EmptyMessage, error) /// Use To validate jwt token ValidateToken(ctx context.Context, in *common.EmptyMessage, opts ...grpc.CallOption) (*common.EmptyMessage, error) /// Use to parse user ID from token ParseIdFromToken(ctx context.Context, in *common.EmptyMessage, opts ...grpc.CallOption) (*accounts.AccountId, error) }
AuthorizationClient is the client API for Authorization 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 NewAuthorizationClient ¶
func NewAuthorizationClient(cc grpc.ClientConnInterface) AuthorizationClient
type AuthorizationServer ¶
type AuthorizationServer interface { /// Use to refresh access token RefreshToken(context.Context, *common.EmptyMessage) (*common.EmptyMessage, error) /// Use To validate jwt token ValidateToken(context.Context, *common.EmptyMessage) (*common.EmptyMessage, error) /// Use to parse user ID from token ParseIdFromToken(context.Context, *common.EmptyMessage) (*accounts.AccountId, error) // contains filtered or unexported methods }
AuthorizationServer is the server API for Authorization service. All implementations must embed UnimplementedAuthorizationServer for forward compatibility
type UnimplementedAuthorizationServer ¶
type UnimplementedAuthorizationServer struct { }
UnimplementedAuthorizationServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthorizationServer) ParseIdFromToken ¶
func (UnimplementedAuthorizationServer) ParseIdFromToken(context.Context, *common.EmptyMessage) (*accounts.AccountId, error)
func (UnimplementedAuthorizationServer) RefreshToken ¶
func (UnimplementedAuthorizationServer) RefreshToken(context.Context, *common.EmptyMessage) (*common.EmptyMessage, error)
func (UnimplementedAuthorizationServer) ValidateToken ¶
func (UnimplementedAuthorizationServer) ValidateToken(context.Context, *common.EmptyMessage) (*common.EmptyMessage, error)
type UnsafeAuthorizationServer ¶
type UnsafeAuthorizationServer interface {
// contains filtered or unexported methods
}
UnsafeAuthorizationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthorizationServer will result in compilation errors.