Documentation ¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- type ErrResp
- type ErrRespStatusCode
- type ErrorHandler
- type Handler
- type Middleware
- type OidcAuthGetAccepted
- type OidcAuthGetParams
- type OidcAuthGetRes
- type OidcAuthGetUnauthorized
- type OidcCallbackGetFound
- type OidcCallbackGetParams
- type OidcSignInGetFound
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type Option
- type Route
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type UnimplementedHandler
- func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrRespStatusCode)
- func (UnimplementedHandler) OidcAuthGet(ctx context.Context, params OidcAuthGetParams) (r OidcAuthGetRes, _ error)
- func (UnimplementedHandler) OidcCallbackGet(ctx context.Context, params OidcCallbackGetParams) (r *OidcCallbackGetFound, _ error)
- func (UnimplementedHandler) OidcSignInGet(ctx context.Context) (r *OidcSignInGetFound, _ error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrResp ¶
type ErrResp struct {
Error OptString `json:"error"`
}
func (*ErrResp) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*ErrResp) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ErrRespStatusCode ¶
ErrRespStatusCode wraps ErrResp with StatusCode.
func (*ErrRespStatusCode) Error ¶
func (s *ErrRespStatusCode) Error() string
func (*ErrRespStatusCode) GetResponse ¶
func (s *ErrRespStatusCode) GetResponse() ErrResp
GetResponse returns the value of Response.
func (*ErrRespStatusCode) GetStatusCode ¶
func (s *ErrRespStatusCode) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*ErrRespStatusCode) SetResponse ¶
func (s *ErrRespStatusCode) SetResponse(val ErrResp)
SetResponse sets the value of Response.
func (*ErrRespStatusCode) SetStatusCode ¶
func (s *ErrRespStatusCode) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
type Handler ¶
type Handler interface { // OidcAuthGet implements GET /oidc/auth operation. // // This endpoint is used with NGINX. // // GET /oidc/auth OidcAuthGet(ctx context.Context, params OidcAuthGetParams) (OidcAuthGetRes, error) // OidcCallbackGet implements GET /oidc/callback operation. // // Checks authorization code with registered provider and saves it to session. // // GET /oidc/callback OidcCallbackGet(ctx context.Context, params OidcCallbackGetParams) (*OidcCallbackGetFound, error) // OidcSignInGet implements GET /oidc/sign-in operation. // // Sigs in. // // GET /oidc/sign-in OidcSignInGet(ctx context.Context) (*OidcSignInGetFound, error) // NewError creates *ErrRespStatusCode from error returned by handler. // // Used for common default response. NewError(ctx context.Context, err error) *ErrRespStatusCode }
Handler handles operations described by OpenAPI v3 specification.
type OidcAuthGetAccepted ¶
type OidcAuthGetAccepted struct {
XClaims OptString
}
OidcAuthGetAccepted is response for OidcAuthGet operation.
func (*OidcAuthGetAccepted) GetXClaims ¶
func (s *OidcAuthGetAccepted) GetXClaims() OptString
GetXClaims returns the value of XClaims.
func (*OidcAuthGetAccepted) SetXClaims ¶
func (s *OidcAuthGetAccepted) SetXClaims(val OptString)
SetXClaims sets the value of XClaims.
type OidcAuthGetParams ¶
type OidcAuthGetParams struct { // Session cookie for authentication. GoOidcAuthProxy OptString }
OidcAuthGetParams is parameters of GET /oidc/auth operation.
type OidcAuthGetRes ¶
type OidcAuthGetRes interface {
// contains filtered or unexported methods
}
type OidcAuthGetUnauthorized ¶
type OidcAuthGetUnauthorized struct{}
OidcAuthGetUnauthorized is response for OidcAuthGet operation.
type OidcCallbackGetFound ¶
OidcCallbackGetFound is response for OidcCallbackGet operation.
func (*OidcCallbackGetFound) GetLocation ¶
func (s *OidcCallbackGetFound) GetLocation() OptString
GetLocation returns the value of Location.
func (*OidcCallbackGetFound) GetSetCookie ¶
func (s *OidcCallbackGetFound) GetSetCookie() OptString
GetSetCookie returns the value of SetCookie.
func (*OidcCallbackGetFound) SetLocation ¶
func (s *OidcCallbackGetFound) SetLocation(val OptString)
SetLocation sets the value of Location.
func (*OidcCallbackGetFound) SetSetCookie ¶
func (s *OidcCallbackGetFound) SetSetCookie(val OptString)
SetSetCookie sets the value of SetCookie.
type OidcCallbackGetParams ¶
type OidcCallbackGetParams struct { // Nonce for the request. GoOidcAuthProxyNounce OptString // State parameter for the request. GoOidcAuthProxyState OptString // State parameter for the request. State OptString // Code parameter for the request. Code OptString }
OidcCallbackGetParams is parameters of GET /oidc/callback operation.
type OidcSignInGetFound ¶
OidcSignInGetFound is response for OidcSignInGet operation.
func (*OidcSignInGetFound) GetLocation ¶
func (s *OidcSignInGetFound) GetLocation() OptString
GetLocation returns the value of Location.
func (*OidcSignInGetFound) GetSetCookie ¶
func (s *OidcSignInGetFound) GetSetCookie() []string
GetSetCookie returns the value of SetCookie.
func (*OidcSignInGetFound) SetLocation ¶
func (s *OidcSignInGetFound) SetLocation(val OptString)
SetLocation sets the value of Location.
func (*OidcSignInGetFound) SetSetCookie ¶
func (s *OidcSignInGetFound) SetSetCookie(val []string)
SetSetCookie sets the value of SetCookie.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface { ServerOption }
Option is config option.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the otel.GetMeterProvider() is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) NewError ¶
func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrRespStatusCode)
NewError creates *ErrRespStatusCode from error returned by handler.
Used for common default response.
func (UnimplementedHandler) OidcAuthGet ¶
func (UnimplementedHandler) OidcAuthGet(ctx context.Context, params OidcAuthGetParams) (r OidcAuthGetRes, _ error)
OidcAuthGet implements GET /oidc/auth operation.
This endpoint is used with NGINX.
GET /oidc/auth
func (UnimplementedHandler) OidcCallbackGet ¶
func (UnimplementedHandler) OidcCallbackGet(ctx context.Context, params OidcCallbackGetParams) (r *OidcCallbackGetFound, _ error)
OidcCallbackGet implements GET /oidc/callback operation.
Checks authorization code with registered provider and saves it to session.
GET /oidc/callback
func (UnimplementedHandler) OidcSignInGet ¶
func (UnimplementedHandler) OidcSignInGet(ctx context.Context) (r *OidcSignInGetFound, _ error)
OidcSignInGet implements GET /oidc/sign-in operation.
Sigs in.
GET /oidc/sign-in