api

package
v0.0.0-...-64033a1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type BearerAuth

type BearerAuth struct {
	Token string
	Roles []string
}

func (*BearerAuth) GetRoles

func (s *BearerAuth) GetRoles() []string

GetRoles returns the value of Roles.

func (*BearerAuth) GetToken

func (s *BearerAuth) GetToken() string

GetToken returns the value of Token.

func (*BearerAuth) SetRoles

func (s *BearerAuth) SetRoles(val []string)

SetRoles sets the value of Roles.

func (*BearerAuth) SetToken

func (s *BearerAuth) SetToken(val string)

SetToken sets the value of Token.

type Client

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

Client implements OAS client.

func NewClient

func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) GetCurrentUser

func (c *Client) GetCurrentUser(ctx context.Context) (GetCurrentUserRes, error)

GetCurrentUser invokes GetCurrentUser operation.

Example protected endpoint. Requires a valid bearer token and returns the subject encoded in it.

GET /me

func (*Client) HealthLiveness

func (c *Client) HealthLiveness(ctx context.Context) error

HealthLiveness invokes HealthLiveness operation.

Liveness probe.

GET /healthz/liveness

func (*Client) HealthReadiness

func (c *Client) HealthReadiness(ctx context.Context) (HealthReadinessRes, error)

HealthReadiness invokes HealthReadiness operation.

Readiness probe for kubernetes health check. Returns 200 if the service is ready to serve requests. Returns 503 if the service is not ready to serve requests (starting up or shutting down).

GET /healthz/readiness

func (*Client) Login

func (c *Client) Login(ctx context.Context, request *LoginRequest) (LoginRes, error)

Login invokes Login operation.

Verifies the supplied email and password and, on success, returns a signed JWT bearer token to send as the Authorization header on subsequent requests. Unknown emails, wrong passwords, and a server with login disabled (no JWT secret configured) all return the same 401 so a client cannot distinguish them.

POST /login

type ClientOption

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

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type CurrentUserResponse

type CurrentUserResponse struct {
	Subject   string    `json:"subject"`
	Email     OptString `json:"email"`
	FirstName OptString `json:"firstName"`
	LastName  OptString `json:"lastName"`
}

Ref: #/components/schemas/currentUserResponse

func (*CurrentUserResponse) Decode

func (s *CurrentUserResponse) Decode(d *jx.Decoder) error

Decode decodes CurrentUserResponse from json.

func (*CurrentUserResponse) Encode

func (s *CurrentUserResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CurrentUserResponse) GetEmail

func (s *CurrentUserResponse) GetEmail() OptString

GetEmail returns the value of Email.

func (*CurrentUserResponse) GetFirstName

func (s *CurrentUserResponse) GetFirstName() OptString

GetFirstName returns the value of FirstName.

func (*CurrentUserResponse) GetLastName

func (s *CurrentUserResponse) GetLastName() OptString

GetLastName returns the value of LastName.

func (*CurrentUserResponse) GetSubject

func (s *CurrentUserResponse) GetSubject() string

GetSubject returns the value of Subject.

func (*CurrentUserResponse) MarshalJSON

func (s *CurrentUserResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CurrentUserResponse) SetEmail

func (s *CurrentUserResponse) SetEmail(val OptString)

SetEmail sets the value of Email.

func (*CurrentUserResponse) SetFirstName

func (s *CurrentUserResponse) SetFirstName(val OptString)

SetFirstName sets the value of FirstName.

func (*CurrentUserResponse) SetLastName

func (s *CurrentUserResponse) SetLastName(val OptString)

SetLastName sets the value of LastName.

func (*CurrentUserResponse) SetSubject

func (s *CurrentUserResponse) SetSubject(val string)

SetSubject sets the value of Subject.

func (*CurrentUserResponse) UnmarshalJSON

