_go

package
v0.0.0-...-cc3169c Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package _go is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	AuthenticationService_GetPublicKeys_FullMethodName = "/authentication.v1.AuthenticationService/GetPublicKeys"
)

Variables

View Source
var AuthenticationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "authentication.v1.AuthenticationService",
	HandlerType: (*AuthenticationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPublicKeys",
			Handler:    _AuthenticationService_GetPublicKeys_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "v1/index.proto",
}

AuthenticationService_ServiceDesc is the grpc.ServiceDesc for AuthenticationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_v1_index_proto protoreflect.FileDescriptor

Functions

func RegisterAuthenticationServiceHandler

func RegisterAuthenticationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAuthenticationServiceHandler registers the http handlers for service AuthenticationService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAuthenticationServiceHandlerClient

func RegisterAuthenticationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthenticationServiceClient) error

RegisterAuthenticationServiceHandlerClient registers the http handlers for service AuthenticationService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthenticationServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthenticationServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthenticationServiceClient" to call the correct interceptors.

func RegisterAuthenticationServiceHandlerFromEndpoint

func RegisterAuthenticationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAuthenticationServiceHandlerFromEndpoint is same as RegisterAuthenticationServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAuthenticationServiceHandlerServer

func RegisterAuthenticationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthenticationServiceServer) error

RegisterAuthenticationServiceHandlerServer registers the http handlers for service AuthenticationService to "mux". UnaryRPC :call AuthenticationServiceServer 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 RegisterAuthenticationServiceHandlerFromEndpoint instead.

func RegisterAuthenticationServiceServer

func RegisterAuthenticationServiceServer(s grpc.ServiceRegistrar, srv AuthenticationServiceServer)

Types

type AuthenticationServiceClient

type AuthenticationServiceClient interface {
	// Get all public keys.
	GetPublicKeys(ctx context.Context, in *PublicKeysRequest, opts ...grpc.CallOption) (*PublicKeysResponse, error)
}

AuthenticationServiceClient is the client API for AuthenticationService 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 AuthenticationServiceServer

type AuthenticationServiceServer interface {
	// Get all public keys.
	GetPublicKeys(context.Context, *PublicKeysRequest) (*PublicKeysResponse, error)
	// contains filtered or unexported methods
}

AuthenticationServiceServer is the server API for AuthenticationService service. All implementations must embed UnimplementedAuthenticationServiceServer for forward compatibility

type JWK

type JWK struct {
	Kid string `protobuf:"bytes,1,opt,name=kid,proto3" json:"kid,omitempty"`
	Alg string `protobuf:"bytes,2,opt,name=alg,proto3" json:"alg,omitempty"`
	Use string `protobuf:"bytes,3,opt,name=use,proto3" json:"use,omitempty"`
	Kty string `protobuf:"bytes,4,opt,name=kty,proto3" json:"kty,omitempty"`
	E   string `protobuf:"bytes,5,opt,name=e,proto3" json:"e,omitempty"`
	N   string `protobuf:"bytes,6,opt,name=n,proto3" json:"n,omitempty"`
	// contains filtered or unexported fields
}

func (*JWK) Descriptor deprecated

func (*JWK) Descriptor() ([]byte, []int)

Deprecated: Use JWK.ProtoReflect.Descriptor instead.

func (*JWK) GetAlg

func (x *JWK) GetAlg() string

func (*JWK) GetE

func (x *JWK) GetE() string

func (*JWK) GetKid

func (x *JWK) GetKid() string

func (*JWK) GetKty

func (x *JWK) GetKty() string

func (*JWK) GetN

func (x *JWK) GetN() string

func (*JWK) GetUse

func (x *JWK) GetUse() string

func (*JWK) ProtoMessage

func (*JWK) ProtoMessage()

func (*JWK) ProtoReflect

func (x *JWK) ProtoReflect() protoreflect.Message

func (*JWK) Reset

func (x *JWK) Reset()

func (*JWK) String

func (x *JWK) String() string

func (*JWK) Validate

func (m *JWK) Validate() error

Validate checks the field values on JWK 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 (*JWK) ValidateAll

func (m *JWK) ValidateAll() error

ValidateAll checks the field values on JWK 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 JWKMultiError, or nil if none found.

type JWKMultiError

type JWKMultiError []error

JWKMultiError is an error wrapping multiple validation errors returned by JWK.ValidateAll() if the designated constraints aren't met.

func (JWKMultiError) AllErrors

