Documentation ¶
Index ¶
- Variables
- func AuthorizeUser(ctx context.Context, tokenMaker core.TokenMakerComponent) (*token.Payload, error)
- func GrpcLogger(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func HttpLogger(handler http.Handler) http.Handler
- func NewServer(id string) *grpcServer
- type Metadata
- type ResponseRecorder
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMetadataMissing = errors.New("missing metadata") ErrAuthHeaderMissing = errors.New("missing authorization header") ErrAuthHeaderInvalid = errors.New("invalid authorization header format") ErrAuthTypeUnsupported = errors.New("unsupported authorization type") ErrAccessTokenInvalid = errors.New("invalid access token") ErrTLSCertNotFull = errors.New("TLS cert or key file is missing") ErrCannotReadTLSCert = errors.New("cannot read TLS cert or key file") ErrSwaggerPrefixMissing = errors.New("missing swagger prefix") ErrCannotCreateListener = errors.New("cannot create listener") ErrCannotStartServer = errors.New("cannot start GRPC server") ErrCannotStartGatewayServer = errors.New("cannot start HTTP gateway server") ErrCannotCreateStatikFS = errors.New("cannot create statik fs") ErrCannotAddClientTLS = errors.New("cannot add client TLS") )
Functions ¶
func AuthorizeUser ¶
func GrpcLogger ¶
func GrpcLogger( ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (resp interface{}, err error)
Types ¶
type Metadata ¶
func ExtractMetadata ¶
type ResponseRecorder ¶
type ResponseRecorder struct { http.ResponseWriter StatusCode int Body []byte }
func (*ResponseRecorder) WriteHeader ¶
func (rec *ResponseRecorder) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.