func (s *CurrentUserResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type GenericResponse

type GenericResponse struct {
	Code    OptInt                   `json:"code"`
	Data    *GenericResponseData     `json:"data"`
	Message OptString                `json:"message"`
	Status  OptGenericResponseStatus `json:"status"`
}

Ref: #/components/schemas/genericResponse

func (*GenericResponse) Decode

func (s *GenericResponse) Decode(d *jx.Decoder) error

Decode decodes GenericResponse from json.

func (*GenericResponse) Encode

func (s *GenericResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GenericResponse) GetCode

func (s *GenericResponse) GetCode() OptInt

GetCode returns the value of Code.

func (*GenericResponse) GetData

func (s *GenericResponse) GetData() *GenericResponseData

GetData returns the value of Data.

func (*GenericResponse) GetMessage

func (s *GenericResponse) GetMessage() OptString

GetMessage returns the value of Message.

func (*GenericResponse) GetStatus

GetStatus returns the value of Status.

func (*GenericResponse) MarshalJSON

func (s *GenericResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GenericResponse) SetCode

func (s *GenericResponse) SetCode(val OptInt)

SetCode sets the value of Code.

func (*GenericResponse) SetData

func (s *GenericResponse) SetData(val *GenericResponseData)

SetData sets the value of Data.

func (*GenericResponse) SetMessage

func (s *GenericResponse) SetMessage(val OptString)

SetMessage sets the value of Message.

func (*GenericResponse) SetStatus

func (s *GenericResponse) SetStatus(val OptGenericResponseStatus)

SetStatus sets the value of Status.

func (*GenericResponse) UnmarshalJSON

func (s *GenericResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GenericResponse) Validate

func (s *GenericResponse) Validate() error

type GenericResponseData

type GenericResponseData struct{}

func (*GenericResponseData) Decode

func (s *GenericResponseData) Decode(d *jx.Decoder) error

Decode decodes GenericResponseData from json.

func (*GenericResponseData) Encode

func (s *GenericResponseData) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GenericResponseData) MarshalJSON

func (s *GenericResponseData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GenericResponseData) UnmarshalJSON

