Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAuthHandler(handler any) server.RegistrationFunc
- type AuthClient
- type AuthHandler
- type DRPCAuthDescription
- type DRPCAuthServer
- type DRPCAuthUnimplementedServer
- type DRPCAuth_IntrospectStream
- type DRPCAuth_LoginStream
- type IntrospectResponse
- func (*IntrospectResponse) Descriptor() ([]byte, []int)deprecated
- func (x *IntrospectResponse) GetUsername() string
- func (*IntrospectResponse) ProtoMessage()
- func (x *IntrospectResponse) ProtoReflect() protoreflect.Message
- func (x *IntrospectResponse) Reset()
- func (x *IntrospectResponse) 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
Constants ¶
View Source
const EndpointAuthIntrospect = "/auth.v1.Auth/Introspect"
View Source
const EndpointAuthLogin = "/auth.v1.Auth/Login"
View Source
const HandlerAuth = "auth.v1.Auth"
HandlerAuth is the name of a service, it's here to static type/reference.
Variables ¶
View Source
var File_auth_v1_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthHandler ¶
func RegisterAuthHandler(handler any) server.RegistrationFunc
RegisterAuthHandler will return a registration function that can be provided to entrypoints as a handler registration.
Types ¶
type AuthClient ¶
type AuthClient struct {
// contains filtered or unexported fields
}
AuthClient is the client for auth.v1.Auth
func NewAuthClient ¶
func NewAuthClient(client client.Client) *AuthClient
NewAuthClient creates a new client for auth.v1.Auth
func (*AuthClient) Introspect ¶
func (c *AuthClient) Introspect(ctx context.Context, service string, req *emptypb.Empty, opts ...client.CallOption) (*IntrospectResponse, error)
Introspect requests Introspect.
func (*AuthClient) Login ¶
func (c *AuthClient) Login(ctx context.Context, service string, req *LoginRequest, opts ...client.CallOption) (*LoginResponse, error)
Login requests Login.
type AuthHandler ¶
type AuthHandler interface {
Login(ctx context.Context, req *LoginRequest) (*LoginResponse, error)
Introspect(ctx context.Context, req *emptypb.Empty) (*IntrospectResponse, error)
}
AuthHandler is the Handler for auth.v1.Auth
type DRPCAuthDescription ¶
type DRPCAuthDescription struct{}
func (DRPCAuthDescription) NumMethods ¶
func (DRPCAuthDescription) NumMethods() int
type DRPCAuthServer ¶
type DRPCAuthServer interface {
Login(context.Context, *LoginRequest) (*LoginResponse, error)
Introspect(context.Context, *emptypb.Empty) (*IntrospectResponse, error)
}
type DRPCAuthUnimplementedServer ¶
type DRPCAuthUnimplementedServer struct{}
func (*DRPCAuthUnimplementedServer) Introspect ¶
func (s *DRPCAuthUnimplementedServer) Introspect(context.Context, *emptypb.Empty) (*IntrospectResponse, error)
func (*DRPCAuthUnimplementedServer) Login ¶
func (s *DRPCAuthUnimplementedServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
type DRPCAuth_IntrospectStream ¶
type DRPCAuth_IntrospectStream interface {
drpc.Stream
SendAndClose(*IntrospectResponse) error
}
type DRPCAuth_LoginStream ¶
type DRPCAuth_LoginStream interface {
drpc.Stream
SendAndClose(*LoginResponse) error
}
type IntrospectResponse ¶
type IntrospectResponse struct {
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
// contains filtered or unexported fields
}
func (*IntrospectResponse) Descriptor
deprecated
func (*IntrospectResponse) Descriptor() ([]byte, []int)
Deprecated: Use IntrospectResponse.ProtoReflect.Descriptor instead.
func (*IntrospectResponse) GetUsername ¶
func (x *IntrospectResponse) GetUsername() string
func (*IntrospectResponse) ProtoMessage ¶
func (*IntrospectResponse) ProtoMessage()
func (*IntrospectResponse) ProtoReflect ¶
func (x *IntrospectResponse) ProtoReflect() protoreflect.Message
func (*IntrospectResponse) Reset ¶
func (x *IntrospectResponse) Reset()
func (*IntrospectResponse) String ¶
func (x *IntrospectResponse) String() string
type LoginRequest ¶
type LoginRequest struct {
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
Password string `protobuf:"bytes,2,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 {
Token string `protobuf:"bytes,1,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) GetToken ¶
func (x *LoginResponse) GetToken() 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
Click to show internal directories.
Click to hide internal directories.