Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterOAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterOAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OAuthServiceClient) error
- func RegisterOAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterOAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OAuthServiceServer) error
- func RegisterOAuthServiceServer(s grpc.ServiceRegistrar, srv OAuthServiceServer)
- type OAuthServiceClient
- type OAuthServiceServer
- type OAuthenticateCall
- func (*OAuthenticateCall) Descriptor() ([]byte, []int)deprecated
- func (*OAuthenticateCall) ProtoMessage()
- func (x *OAuthenticateCall) ProtoReflect() protoreflect.Message
- func (x *OAuthenticateCall) Reset()
- func (x *OAuthenticateCall) String() string
- func (m *OAuthenticateCall) Validate() error
- func (m *OAuthenticateCall) ValidateAll() error
- type OAuthenticateCallMultiError
- type OAuthenticateCallValidationError
- func (e OAuthenticateCallValidationError) Cause() error
- func (e OAuthenticateCallValidationError) Error() string
- func (e OAuthenticateCallValidationError) ErrorName() string
- func (e OAuthenticateCallValidationError) Field() string
- func (e OAuthenticateCallValidationError) Key() bool
- func (e OAuthenticateCallValidationError) Reason() string
- type OAuthenticateCall_Request
- func (*OAuthenticateCall_Request) Descriptor() ([]byte, []int)deprecated
- func (x *OAuthenticateCall_Request) GetClientId() string
- func (x *OAuthenticateCall_Request) GetGrantType() string
- func (x *OAuthenticateCall_Request) GetPassword() string
- func (x *OAuthenticateCall_Request) GetRefreshToken() string
- func (x *OAuthenticateCall_Request) GetUsername() string
- func (*OAuthenticateCall_Request) ProtoMessage()
- func (x *OAuthenticateCall_Request) ProtoReflect() protoreflect.Message
- func (x *OAuthenticateCall_Request) Reset()
- func (x *OAuthenticateCall_Request) String() string
- func (m *OAuthenticateCall_Request) Validate() error
- func (m *OAuthenticateCall_Request) ValidateAll() error
- type OAuthenticateCall_RequestMultiError
- type OAuthenticateCall_RequestValidationError
- func (e OAuthenticateCall_RequestValidationError) Cause() error
- func (e OAuthenticateCall_RequestValidationError) Error() string
- func (e OAuthenticateCall_RequestValidationError) ErrorName() string
- func (e OAuthenticateCall_RequestValidationError) Field() string
- func (e OAuthenticateCall_RequestValidationError) Key() bool
- func (e OAuthenticateCall_RequestValidationError) Reason() string
- type OAuthenticateCall_Response
- func (*OAuthenticateCall_Response) Descriptor() ([]byte, []int)deprecated
- func (x *OAuthenticateCall_Response) GetAccessToken() string
- func (x *OAuthenticateCall_Response) GetExpiresIn() uint32
- func (x *OAuthenticateCall_Response) GetRefreshToken() string
- func (x *OAuthenticateCall_Response) GetTokenType() string
- func (*OAuthenticateCall_Response) ProtoMessage()
- func (x *OAuthenticateCall_Response) ProtoReflect() protoreflect.Message
- func (x *OAuthenticateCall_Response) Reset()
- func (x *OAuthenticateCall_Response) String() string
- func (m *OAuthenticateCall_Response) Validate() error
- func (m *OAuthenticateCall_Response) ValidateAll() error
- type OAuthenticateCall_ResponseMultiError
- type OAuthenticateCall_ResponseValidationError
- func (e OAuthenticateCall_ResponseValidationError) Cause() error
- func (e OAuthenticateCall_ResponseValidationError) Error() string
- func (e OAuthenticateCall_ResponseValidationError) ErrorName() string
- func (e OAuthenticateCall_ResponseValidationError) Field() string
- func (e OAuthenticateCall_ResponseValidationError) Key() bool
- func (e OAuthenticateCall_ResponseValidationError) Reason() string
- type UnimplementedOAuthServiceServer
- type UnsafeOAuthServiceServer
Constants ¶
const (
OAuthService_Authenticate_FullMethodName = "/sso.v1.OAuthService/Authenticate"
)
Variables ¶
var File_sso_v1_sso_proto protoreflect.FileDescriptor
var OAuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sso.v1.OAuthService", HandlerType: (*OAuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Authenticate", Handler: _OAuthService_Authenticate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sso/v1/sso.proto", }
OAuthService_ServiceDesc is the grpc.ServiceDesc for OAuthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOAuthServiceHandler ¶
func RegisterOAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterOAuthServiceHandler registers the http handlers for service OAuthService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterOAuthServiceHandlerClient ¶
func RegisterOAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OAuthServiceClient) error
RegisterOAuthServiceHandlerClient registers the http handlers for service OAuthService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OAuthServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OAuthServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "OAuthServiceClient" to call the correct interceptors.
func RegisterOAuthServiceHandlerFromEndpoint ¶
func RegisterOAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterOAuthServiceHandlerFromEndpoint is same as RegisterOAuthServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterOAuthServiceHandlerServer ¶
func RegisterOAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OAuthServiceServer) error
RegisterOAuthServiceHandlerServer registers the http handlers for service OAuthService to "mux". UnaryRPC :call OAuthServiceServer 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 RegisterOAuthServiceHandlerFromEndpoint instead.
func RegisterOAuthServiceServer ¶
func RegisterOAuthServiceServer(s grpc.ServiceRegistrar, srv OAuthServiceServer)
Types ¶
type OAuthServiceClient ¶
type OAuthServiceClient interface { // {{import "proto/sso/v1/sso.description.md"}} Authenticate(ctx context.Context, in *OAuthenticateCall_Request, opts ...grpc.CallOption) (*OAuthenticateCall_Response, error) }
OAuthServiceClient is the client API for OAuthService 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 NewOAuthServiceClient ¶
func NewOAuthServiceClient(cc grpc.ClientConnInterface) OAuthServiceClient
type OAuthServiceServer ¶
type OAuthServiceServer interface { // {{import "proto/sso/v1/sso.description.md"}} Authenticate(context.Context, *OAuthenticateCall_Request) (*OAuthenticateCall_Response, error) // contains filtered or unexported methods }
OAuthServiceServer is the server API for OAuthService service. All implementations must embed UnimplementedOAuthServiceServer for forward compatibility
type OAuthenticateCall ¶
type OAuthenticateCall struct {
// contains filtered or unexported fields
}
func (*OAuthenticateCall) Descriptor
deprecated
func (*OAuthenticateCall) Descriptor() ([]byte, []int)
Deprecated: Use OAuthenticateCall.ProtoReflect.Descriptor instead.
func (*OAuthenticateCall) ProtoMessage ¶
func (*OAuthenticateCall) ProtoMessage()
func (*OAuthenticateCall) ProtoReflect ¶
func (x *OAuthenticateCall) ProtoReflect() protoreflect.Message
func (*OAuthenticateCall) Reset ¶
func (x *OAuthenticateCall) Reset()
func (*OAuthenticateCall) String ¶
func (x *OAuthenticateCall) String() string
func (*OAuthenticateCall) Validate ¶
func (m *OAuthenticateCall) Validate() error
Validate checks the field values on OAuthenticateCall with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*OAuthenticateCall) ValidateAll ¶
func (m *OAuthenticateCall) ValidateAll() error
ValidateAll checks the field values on OAuthenticateCall with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in OAuthenticateCallMultiError, or nil if none found.
type OAuthenticateCallMultiError ¶
type OAuthenticateCallMultiError []error
OAuthenticateCallMultiError is an error wrapping multiple validation errors returned by OAuthenticateCall.ValidateAll() if the designated constraints aren't met.
func (OAuthenticateCallMultiError) AllErrors ¶
func (m OAuthenticateCallMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (OAuthenticateCallMultiError) Error ¶
func (m OAuthenticateCallMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type OAuthenticateCallValidationError ¶
type OAuthenticateCallValidationError struct {
// contains filtered or unexported fields
}
OAuthenticateCallValidationError is the validation error returned by OAuthenticateCall.Validate if the designated constraints aren't met.
func (OAuthenticateCallValidationError) Cause ¶
func (e OAuthenticateCallValidationError) Cause() error
Cause function returns cause value.
func (OAuthenticateCallValidationError) Error ¶
func (e OAuthenticateCallValidationError) Error() string
Error satisfies the builtin error interface
func (OAuthenticateCallValidationError) ErrorName ¶
func (e OAuthenticateCallValidationError) ErrorName() string
ErrorName returns error name.
func (OAuthenticateCallValidationError) Field ¶
func (e OAuthenticateCallValidationError) Field() string
Field function returns field value.
func (OAuthenticateCallValidationError) Key ¶
func (e OAuthenticateCallValidationError) Key() bool
Key function returns key value.
func (OAuthenticateCallValidationError) Reason ¶
func (e OAuthenticateCallValidationError) Reason() string
Reason function returns reason value.
type OAuthenticateCall_Request ¶
type OAuthenticateCall_Request struct { GrantType string `protobuf:"bytes,1,opt,name=grant_type,proto3" json:"grant_type,omitempty"` ClientId string `protobuf:"bytes,2,opt,name=client_id,proto3" json:"client_id,omitempty"` Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` RefreshToken string `protobuf:"bytes,5,opt,name=refresh_token,proto3" json:"refresh_token,omitempty"` // contains filtered or unexported fields }
func (*OAuthenticateCall_Request) Descriptor
deprecated
func (*OAuthenticateCall_Request) Descriptor() ([]byte, []int)
Deprecated: Use OAuthenticateCall_Request.ProtoReflect.Descriptor instead.
func (*OAuthenticateCall_Request) GetClientId ¶
func (x *OAuthenticateCall_Request) GetClientId() string
func (*OAuthenticateCall_Request) GetGrantType ¶
func (x *OAuthenticateCall_Request) GetGrantType() string
func (*OAuthenticateCall_Request) GetPassword ¶
func (x *OAuthenticateCall_Request) GetPassword() string
func (*OAuthenticateCall_Request) GetRefreshToken ¶
func (x *OAuthenticateCall_Request) GetRefreshToken() string
func (*OAuthenticateCall_Request) GetUsername ¶
func (x *OAuthenticateCall_Request) GetUsername() string
func (*OAuthenticateCall_Request) ProtoMessage ¶
func (*OAuthenticateCall_Request) ProtoMessage()
func (*OAuthenticateCall_Request) ProtoReflect ¶
func (x *OAuthenticateCall_Request) ProtoReflect() protoreflect.Message
func (*OAuthenticateCall_Request) Reset ¶
func (x *OAuthenticateCall_Request) Reset()
func (*OAuthenticateCall_Request) String ¶
func (x *OAuthenticateCall_Request) String() string
func (*OAuthenticateCall_Request) Validate ¶
func (m *OAuthenticateCall_Request) Validate() error
Validate checks the field values on OAuthenticateCall_Request with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*OAuthenticateCall_Request) ValidateAll ¶
func (m *OAuthenticateCall_Request) ValidateAll() error
ValidateAll checks the field values on OAuthenticateCall_Request with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in OAuthenticateCall_RequestMultiError, or nil if none found.
type OAuthenticateCall_RequestMultiError ¶
type OAuthenticateCall_RequestMultiError []error
OAuthenticateCall_RequestMultiError is an error wrapping multiple validation errors returned by OAuthenticateCall_Request.ValidateAll() if the designated constraints aren't met.
func (OAuthenticateCall_RequestMultiError) AllErrors ¶
func (m OAuthenticateCall_RequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (OAuthenticateCall_RequestMultiError) Error ¶
func (m OAuthenticateCall_RequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type OAuthenticateCall_RequestValidationError ¶
type OAuthenticateCall_RequestValidationError struct {
// contains filtered or unexported fields
}
OAuthenticateCall_RequestValidationError is the validation error returned by OAuthenticateCall_Request.Validate if the designated constraints aren't met.
func (OAuthenticateCall_RequestValidationError) Cause ¶
func (e OAuthenticateCall_RequestValidationError) Cause() error
Cause function returns cause value.
func (OAuthenticateCall_RequestValidationError) Error ¶
func (e OAuthenticateCall_RequestValidationError) Error() string
Error satisfies the builtin error interface
func (OAuthenticateCall_RequestValidationError) ErrorName ¶
func (e OAuthenticateCall_RequestValidationError) ErrorName() string
ErrorName returns error name.
func (OAuthenticateCall_RequestValidationError) Field ¶
func (e OAuthenticateCall_RequestValidationError) Field() string
Field function returns field value.
func (OAuthenticateCall_RequestValidationError) Key ¶
func (e OAuthenticateCall_RequestValidationError) Key() bool
Key function returns key value.
func (OAuthenticateCall_RequestValidationError) Reason ¶
func (e OAuthenticateCall_RequestValidationError) Reason() string
Reason function returns reason value.
type OAuthenticateCall_Response ¶
type OAuthenticateCall_Response struct { AccessToken string `protobuf:"bytes,1,opt,name=access_token,proto3" json:"access_token,omitempty"` RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,proto3" json:"refresh_token,omitempty"` ExpiresIn uint32 `protobuf:"varint,3,opt,name=expires_in,proto3" json:"expires_in,omitempty"` TokenType string `protobuf:"bytes,4,opt,name=token_type,proto3" json:"token_type,omitempty"` // contains filtered or unexported fields }
func (*OAuthenticateCall_Response) Descriptor
deprecated
func (*OAuthenticateCall_Response) Descriptor() ([]byte, []int)
Deprecated: Use OAuthenticateCall_Response.ProtoReflect.Descriptor instead.
func (*OAuthenticateCall_Response) GetAccessToken ¶
func (x *OAuthenticateCall_Response) GetAccessToken() string
func (*OAuthenticateCall_Response) GetExpiresIn ¶
func (x *OAuthenticateCall_Response) GetExpiresIn() uint32
func (*OAuthenticateCall_Response) GetRefreshToken ¶
func (x *OAuthenticateCall_Response) GetRefreshToken() string
func (*OAuthenticateCall_Response) GetTokenType ¶
func (x *OAuthenticateCall_Response) GetTokenType() string
func (*OAuthenticateCall_Response) ProtoMessage ¶
func (*OAuthenticateCall_Response) ProtoMessage()
func (*OAuthenticateCall_Response) ProtoReflect ¶
func (x *OAuthenticateCall_Response) ProtoReflect() protoreflect.Message
func (*OAuthenticateCall_Response) Reset ¶
func (x *OAuthenticateCall_Response) Reset()
func (*OAuthenticateCall_Response) String ¶
func (x *OAuthenticateCall_Response) String() string
func (*OAuthenticateCall_Response) Validate ¶
func (m *OAuthenticateCall_Response) Validate() error
Validate checks the field values on OAuthenticateCall_Response with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*OAuthenticateCall_Response) ValidateAll ¶
func (m *OAuthenticateCall_Response) ValidateAll() error
ValidateAll checks the field values on OAuthenticateCall_Response with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in OAuthenticateCall_ResponseMultiError, or nil if none found.
type OAuthenticateCall_ResponseMultiError ¶
type OAuthenticateCall_ResponseMultiError []error
OAuthenticateCall_ResponseMultiError is an error wrapping multiple validation errors returned by OAuthenticateCall_Response.ValidateAll() if the designated constraints aren't met.
func (OAuthenticateCall_ResponseMultiError) AllErrors ¶
func (m OAuthenticateCall_ResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (OAuthenticateCall_ResponseMultiError) Error ¶
func (m OAuthenticateCall_ResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type OAuthenticateCall_ResponseValidationError ¶
type OAuthenticateCall_ResponseValidationError struct {
// contains filtered or unexported fields
}
OAuthenticateCall_ResponseValidationError is the validation error returned by OAuthenticateCall_Response.Validate if the designated constraints aren't met.
func (OAuthenticateCall_ResponseValidationError) Cause ¶
func (e OAuthenticateCall_ResponseValidationError) Cause() error
Cause function returns cause value.
func (OAuthenticateCall_ResponseValidationError) Error ¶
func (e OAuthenticateCall_ResponseValidationError) Error() string
Error satisfies the builtin error interface
func (OAuthenticateCall_ResponseValidationError) ErrorName ¶
func (e OAuthenticateCall_ResponseValidationError) ErrorName() string
ErrorName returns error name.
func (OAuthenticateCall_ResponseValidationError) Field ¶
func (e OAuthenticateCall_ResponseValidationError) Field() string
Field function returns field value.
func (OAuthenticateCall_ResponseValidationError) Key ¶
func (e OAuthenticateCall_ResponseValidationError) Key() bool
Key function returns key value.
func (OAuthenticateCall_ResponseValidationError) Reason ¶
func (e OAuthenticateCall_ResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedOAuthServiceServer ¶
type UnimplementedOAuthServiceServer struct { }
UnimplementedOAuthServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedOAuthServiceServer) Authenticate ¶
func (UnimplementedOAuthServiceServer) Authenticate(context.Context, *OAuthenticateCall_Request) (*OAuthenticateCall_Response, error)
type UnsafeOAuthServiceServer ¶
type UnsafeOAuthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeOAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OAuthServiceServer will result in compilation errors.