func (s *GenericResponseData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GenericResponseHeaders

type GenericResponseHeaders struct {
	RetryAfter int
	Response   GenericResponse
}

GenericResponseHeaders wraps GenericResponse with response headers.

func (*GenericResponseHeaders) GetResponse

func (s *GenericResponseHeaders) GetResponse() GenericResponse

GetResponse returns the value of Response.

func (*GenericResponseHeaders) GetRetryAfter

func (s *GenericResponseHeaders) GetRetryAfter() int

GetRetryAfter returns the value of RetryAfter.

func (*GenericResponseHeaders) SetResponse

func (s *GenericResponseHeaders) SetResponse(val GenericResponse)

SetResponse sets the value of Response.

func (*GenericResponseHeaders) SetRetryAfter

func (s *GenericResponseHeaders) SetRetryAfter(val int)

SetRetryAfter sets the value of RetryAfter.

func (*GenericResponseHeaders) Validate

func (s *GenericResponseHeaders) Validate() error

type GenericResponseStatus

type GenericResponseStatus string
const (
	GenericResponseStatusSuccess GenericResponseStatus = "success"
	GenericResponseStatusFail    GenericResponseStatus = "fail"
	GenericResponseStatusError   GenericResponseStatus = "error"
)

func (GenericResponseStatus) AllValues

AllValues returns all GenericResponseStatus values.

func (*GenericResponseStatus) Decode

func (s *GenericResponseStatus) Decode(d *jx.Decoder) error

Decode decodes GenericResponseStatus from json.

func (GenericResponseStatus) Encode

func (s GenericResponseStatus) Encode(e *jx.Encoder)

Encode encodes GenericResponseStatus as json.

func (GenericResponseStatus) MarshalJSON

func (s GenericResponseStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (GenericResponseStatus) MarshalText

func (s GenericResponseStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*GenericResponseStatus) UnmarshalJSON

func (s *GenericResponseStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GenericResponseStatus) UnmarshalText

func (s *GenericResponseStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (GenericResponseStatus) Validate

func (s GenericResponseStatus) Validate() error

type GetCurrentUserRes

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

type GetCurrentUserUnauthorized

type GetCurrentUserUnauthorized struct{}

GetCurrentUserUnauthorized is response for GetCurrentUser operation.

type Handler

type Handler interface {
	// GetCurrentUser implements GetCurrentUser operation.
	//
	// Example protected endpoint. Requires a valid bearer token and returns the subject encoded in it.
	//
	// GET /me
	GetCurrentUser(ctx context.Context) (GetCurrentUserRes, error)
	// HealthLiveness implements HealthLiveness operation.
	//
	// Liveness probe.
	//
	// GET /healthz/liveness
	HealthLiveness(ctx context.Context) error
	// HealthReadiness implements HealthReadiness operation.
	//
	// Readiness probe for kubernetes health check. Returns 200 if the service is ready to serve requests.
	// Returns 503 if the service is not ready to serve requests (starting up or shutting down).
	//
	// GET /healthz/readiness
	HealthReadiness(ctx context.Context) (HealthReadinessRes, error)
	// Login implements Login operation.
	//
	// Verifies the supplied email and password and, on success, returns a signed JWT bearer token to
	// send as the Authorization header on subsequent requests. Unknown emails, wrong passwords, and a
	// server with login disabled (no JWT secret configured) all return the same 401 so a client cannot
	// distinguish them.
	//
	// POST /login
	Login(ctx context.Context, req *LoginRequest) (LoginRes, error)
}

Handler handles operations described by OpenAPI v3 specification.

type HealthLivenessOK

type HealthLivenessOK struct{}

HealthLivenessOK is response for HealthLiveness operation.

type HealthReadinessOK

type HealthReadinessOK struct{}

HealthReadinessOK is response for HealthReadiness operation.

type HealthReadinessRes

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

type HealthReadinessServiceUnavailable

type HealthReadinessServiceUnavailable struct{}

HealthReadinessServiceUnavailable is response for HealthReadiness operation.

type Invoker

type Invoker interface {
	// GetCurrentUser invokes GetCurrentUser operation.
	//
	// Example protected endpoint. Requires a valid bearer token and returns the subject encoded in it.
	//
	// GET /me
	GetCurrentUser(ctx context.Context) (GetCurrentUserRes, error)
	// HealthLiveness invokes HealthLiveness operation.
	//
	// Liveness probe.
	//
	// GET /healthz/liveness
	HealthLiveness(ctx context.Context) error
	// HealthReadiness invokes HealthReadiness operation.
	//
	// Readiness probe for kubernetes health check. Returns 200 if the service is ready to serve requests.
	// Returns 503 if the service is not ready to serve requests (starting up or shutting down).
	//
	// GET /healthz/readiness
	HealthReadiness(ctx context.Context) (HealthReadinessRes, error)
	// Login invokes Login operation.
	//
	// Verifies the supplied email and password and, on success, returns a signed JWT bearer token to
	// send as the Authorization header on subsequent requests. Unknown emails, wrong passwords, and a
	// server with login disabled (no JWT secret configured) all return the same 401 so a client cannot
	// distinguish them.
	//
	// POST /login
	Login(ctx context.Context, request *LoginRequest) (LoginRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type Labeler

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

Labeler is used to allow adding custom attributes to the server request metrics.

func LabelerFromContext

func LabelerFromContext(ctx context.Context) (*Labeler, bool)

LabelerFromContext retrieves the Labeler from the provided context, if present.

If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.

func (*Labeler) Add

func (l *Labeler) Add(attrs ...attribute.KeyValue)

Add attributes to the Labeler.

func (*Labeler) AttributeSet

func (l *Labeler) AttributeSet() attribute.Set

AttributeSet returns the attributes added to the Labeler as an attribute.Set.

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

Ref: #/components/schemas/loginRequest

func (*LoginRequest) Decode

func (s *LoginRequest) Decode(d *jx.Decoder) error

Decode decodes LoginRequest from json.

func (*LoginRequest) Encode

func (s *LoginRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*LoginRequest) GetEmail

func (s *LoginRequest) GetEmail() string

GetEmail returns the value of Email.

func (*LoginRequest) GetPassword

func (s *LoginRequest) GetPassword() string

GetPassword returns the value of Password.

func (*LoginRequest) MarshalJSON

func (s *LoginRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*LoginRequest) SetEmail

func (s *LoginRequest) SetEmail(val string)

SetEmail sets the value of Email.

func (*LoginRequest) SetPassword

func (s *LoginRequest) SetPassword(val string)

SetPassword sets the value of Password.

func (*LoginRequest) UnmarshalJSON

func (s *LoginRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*LoginRequest) Validate

func (s *LoginRequest) Validate() error

type LoginRes

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

type LoginResponse

type LoginResponse struct {
	Token string `json:"token"`
}

Ref: #/components/schemas/loginResponse

func (*LoginResponse) Decode

func (s *LoginResponse) Decode(d *jx.Decoder) error

Decode decodes LoginResponse from json.

func (*LoginResponse) Encode

func (s *LoginResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*LoginResponse) GetToken

func (s *LoginResponse) GetToken() string

GetToken returns the value of Token.

func (*LoginResponse) MarshalJSON

func (s *LoginResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*LoginResponse) SetToken

func (s *LoginResponse) SetToken(val string)

SetToken sets the value of Token.

func (*LoginResponse) UnmarshalJSON

func (s *LoginResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type LoginUnauthorized

type LoginUnauthorized struct{}

LoginUnauthorized is response for Login operation.

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OperationName

type OperationName = string

OperationName is the ogen operation name

const (
	GetCurrentUserOperation  OperationName = "GetCurrentUser"
	HealthLivenessOperation  OperationName = "HealthLiveness"
	HealthReadinessOperation OperationName = "HealthReadiness"
	LoginOperation           OperationName = "Login"
)

type OptGenericResponseStatus

type OptGenericResponseStatus struct {
	Value GenericResponseStatus
	Set   bool
}

OptGenericResponseStatus is optional GenericResponseStatus.

func NewOptGenericResponseStatus

func NewOptGenericResponseStatus(v GenericResponseStatus) OptGenericResponseStatus

NewOptGenericResponseStatus returns new OptGenericResponseStatus with value set to v.

func (*OptGenericResponseStatus) Decode

func (o *OptGenericResponseStatus) Decode(d *jx.Decoder) error

Decode decodes GenericResponseStatus from json.

func (OptGenericResponseStatus) Encode

func (o OptGenericResponseStatus) Encode(e *jx.Encoder)

Encode encodes GenericResponseStatus as json.

func (OptGenericResponseStatus) Get

Get returns value and boolean that denotes whether value was set.

func (OptGenericResponseStatus) IsSet

func (o OptGenericResponseStatus) IsSet() bool

IsSet returns true if OptGenericResponseStatus was set.

func (OptGenericResponseStatus) MarshalJSON

func (s OptGenericResponseStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptGenericResponseStatus) Or

Or returns value if set, or given parameter if does not.

func (*OptGenericResponseStatus) Reset

func (o *OptGenericResponseStatus) Reset()

Reset unsets value.

func (*OptGenericResponseStatus) SetTo

SetTo sets value to v.

func (*OptGenericResponseStatus) UnmarshalJSON

func (s *OptGenericResponseStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt

type OptInt struct {
	Value int
	Set   bool
}

OptInt is optional int.

func NewOptInt

func NewOptInt(v int) OptInt

NewOptInt returns new OptInt with value set to v.

func (*OptInt) Decode

func (o *OptInt) Decode(d *jx.Decoder) error

Decode decodes int from json.

func (OptInt) Encode

func (o OptInt) Encode(e *jx.Encoder)

Encode encodes int as json.

func (OptInt) Get

func (o OptInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt) IsSet

func (o OptInt) IsSet() bool

IsSet returns true if OptInt was set.

func (OptInt) MarshalJSON

func (s OptInt) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt) Or

func (o OptInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptInt) Reset

func (o *OptInt) Reset()

Reset unsets value.

func (*OptInt) SetTo

func (o *OptInt) SetTo(v int)

SetTo sets value to v.

func (*OptInt) UnmarshalJSON

func (s *OptInt) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

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) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type SecurityHandler

type SecurityHandler interface {
	// HandleBearerAuth handles bearerAuth security.
	// JWT bearer token passed in the Authorization header.
	HandleBearerAuth(ctx context.Context, operationName OperationName, t BearerAuth) (context.Context, error)
}

SecurityHandler is handler for security parameters.

type SecuritySource

type SecuritySource interface {
	// BearerAuth provides bearerAuth security value.
	// JWT bearer token passed in the Authorization header.
	BearerAuth(ctx context.Context, operationName OperationName) (BearerAuth, error)
}

SecuritySource is provider of security values (tokens, passwords, etc.).

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, sec SecurityHandler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

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) GetCurrentUser

func (UnimplementedHandler) GetCurrentUser(ctx context.Context) (r GetCurrentUserRes, _ error)

GetCurrentUser implements GetCurrentUser operation.

Example protected endpoint. Requires a valid bearer token and returns the subject encoded in it.

GET /me

func (UnimplementedHandler) HealthLiveness

func (UnimplementedHandler) HealthLiveness(ctx context.Context) error

HealthLiveness implements HealthLiveness operation.

Liveness probe.

GET /healthz/liveness

func (UnimplementedHandler) HealthReadiness

func (UnimplementedHandler) HealthReadiness(ctx context.Context) (r HealthReadinessRes, _ error)

HealthReadiness implements HealthReadiness operation.

Readiness probe for kubernetes health check. Returns 200 if the service is ready to serve requests. Returns 503 if the service is not ready to serve requests (starting up or shutting down).

GET /healthz/readiness

func (UnimplementedHandler) Login

Login implements Login operation.

Verifies the supplied email and password and, on success, returns a signed JWT bearer token to send as the Authorization header on subsequent requests. Unknown emails, wrong passwords, and a server with login disabled (no JWT secret configured) all return the same 401 so a client cannot distinguish them.

POST /login

Jump to

Keyboard shortcuts

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