Documentation ¶
Overview ¶
Package auth_v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error
- func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- type AuthServiceClient
- type AuthServiceServer
- type AuthToken
- func (*AuthToken) Descriptor() ([]byte, []int)deprecated
- func (x *AuthToken) GetAccessToken() string
- func (x *AuthToken) GetExpiresIn() int64
- func (x *AuthToken) GetTokenType() string
- func (*AuthToken) ProtoMessage()
- func (x *AuthToken) ProtoReflect() protoreflect.Message
- func (x *AuthToken) Reset()
- func (x *AuthToken) String() string
- type GetJwksRequest
- type GetJwksResponse
- type LoginPasswordRequest
- func (*LoginPasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginPasswordRequest) GetPassword() string
- func (x *LoginPasswordRequest) GetUserId() string
- func (*LoginPasswordRequest) ProtoMessage()
- func (x *LoginPasswordRequest) ProtoReflect() protoreflect.Message
- func (x *LoginPasswordRequest) Reset()
- func (x *LoginPasswordRequest) String() string
- type LoginPasswordResponse
- func (*LoginPasswordResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginPasswordResponse) GetData() *AuthToken
- func (x *LoginPasswordResponse) GetDetail() string
- func (*LoginPasswordResponse) ProtoMessage()
- func (x *LoginPasswordResponse) ProtoReflect() protoreflect.Message
- func (x *LoginPasswordResponse) Reset()
- func (x *LoginPasswordResponse) String() string
- type PublicEcJWK
- func (*PublicEcJWK) Descriptor() ([]byte, []int)deprecated
- func (x *PublicEcJWK) GetAlg() string
- func (x *PublicEcJWK) GetCrv() string
- func (x *PublicEcJWK) GetKty() string
- func (x *PublicEcJWK) GetUse() string
- func (x *PublicEcJWK) GetX() string
- func (x *PublicEcJWK) GetY() string
- func (*PublicEcJWK) ProtoMessage()
- func (x *PublicEcJWK) ProtoReflect() protoreflect.Message
- func (x *PublicEcJWK) Reset()
- func (x *PublicEcJWK) String() string
- type SetPasswordRequest
- func (*SetPasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetPasswordRequest) GetPassword() string
- func (x *SetPasswordRequest) GetUserId() string
- func (*SetPasswordRequest) ProtoMessage()
- func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message
- func (x *SetPasswordRequest) Reset()
- func (x *SetPasswordRequest) String() string
- type SetPasswordResponse
- func (*SetPasswordResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetPasswordResponse) GetDetail() string
- func (*SetPasswordResponse) ProtoMessage()
- func (x *SetPasswordResponse) ProtoReflect() protoreflect.Message
- func (x *SetPasswordResponse) Reset()
- func (x *SetPasswordResponse) String() string
- type UnimplementedAuthServiceServer
- func (UnimplementedAuthServiceServer) GetJwks(context.Context, *GetJwksRequest) (*GetJwksResponse, error)
- func (UnimplementedAuthServiceServer) LoginPassword(context.Context, *LoginPasswordRequest) (*LoginPasswordResponse, error)
- func (UnimplementedAuthServiceServer) ProcessUserDeletedEvent(context.Context, *v11.UserDeletedEvent) (*emptypb.Empty, error)
- func (UnimplementedAuthServiceServer) ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error)
- func (UnimplementedAuthServiceServer) SetPassword(context.Context, *SetPasswordRequest) (*SetPasswordResponse, error)
- type UnsafeAuthServiceServer
Constants ¶
const ( AuthService_ServiceInfo_FullMethodName = "/stocklet.auth.v1.AuthService/ServiceInfo" AuthService_GetJwks_FullMethodName = "/stocklet.auth.v1.AuthService/GetJwks" AuthService_LoginPassword_FullMethodName = "/stocklet.auth.v1.AuthService/LoginPassword" AuthService_SetPassword_FullMethodName = "/stocklet.auth.v1.AuthService/SetPassword" AuthService_ProcessUserDeletedEvent_FullMethodName = "/stocklet.auth.v1.AuthService/ProcessUserDeletedEvent" )
Variables ¶
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "stocklet.auth.v1.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ServiceInfo", Handler: _AuthService_ServiceInfo_Handler, }, { MethodName: "GetJwks", Handler: _AuthService_GetJwks_Handler, }, { MethodName: "LoginPassword", Handler: _AuthService_LoginPassword_Handler, }, { MethodName: "SetPassword", Handler: _AuthService_SetPassword_Handler, }, { MethodName: "ProcessUserDeletedEvent", Handler: _AuthService_ProcessUserDeletedEvent_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stocklet/auth/v1/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_stocklet_auth_v1_service_proto protoreflect.FileDescriptor
var File_stocklet_auth_v1_types_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServiceHandler ¶
func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAuthServiceHandler registers the http handlers for service AuthService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAuthServiceHandlerClient ¶
func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error
RegisterAuthServiceHandlerClient registers the http handlers for service AuthService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthServiceClient" to call the correct interceptors.
func RegisterAuthServiceHandlerFromEndpoint ¶
func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAuthServiceHandlerServer ¶
func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error
RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux". UnaryRPC :call AuthServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead.
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
Types ¶
type AuthServiceClient ¶
type AuthServiceClient interface { // View information about the service. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE ServiceInfo(ctx context.Context, in *v1.ServiceInfoRequest, opts ...grpc.CallOption) (*v1.ServiceInfoResponse, error) GetJwks(ctx context.Context, in *GetJwksRequest, opts ...grpc.CallOption) (*GetJwksResponse, error) LoginPassword(ctx context.Context, in *LoginPasswordRequest, opts ...grpc.CallOption) (*LoginPasswordResponse, error) SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*SetPasswordResponse, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessUserDeletedEvent(ctx context.Context, in *v11.UserDeletedEvent, opts ...grpc.CallOption) (*emptypb.Empty, 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 { // View information about the service. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error) GetJwks(context.Context, *GetJwksRequest) (*GetJwksResponse, error) LoginPassword(context.Context, *LoginPasswordRequest) (*LoginPasswordResponse, error) SetPassword(context.Context, *SetPasswordRequest) (*SetPasswordResponse, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessUserDeletedEvent(context.Context, *v11.UserDeletedEvent) (*emptypb.Empty, error) // contains filtered or unexported methods }
AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility
type AuthToken ¶
type AuthToken struct { TokenType string `protobuf:"bytes,1,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` ExpiresIn int64 `protobuf:"varint,3,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` // contains filtered or unexported fields }
func (*AuthToken) Descriptor
deprecated
func (*AuthToken) GetAccessToken ¶
func (*AuthToken) GetExpiresIn ¶
func (*AuthToken) GetTokenType ¶
func (*AuthToken) ProtoMessage ¶
func (*AuthToken) ProtoMessage()
func (*AuthToken) ProtoReflect ¶
func (x *AuthToken) ProtoReflect() protoreflect.Message
type GetJwksRequest ¶
type GetJwksRequest struct {
// contains filtered or unexported fields
}
func (*GetJwksRequest) Descriptor
deprecated
func (*GetJwksRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetJwksRequest.ProtoReflect.Descriptor instead.
func (*GetJwksRequest) ProtoMessage ¶
func (*GetJwksRequest) ProtoMessage()
func (*GetJwksRequest) ProtoReflect ¶
func (x *GetJwksRequest) ProtoReflect() protoreflect.Message
func (*GetJwksRequest) Reset ¶
func (x *GetJwksRequest) Reset()
func (*GetJwksRequest) String ¶
func (x *GetJwksRequest) String() string
type GetJwksResponse ¶
type GetJwksResponse struct { Keys []*PublicEcJWK `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` // contains filtered or unexported fields }
func (*GetJwksResponse) Descriptor
deprecated
func (*GetJwksResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetJwksResponse.ProtoReflect.Descriptor instead.
func (*GetJwksResponse) GetKeys ¶
func (x *GetJwksResponse) GetKeys() []*PublicEcJWK
func (*GetJwksResponse) ProtoMessage ¶
func (*GetJwksResponse) ProtoMessage()
func (*GetJwksResponse) ProtoReflect ¶
func (x *GetJwksResponse) ProtoReflect() protoreflect.Message
func (*GetJwksResponse) Reset ¶
func (x *GetJwksResponse) Reset()
func (*GetJwksResponse) String ¶
func (x *GetJwksResponse) String() string
type LoginPasswordRequest ¶
type LoginPasswordRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginPasswordRequest) Descriptor
deprecated
func (*LoginPasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginPasswordRequest.ProtoReflect.Descriptor instead.
func (*LoginPasswordRequest) GetPassword ¶
func (x *LoginPasswordRequest) GetPassword() string
func (*LoginPasswordRequest) GetUserId ¶
func (x *LoginPasswordRequest) GetUserId() string
func (*LoginPasswordRequest) ProtoMessage ¶
func (*LoginPasswordRequest) ProtoMessage()
func (*LoginPasswordRequest) ProtoReflect ¶
func (x *LoginPasswordRequest) ProtoReflect() protoreflect.Message
func (*LoginPasswordRequest) Reset ¶
func (x *LoginPasswordRequest) Reset()
func (*LoginPasswordRequest) String ¶
func (x *LoginPasswordRequest) String() string
type LoginPasswordResponse ¶
type LoginPasswordResponse struct { Detail string `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail,omitempty"` Data *AuthToken `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*LoginPasswordResponse) Descriptor
deprecated
func (*LoginPasswordResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginPasswordResponse.ProtoReflect.Descriptor instead.
func (*LoginPasswordResponse) GetData ¶
func (x *LoginPasswordResponse) GetData() *AuthToken
func (*LoginPasswordResponse) GetDetail ¶
func (x *LoginPasswordResponse) GetDetail() string
func (*LoginPasswordResponse) ProtoMessage ¶
func (*LoginPasswordResponse) ProtoMessage()
func (*LoginPasswordResponse) ProtoReflect ¶
func (x *LoginPasswordResponse) ProtoReflect() protoreflect.Message
func (*LoginPasswordResponse) Reset ¶
func (x *LoginPasswordResponse) Reset()
func (*LoginPasswordResponse) String ¶
func (x *LoginPasswordResponse) String() string
type PublicEcJWK ¶
type PublicEcJWK struct { Kty string `protobuf:"bytes,1,opt,name=kty,proto3" json:"kty,omitempty"` Use string `protobuf:"bytes,2,opt,name=use,proto3" json:"use,omitempty"` Alg string `protobuf:"bytes,3,opt,name=alg,proto3" json:"alg,omitempty"` Crv string `protobuf:"bytes,4,opt,name=crv,proto3" json:"crv,omitempty"` X string `protobuf:"bytes,5,opt,name=x,proto3" json:"x,omitempty"` Y string `protobuf:"bytes,6,opt,name=y,proto3" json:"y,omitempty"` // contains filtered or unexported fields }
func (*PublicEcJWK) Descriptor
deprecated
func (*PublicEcJWK) Descriptor() ([]byte, []int)
Deprecated: Use PublicEcJWK.ProtoReflect.Descriptor instead.
func (*PublicEcJWK) GetAlg ¶
func (x *PublicEcJWK) GetAlg() string
func (*PublicEcJWK) GetCrv ¶
func (x *PublicEcJWK) GetCrv() string
func (*PublicEcJWK) GetKty ¶
func (x *PublicEcJWK) GetKty() string
func (*PublicEcJWK) GetUse ¶
func (x *PublicEcJWK) GetUse() string
func (*PublicEcJWK) GetX ¶
func (x *PublicEcJWK) GetX() string
func (*PublicEcJWK) GetY ¶
func (x *PublicEcJWK) GetY() string
func (*PublicEcJWK) ProtoMessage ¶
func (*PublicEcJWK) ProtoMessage()
func (*PublicEcJWK) ProtoReflect ¶
func (x *PublicEcJWK) ProtoReflect() protoreflect.Message
func (*PublicEcJWK) Reset ¶
func (x *PublicEcJWK) Reset()
func (*PublicEcJWK) String ¶
func (x *PublicEcJWK) String() string
type SetPasswordRequest ¶
type SetPasswordRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*SetPasswordRequest) Descriptor
deprecated
func (*SetPasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetPasswordRequest.ProtoReflect.Descriptor instead.
func (*SetPasswordRequest) GetPassword ¶
func (x *SetPasswordRequest) GetPassword() string
func (*SetPasswordRequest) GetUserId ¶
func (x *SetPasswordRequest) GetUserId() string
func (*SetPasswordRequest) ProtoMessage ¶
func (*SetPasswordRequest) ProtoMessage()
func (*SetPasswordRequest) ProtoReflect ¶
func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message
func (*SetPasswordRequest) Reset ¶
func (x *SetPasswordRequest) Reset()
func (*SetPasswordRequest) String ¶
func (x *SetPasswordRequest) String() string
type SetPasswordResponse ¶
type SetPasswordResponse struct { Detail string `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail,omitempty"` // contains filtered or unexported fields }
func (*SetPasswordResponse) Descriptor
deprecated
func (*SetPasswordResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetPasswordResponse.ProtoReflect.Descriptor instead.
func (*SetPasswordResponse) GetDetail ¶
func (x *SetPasswordResponse) GetDetail() string
func (*SetPasswordResponse) ProtoMessage ¶
func (*SetPasswordResponse) ProtoMessage()
func (*SetPasswordResponse) ProtoReflect ¶
func (x *SetPasswordResponse) ProtoReflect() protoreflect.Message
func (*SetPasswordResponse) Reset ¶
func (x *SetPasswordResponse) Reset()
func (*SetPasswordResponse) String ¶
func (x *SetPasswordResponse) String() string
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct { }
UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServiceServer) GetJwks ¶
func (UnimplementedAuthServiceServer) GetJwks(context.Context, *GetJwksRequest) (*GetJwksResponse, error)
func (UnimplementedAuthServiceServer) LoginPassword ¶
func (UnimplementedAuthServiceServer) LoginPassword(context.Context, *LoginPasswordRequest) (*LoginPasswordResponse, error)
func (UnimplementedAuthServiceServer) ProcessUserDeletedEvent ¶
func (UnimplementedAuthServiceServer) ProcessUserDeletedEvent(context.Context, *v11.UserDeletedEvent) (*emptypb.Empty, error)
func (UnimplementedAuthServiceServer) ServiceInfo ¶
func (UnimplementedAuthServiceServer) ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error)
func (UnimplementedAuthServiceServer) SetPassword ¶
func (UnimplementedAuthServiceServer) SetPassword(context.Context, *SetPasswordRequest) (*SetPasswordResponse, 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.