func (m JWKMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (JWKMultiError) Error

func (m JWKMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type JWKValidationError

type JWKValidationError struct {
	// contains filtered or unexported fields
}

JWKValidationError is the validation error returned by JWK.Validate if the designated constraints aren't met.

func (JWKValidationError) Cause

func (e JWKValidationError) Cause() error

Cause function returns cause value.

func (JWKValidationError) Error

func (e JWKValidationError) Error() string

Error satisfies the builtin error interface

func (JWKValidationError) ErrorName

func (e JWKValidationError) ErrorName() string

ErrorName returns error name.

func (JWKValidationError) Field

func (e JWKValidationError) Field() string

Field function returns field value.

func (JWKValidationError) Key

func (e JWKValidationError) Key() bool

Key function returns key value.

func (JWKValidationError) Reason

func (e JWKValidationError) Reason() string

Reason function returns reason value.

type PublicKeysRequest

type PublicKeysRequest struct {
	// contains filtered or unexported fields
}

Requests

func (*PublicKeysRequest) Descriptor deprecated

func (*PublicKeysRequest) Descriptor() ([]byte, []int)

Deprecated: Use PublicKeysRequest.ProtoReflect.Descriptor instead.

func (*PublicKeysRequest) ProtoMessage

func (*PublicKeysRequest) ProtoMessage()

func (*PublicKeysRequest) ProtoReflect

func (x *PublicKeysRequest) ProtoReflect() protoreflect.Message

func (*PublicKeysRequest) Reset

func (x *PublicKeysRequest) Reset()

func (*PublicKeysRequest) String

func (x *PublicKeysRequest) String() string

func (*PublicKeysRequest) Validate

func (m *PublicKeysRequest) Validate() error

Validate checks the field values on PublicKeysRequest 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 (*PublicKeysRequest) ValidateAll

func (m *PublicKeysRequest) ValidateAll() error

ValidateAll checks the field values on PublicKeysRequest 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 PublicKeysRequestMultiError, or nil if none found.

type PublicKeysRequestMultiError

type PublicKeysRequestMultiError []error

PublicKeysRequestMultiError is an error wrapping multiple validation errors returned by PublicKeysRequest.ValidateAll() if the designated constraints aren't met.

func (PublicKeysRequestMultiError) AllErrors

func (m PublicKeysRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PublicKeysRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type PublicKeysRequestValidationError

type PublicKeysRequestValidationError struct {
	// contains filtered or unexported fields
}

PublicKeysRequestValidationError is the validation error returned by PublicKeysRequest.Validate if the designated constraints aren't met.

func (PublicKeysRequestValidationError) Cause

Cause function returns cause value.

func (PublicKeysRequestValidationError) Error

Error satisfies the builtin error interface

func (PublicKeysRequestValidationError) ErrorName

ErrorName returns error name.

func (PublicKeysRequestValidationError) Field

Field function returns field value.

func (PublicKeysRequestValidationError) Key

Key function returns key value.

func (PublicKeysRequestValidationError) Reason

Reason function returns reason value.

type PublicKeysResponse

type PublicKeysResponse struct {
	Keys []*JWK `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
	// contains filtered or unexported fields
}

Responses

func (*PublicKeysResponse) Descriptor deprecated

func (*PublicKeysResponse) Descriptor() ([]byte, []int)

Deprecated: Use PublicKeysResponse.ProtoReflect.Descriptor instead.

func (*PublicKeysResponse) GetKeys

func (x *PublicKeysResponse) GetKeys() []*JWK

func (*PublicKeysResponse) ProtoMessage

func (*PublicKeysResponse) ProtoMessage()

func (*PublicKeysResponse) ProtoReflect

func (x *PublicKeysResponse) ProtoReflect() protoreflect.Message

func (*PublicKeysResponse) Reset

func (x *PublicKeysResponse) Reset()

func (*PublicKeysResponse) String

func (x *PublicKeysResponse) String() string

func (*PublicKeysResponse) Validate

func (m *PublicKeysResponse) Validate() error

Validate checks the field values on PublicKeysResponse 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 (*PublicKeysResponse) ValidateAll

func (m *PublicKeysResponse) ValidateAll() error

ValidateAll checks the field values on PublicKeysResponse 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 PublicKeysResponseMultiError, or nil if none found.

type PublicKeysResponseMultiError

type PublicKeysResponseMultiError []error

PublicKeysResponseMultiError is an error wrapping multiple validation errors returned by PublicKeysResponse.ValidateAll() if the designated constraints aren't met.

func (PublicKeysResponseMultiError) AllErrors

func (m PublicKeysResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PublicKeysResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type PublicKeysResponseValidationError

type PublicKeysResponseValidationError struct {
	// contains filtered or unexported fields
}

PublicKeysResponseValidationError is the validation error returned by PublicKeysResponse.Validate if the designated constraints aren't met.

func (PublicKeysResponseValidationError) Cause

Cause function returns cause value.

func (PublicKeysResponseValidationError) Error

Error satisfies the builtin error interface

func (PublicKeysResponseValidationError) ErrorName

ErrorName returns error name.

func (PublicKeysResponseValidationError) Field

Field function returns field value.

func (PublicKeysResponseValidationError) Key

Key function returns key value.

func (PublicKeysResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedAuthenticationServiceServer

type UnimplementedAuthenticationServiceServer struct {
}

UnimplementedAuthenticationServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthenticationServiceServer) GetPublicKeys

type UnsafeAuthenticationServiceServer

type UnsafeAuthenticationServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAuthenticationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthenticationServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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