v1

package
v0.0.0-...-2e4a3c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	OAuthService_Authenticate_FullMethodName = "/sso.v1.OAuthService/Authenticate"
)

Variables

View Source
var File_sso_v1_sso_proto protoreflect.FileDescriptor
View Source
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.

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

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

Cause function returns cause value.

func (OAuthenticateCallValidationError) Error

Error satisfies the builtin error interface

func (OAuthenticateCallValidationError) ErrorName

ErrorName returns error name.

func (OAuthenticateCallValidationError) Field

Field function returns field value.

func (OAuthenticateCallValidationError) Key

Key function returns key value.

func (OAuthenticateCallValidationError) Reason

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 (*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

AllErrors returns a list of validation violation errors.

func (OAuthenticateCall_RequestMultiError) Error

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

Cause function returns cause value.

func (OAuthenticateCall_RequestValidationError) Error

Error satisfies the builtin error interface

func (OAuthenticateCall_RequestValidationError) ErrorName

ErrorName returns error name.

func (OAuthenticateCall_RequestValidationError) Field

Field function returns field value.

func (OAuthenticateCall_RequestValidationError) Key

Key function returns key value.

func (OAuthenticateCall_RequestValidationError) Reason

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 (*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

AllErrors returns a list of validation violation errors.

func (OAuthenticateCall_ResponseMultiError) Error

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

Cause function returns cause value.

func (OAuthenticateCall_ResponseValidationError) Error

Error satisfies the builtin error interface

func (OAuthenticateCall_ResponseValidationError) ErrorName

ErrorName returns error name.

func (OAuthenticateCall_ResponseValidationError) Field

Field function returns field value.

func (OAuthenticateCall_ResponseValidationError) Key

Key function returns key value.

func (OAuthenticateCall_ResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedOAuthServiceServer

type UnimplementedOAuthServiceServer struct {
}

UnimplementedOAuthServiceServer must be embedded to have forward compatible implementations.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL