Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- type AuthServiceClient
- type AuthServiceServer
- type BasicAuthRequest
- func (*BasicAuthRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BasicAuthRequest) GetPassword() string
- func (x *BasicAuthRequest) GetUsername() string
- func (*BasicAuthRequest) ProtoMessage()
- func (x *BasicAuthRequest) ProtoReflect() protoreflect.Message
- func (x *BasicAuthRequest) Reset()
- func (x *BasicAuthRequest) String() string
- type BasicAuthResponse
- func (*BasicAuthResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BasicAuthResponse) GetToken() string
- func (x *BasicAuthResponse) GetUserID() string
- func (*BasicAuthResponse) ProtoMessage()
- func (x *BasicAuthResponse) ProtoReflect() protoreflect.Message
- func (x *BasicAuthResponse) Reset()
- func (x *BasicAuthResponse) String() string
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetEmail() string
- func (x *RegisterRequest) GetPassword() string
- func (x *RegisterRequest) GetUsername() string
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type RegisterResponse
- type TokenAuthRequest
- type TokenAuthResponse
- func (*TokenAuthResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TokenAuthResponse) GetUserID() string
- func (x *TokenAuthResponse) GetValidUntil() *timestamp.Timestamp
- func (*TokenAuthResponse) ProtoMessage()
- func (x *TokenAuthResponse) ProtoReflect() protoreflect.Message
- func (x *TokenAuthResponse) Reset()
- func (x *TokenAuthResponse) String() string
- type UnimplementedAuthServiceServer
- func (UnimplementedAuthServiceServer) BasicAuth(context.Context, *BasicAuthRequest) (*BasicAuthResponse, error)
- func (UnimplementedAuthServiceServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
- func (UnimplementedAuthServiceServer) TokenAuth(context.Context, *TokenAuthRequest) (*TokenAuthResponse, error)
- type UnsafeAuthServiceServer
Constants ¶
const ( AuthService_Register_FullMethodName = "/userpb.AuthService/Register" AuthService_BasicAuth_FullMethodName = "/userpb.AuthService/BasicAuth" AuthService_TokenAuth_FullMethodName = "/userpb.AuthService/TokenAuth" )
Variables ¶
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "userpb.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _AuthService_Register_Handler, }, { MethodName: "BasicAuth", Handler: _AuthService_BasicAuth_Handler, }, { MethodName: "TokenAuth", Handler: _AuthService_TokenAuth_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "internal/user/userpb/service.proto", }
AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_internal_user_userpb_message_proto protoreflect.FileDescriptor
var File_internal_user_userpb_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
Types ¶
type AuthServiceClient ¶
type AuthServiceClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) BasicAuth(ctx context.Context, in *BasicAuthRequest, opts ...grpc.CallOption) (*BasicAuthResponse, error) TokenAuth(ctx context.Context, in *TokenAuthRequest, opts ...grpc.CallOption) (*TokenAuthResponse, error) }
AuthServiceClient is the client API for AuthService 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 NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface { Register(context.Context, *RegisterRequest) (*RegisterResponse, error) BasicAuth(context.Context, *BasicAuthRequest) (*BasicAuthResponse, error) TokenAuth(context.Context, *TokenAuthRequest) (*TokenAuthResponse, error) // contains filtered or unexported methods }
AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility.
type BasicAuthRequest ¶
type BasicAuthRequest 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 (*BasicAuthRequest) Descriptor
deprecated
func (*BasicAuthRequest) Descriptor() ([]byte, []int)
Deprecated: Use BasicAuthRequest.ProtoReflect.Descriptor instead.
func (*BasicAuthRequest) GetPassword ¶
func (x *BasicAuthRequest) GetPassword() string
func (*BasicAuthRequest) GetUsername ¶
func (x *BasicAuthRequest) GetUsername() string
func (*BasicAuthRequest) ProtoMessage ¶
func (*BasicAuthRequest) ProtoMessage()
func (*BasicAuthRequest) ProtoReflect ¶
func (x *BasicAuthRequest) ProtoReflect() protoreflect.Message
func (*BasicAuthRequest) Reset ¶
func (x *BasicAuthRequest) Reset()
func (*BasicAuthRequest) String ¶
func (x *BasicAuthRequest) String() string
type BasicAuthResponse ¶
type BasicAuthResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"` // contains filtered or unexported fields }
func (*BasicAuthResponse) Descriptor
deprecated
func (*BasicAuthResponse) Descriptor() ([]byte, []int)
Deprecated: Use BasicAuthResponse.ProtoReflect.Descriptor instead.
func (*BasicAuthResponse) GetToken ¶
func (x *BasicAuthResponse) GetToken() string
func (*BasicAuthResponse) GetUserID ¶
func (x *BasicAuthResponse) GetUserID() string
func (*BasicAuthResponse) ProtoMessage ¶
func (*BasicAuthResponse) ProtoMessage()
func (*BasicAuthResponse) ProtoReflect ¶
func (x *BasicAuthResponse) ProtoReflect() protoreflect.Message
func (*BasicAuthResponse) Reset ¶
func (x *BasicAuthResponse) Reset()
func (*BasicAuthResponse) String ¶
func (x *BasicAuthResponse) String() string
type RegisterRequest ¶
type RegisterRequest 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"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetEmail ¶
func (x *RegisterRequest) GetEmail() string
func (*RegisterRequest) GetPassword ¶
func (x *RegisterRequest) GetPassword() string
func (*RegisterRequest) GetUsername ¶
func (x *RegisterRequest) GetUsername() string
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` // contains filtered or unexported fields }
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) GetUserID ¶
func (x *RegisterResponse) GetUserID() string
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type TokenAuthRequest ¶
type TokenAuthRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*TokenAuthRequest) Descriptor
deprecated
func (*TokenAuthRequest) Descriptor() ([]byte, []int)
Deprecated: Use TokenAuthRequest.ProtoReflect.Descriptor instead.
func (*TokenAuthRequest) GetToken ¶
func (x *TokenAuthRequest) GetToken() string
func (*TokenAuthRequest) ProtoMessage ¶
func (*TokenAuthRequest) ProtoMessage()
func (*TokenAuthRequest) ProtoReflect ¶
func (x *TokenAuthRequest) ProtoReflect() protoreflect.Message
func (*TokenAuthRequest) Reset ¶
func (x *TokenAuthRequest) Reset()
func (*TokenAuthRequest) String ¶
func (x *TokenAuthRequest) String() string
type TokenAuthResponse ¶
type TokenAuthResponse struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` ValidUntil *timestamp.Timestamp `protobuf:"bytes,2,opt,name=validUntil,proto3" json:"validUntil,omitempty"` // contains filtered or unexported fields }
func (*TokenAuthResponse) Descriptor
deprecated
func (*TokenAuthResponse) Descriptor() ([]byte, []int)
Deprecated: Use TokenAuthResponse.ProtoReflect.Descriptor instead.
func (*TokenAuthResponse) GetUserID ¶
func (x *TokenAuthResponse) GetUserID() string
func (*TokenAuthResponse) GetValidUntil ¶
func (x *TokenAuthResponse) GetValidUntil() *timestamp.Timestamp
func (*TokenAuthResponse) ProtoMessage ¶
func (*TokenAuthResponse) ProtoMessage()
func (*TokenAuthResponse) ProtoReflect ¶
func (x *TokenAuthResponse) ProtoReflect() protoreflect.Message
func (*TokenAuthResponse) Reset ¶
func (x *TokenAuthResponse) Reset()
func (*TokenAuthResponse) String ¶
func (x *TokenAuthResponse) String() string
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct{}
UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAuthServiceServer) BasicAuth ¶
func (UnimplementedAuthServiceServer) BasicAuth(context.Context, *BasicAuthRequest) (*BasicAuthResponse, error)
func (UnimplementedAuthServiceServer) Register ¶
func (UnimplementedAuthServiceServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
func (UnimplementedAuthServiceServer) TokenAuth ¶
func (UnimplementedAuthServiceServer) TokenAuth(context.Context, *TokenAuthRequest) (*TokenAuthResponse, error)
type UnsafeAuthServiceServer ¶
type UnsafeAuthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServiceServer will result in compilation errors.