Documentation
¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Alg
- func (Alg) AllValues() []Alg
- func (s *Alg) Decode(d *jx.Decoder) error
- func (s Alg) Encode(e *jx.Encoder)
- func (s Alg) MarshalJSON() ([]byte, error)
- func (s Alg) MarshalText() ([]byte, error)
- func (s *Alg) UnmarshalJSON(data []byte) error
- func (s *Alg) UnmarshalText(data []byte) error
- func (s Alg) Validate() error
- type Client
- func (c *Client) GetPublicKey(ctx context.Context, params GetPublicKeyParams) (GetPublicKeyRes, error)
- func (c *Client) Healthcheck(ctx context.Context) (HealthcheckRes, error)
- func (c *Client) ListPublicKeys(ctx context.Context, params ListPublicKeysParams) (ListPublicKeysRes, error)
- func (c *Client) Ping(ctx context.Context) (PingRes, error)
- func (c *Client) SignClaims(ctx context.Context, request SignClaimsReq, params SignClaimsParams) (SignClaimsRes, error)
- type ClientOption
- type Dependency
- func (s *Dependency) Decode(d *jx.Decoder) error
- func (s *Dependency) Encode(e *jx.Encoder)
- func (s *Dependency) GetAdditionalProps() DependencyAdditional
- func (s *Dependency) GetName() string
- func (s *Dependency) GetStatus() DependencyStatus
- func (s *Dependency) MarshalJSON() ([]byte, error)
- func (s *Dependency) SetAdditionalProps(val DependencyAdditional)
- func (s *Dependency) SetName(val string)
- func (s *Dependency) SetStatus(val DependencyStatus)
- func (s *Dependency) UnmarshalJSON(data []byte) error
- func (s *Dependency) Validate() error
- type DependencyAdditional
- type DependencyStatus
- func (DependencyStatus) AllValues() []DependencyStatus
- func (s *DependencyStatus) Decode(d *jx.Decoder) error
- func (s DependencyStatus) Encode(e *jx.Encoder)
- func (s DependencyStatus) MarshalJSON() ([]byte, error)
- func (s DependencyStatus) MarshalText() ([]byte, error)
- func (s *DependencyStatus) UnmarshalJSON(data []byte) error
- func (s *DependencyStatus) UnmarshalText(data []byte) error
- func (s DependencyStatus) Validate() error
- type ErrorHandler
- type ForbiddenError
- func (s *ForbiddenError) Decode(d *jx.Decoder) error
- func (s *ForbiddenError) Encode(e *jx.Encoder)
- func (s *ForbiddenError) GetError() string
- func (s *ForbiddenError) MarshalJSON() ([]byte, error)
- func (s *ForbiddenError) SetError(val string)
- func (s *ForbiddenError) UnmarshalJSON(data []byte) error
- type GetPublicKeyParams
- type GetPublicKeyRes
- type Handler
- type Health
- func (s *Health) Decode(d *jx.Decoder) error
- func (s *Health) Encode(e *jx.Encoder)
- func (s *Health) GetPostgres() Dependency
- func (s *Health) MarshalJSON() ([]byte, error)
- func (s *Health) SetPostgres(val Dependency)
- func (s *Health) UnmarshalJSON(data []byte) error
- func (s *Health) Validate() error
- type HealthcheckIMATeapot
- type HealthcheckRes
- type Invoker
- type JWK
- func (s *JWK) Decode(d *jx.Decoder) error
- func (s *JWK) Encode(e *jx.Encoder)
- func (s *JWK) GetAdditionalProps() JWKAdditional
- func (s *JWK) GetAlg() Alg
- func (s *JWK) GetKeyOps() []KeyOp
- func (s *JWK) GetKid() OptKID
- func (s *JWK) GetKty() KTY
- func (s *JWK) GetUse() Use
- func (s *JWK) MarshalJSON() ([]byte, error)
- func (s *JWK) SetAdditionalProps(val JWKAdditional)
- func (s *JWK) SetAlg(val Alg)
- func (s *JWK) SetKeyOps(val []KeyOp)
- func (s *JWK) SetKid(val OptKID)
- func (s *JWK) SetKty(val KTY)
- func (s *JWK) SetUse(val Use)
- func (s *JWK) UnmarshalJSON(data []byte) error
- func (s *JWK) Validate() error
- type JWKAdditional
- type KID
- type KTY
- func (KTY) AllValues() []KTY
- func (s *KTY) Decode(d *jx.Decoder) error
- func (s KTY) Encode(e *jx.Encoder)
- func (s KTY) MarshalJSON() ([]byte, error)
- func (s KTY) MarshalText() ([]byte, error)
- func (s *KTY) UnmarshalJSON(data []byte) error
- func (s *KTY) UnmarshalText(data []byte) error
- func (s KTY) Validate() error
- type KeyOp
- func (KeyOp) AllValues() []KeyOp
- func (s *KeyOp) Decode(d *jx.Decoder) error
- func (s KeyOp) Encode(e *jx.Encoder)
- func (s KeyOp) MarshalJSON() ([]byte, error)
- func (s KeyOp) MarshalText() ([]byte, error)
- func (s *KeyOp) UnmarshalJSON(data []byte) error
- func (s *KeyOp) UnmarshalText(data []byte) error
- func (s KeyOp) Validate() error
- type KeyUsage
- type Labeler
- type ListPublicKeysOKApplicationJSON
- func (s *ListPublicKeysOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListPublicKeysOKApplicationJSON) Encode(e *jx.Encoder)
- func (s ListPublicKeysOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListPublicKeysOKApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListPublicKeysOKApplicationJSON) Validate() error
- type ListPublicKeysParams
- type ListPublicKeysRes
- type Middleware
- type NotFoundError
- type OperationName
- type OptKID
- func (o *OptKID) Decode(d *jx.Decoder) error
- func (o OptKID) Encode(e *jx.Encoder)
- func (o OptKID) Get() (v KID, ok bool)
- func (o OptKID) IsSet() bool
- func (s OptKID) MarshalJSON() ([]byte, error)
- func (o OptKID) Or(d KID) KID
- func (o *OptKID) Reset()
- func (o *OptKID) SetTo(v KID)
- func (s *OptKID) UnmarshalJSON(data []byte) error
- type Option
- type PingIMATeapot
- type PingOK
- type PingRes
- 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 SignClaimsParams
- type SignClaimsReq
- type SignClaimsRes
- type Token
- type UnauthorizedError
- func (s *UnauthorizedError) Decode(d *jx.Decoder) error
- func (s *UnauthorizedError) Encode(e *jx.Encoder)
- func (s *UnauthorizedError) GetError() string
- func (s *UnauthorizedError) MarshalJSON() ([]byte, error)
- func (s *UnauthorizedError) SetError(val string)
- func (s *UnauthorizedError) UnmarshalJSON(data []byte) error
- type UnexpectedError
- func (s *UnexpectedError) Decode(d *jx.Decoder) error
- func (s *UnexpectedError) Encode(e *jx.Encoder)
- func (s *UnexpectedError) GetError() string
- func (s *UnexpectedError) MarshalJSON() ([]byte, error)
- func (s *UnexpectedError) SetError(val string)
- func (s *UnexpectedError) UnmarshalJSON(data []byte) error
- type UnexpectedErrorStatusCode
- func (s *UnexpectedErrorStatusCode) Error() string
- func (s *UnexpectedErrorStatusCode) GetResponse() UnexpectedError
- func (s *UnexpectedErrorStatusCode) GetStatusCode() int
- func (s *UnexpectedErrorStatusCode) SetResponse(val UnexpectedError)
- func (s *UnexpectedErrorStatusCode) SetStatusCode(val int)
- type UnimplementedHandler
- func (UnimplementedHandler) GetPublicKey(ctx context.Context, params GetPublicKeyParams) (r GetPublicKeyRes, _ error)
- func (UnimplementedHandler) Healthcheck(ctx context.Context) (r HealthcheckRes, _ error)
- func (UnimplementedHandler) ListPublicKeys(ctx context.Context, params ListPublicKeysParams) (r ListPublicKeysRes, _ error)
- func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *UnexpectedErrorStatusCode)
- func (UnimplementedHandler) Ping(ctx context.Context) (r PingRes, _ error)
- func (UnimplementedHandler) SignClaims(ctx context.Context, req SignClaimsReq, params SignClaimsParams) (r SignClaimsRes, _ error)
- type Use
- func (Use) AllValues() []Use
- func (s *Use) Decode(d *jx.Decoder) error
- func (s Use) Encode(e *jx.Encoder)
- func (s Use) MarshalJSON() ([]byte, error)
- func (s Use) MarshalText() ([]byte, error)
- func (s *Use) UnmarshalJSON(data []byte) error
- func (s *Use) UnmarshalText(data []byte) error
- func (s Use) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alg ¶
type Alg string
The algorithm this key can be used for. Ref: #/components/schemas/Alg
const ( AlgHS256 Alg = "HS256" AlgHS384 Alg = "HS384" AlgHS512 Alg = "HS512" AlgRS256 Alg = "RS256" AlgRS384 Alg = "RS384" AlgRS512 Alg = "RS512" AlgES256 Alg = "ES256" AlgES384 Alg = "ES384" AlgES512 Alg = "ES512" AlgPS256 Alg = "PS256" AlgPS384 Alg = "PS384" AlgPS512 Alg = "PS512" AlgEdDSA Alg = "EdDSA" AlgRSAOAEP Alg = "RSA-OAEP" AlgRSAOAEP256 Alg = "RSA-OAEP-256" AlgA128KW Alg = "A128KW" AlgA192KW Alg = "A192KW" AlgA256KW Alg = "A256KW" AlgDir Alg = "dir" AlgECDHES Alg = "ECDH-ES" AlgECDHESA128KW Alg = "ECDH-ES+A128KW" AlgECDHESA192KW Alg = "ECDH-ES+A192KW" AlgECDHESA256KW Alg = "ECDH-ES+A256KW" AlgA128GCMKW Alg = "A128GCMKW" AlgA192GCMKW Alg = "A192GCMKW" AlgA256GCMKW Alg = "A256GCMKW" AlgPBES2HS256A128KW Alg = "PBES2-HS256+A128KW" AlgPBES2HS384A192KW Alg = "PBES2-HS384+A192KW" AlgPBES2HS512A256KW Alg = "PBES2-HS512+A256KW" AlgA128CBCHS256 Alg = "A128CBC-HS256" AlgA192CBCHS384 Alg = "A192CBC-HS384" AlgA256CBCHS512 Alg = "A256CBC-HS512" AlgA128GCM Alg = "A128GCM" AlgA192GCM Alg = "A192GCM" AlgA256GCM Alg = "A256GCM" )
func (Alg) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (Alg) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*Alg) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
func (*Alg) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) GetPublicKey ¶
func (c *Client) GetPublicKey(ctx context.Context, params GetPublicKeyParams) (GetPublicKeyRes, error)
GetPublicKey invokes getPublicKey operation.
Get a public key from its usage.
GET /public-keys
func (*Client) Healthcheck ¶
func (c *Client) Healthcheck(ctx context.Context) (HealthcheckRes, error)
Healthcheck invokes healthcheck operation.
Returns a detailed report of the health of the service, including every dependency.
GET /healthcheck
func (*Client) ListPublicKeys ¶
func (c *Client) ListPublicKeys(ctx context.Context, params ListPublicKeysParams) (ListPublicKeysRes, error)
ListPublicKeys invokes listPublicKeys operation.
Get all public keys from the service that match a given usage.
GET /public-keys/list
func (*Client) Ping ¶
Ping invokes ping operation.
Check the status of the service. If the service is running, a successful response is returned.
GET /ping
func (*Client) SignClaims ¶
func (c *Client) SignClaims(ctx context.Context, request SignClaimsReq, params SignClaimsParams) (SignClaimsRes, error)
SignClaims invokes signClaims operation.
Sign a payload using the configuration for the target usage.
POST /payload/sign
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 Dependency ¶
type Dependency struct {
// The name of the dependency.
Name string `json:"name"`
Status DependencyStatus `json:"status"`
AdditionalProps DependencyAdditional
}
Ref: #/components/schemas/Dependency
func (*Dependency) Decode ¶
func (s *Dependency) Decode(d *jx.Decoder) error
Decode decodes Dependency from json.
func (*Dependency) Encode ¶
func (s *Dependency) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*Dependency) GetAdditionalProps ¶
func (s *Dependency) GetAdditionalProps() DependencyAdditional
GetAdditionalProps returns the value of AdditionalProps.
func (*Dependency) GetName ¶
func (s *Dependency) GetName() string
GetName returns the value of Name.
func (*Dependency) GetStatus ¶
func (s *Dependency) GetStatus() DependencyStatus
GetStatus returns the value of Status.
func (*Dependency) MarshalJSON ¶
func (s *Dependency) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*Dependency) SetAdditionalProps ¶
func (s *Dependency) SetAdditionalProps(val DependencyAdditional)
SetAdditionalProps sets the value of AdditionalProps.
func (*Dependency) SetName ¶
func (s *Dependency) SetName(val string)
SetName sets the value of Name.
func (*Dependency) SetStatus ¶
func (s *Dependency) SetStatus(val DependencyStatus)
SetStatus sets the value of Status.
func (*Dependency) UnmarshalJSON ¶
func (s *Dependency) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*Dependency) Validate ¶
func (s *Dependency) Validate() error
type DependencyAdditional ¶
func (*DependencyAdditional) Decode ¶
func (s *DependencyAdditional) Decode(d *jx.Decoder) error
Decode decodes DependencyAdditional from json.
func (DependencyAdditional) Encode ¶
func (s DependencyAdditional) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (DependencyAdditional) MarshalJSON ¶
func (s DependencyAdditional) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DependencyAdditional) UnmarshalJSON ¶
func (s *DependencyAdditional) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type DependencyStatus ¶
type DependencyStatus string
The status of a dependency. Ref: #/components/schemas/DependencyStatus
const ( DependencyStatusUp DependencyStatus = "up" DependencyStatusDown DependencyStatus = "down" DependencyStatusUnknown DependencyStatus = "unknown" )
func (DependencyStatus) AllValues ¶
func (DependencyStatus) AllValues() []DependencyStatus
AllValues returns all DependencyStatus values.
func (*DependencyStatus) Decode ¶
func (s *DependencyStatus) Decode(d *jx.Decoder) error
Decode decodes DependencyStatus from json.
func (DependencyStatus) Encode ¶
func (s DependencyStatus) Encode(e *jx.Encoder)
Encode encodes DependencyStatus as json.
func (DependencyStatus) MarshalJSON ¶
func (s DependencyStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (DependencyStatus) MarshalText ¶
func (s DependencyStatus) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*DependencyStatus) UnmarshalJSON ¶
func (s *DependencyStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*DependencyStatus) UnmarshalText ¶
func (s *DependencyStatus) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (DependencyStatus) Validate ¶
func (s DependencyStatus) Validate() error
type ForbiddenError ¶
type ForbiddenError struct {
// The error message.
Error string `json:"error"`
}
Ref: #/components/schemas/ForbiddenError
func (*ForbiddenError) Decode ¶
func (s *ForbiddenError) Decode(d *jx.Decoder) error
Decode decodes ForbiddenError from json.
func (*ForbiddenError) Encode ¶
func (s *ForbiddenError) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ForbiddenError) GetError ¶
func (s *ForbiddenError) GetError() string
GetError returns the value of Error.
func (*ForbiddenError) MarshalJSON ¶
func (s *ForbiddenError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ForbiddenError) SetError ¶
func (s *ForbiddenError) SetError(val string)
SetError sets the value of Error.
func (*ForbiddenError) UnmarshalJSON ¶
func (s *ForbiddenError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetPublicKeyParams ¶
type GetPublicKeyParams struct {
// The unique identifier of the key, conveyed through its KID field.
Kid KID
}
GetPublicKeyParams is parameters of getPublicKey operation.
type GetPublicKeyRes ¶
type GetPublicKeyRes interface {
// contains filtered or unexported methods
}
type Handler ¶
type Handler interface {
// GetPublicKey implements getPublicKey operation.
//
// Get a public key from its usage.
//
// GET /public-keys
GetPublicKey(ctx context.Context, params GetPublicKeyParams) (GetPublicKeyRes, error)
// Healthcheck implements healthcheck operation.
//
// Returns a detailed report of the health of the service, including every dependency.
//
// GET /healthcheck
Healthcheck(ctx context.Context) (HealthcheckRes, error)
// ListPublicKeys implements listPublicKeys operation.
//
// Get all public keys from the service that match a given usage.
//
// GET /public-keys/list
ListPublicKeys(ctx context.Context, params ListPublicKeysParams) (ListPublicKeysRes, error)
// Ping implements ping operation.
//
// Check the status of the service. If the service is running, a successful response is returned.
//
// GET /ping
Ping(ctx context.Context) (PingRes, error)
// SignClaims implements signClaims operation.
//
// Sign a payload using the configuration for the target usage.
//
// POST /payload/sign
SignClaims(ctx context.Context, req SignClaimsReq, params SignClaimsParams) (SignClaimsRes, error)
// NewError creates *UnexpectedErrorStatusCode from error returned by handler.
//
// Used for common default response.
NewError(ctx context.Context, err error) *UnexpectedErrorStatusCode
}
Handler handles operations described by OpenAPI v3 specification.
type Health ¶
type Health struct {
Postgres Dependency `json:"postgres"`
}
Ref: #/components/schemas/Health
func (*Health) GetPostgres ¶
func (s *Health) GetPostgres() Dependency
GetPostgres returns the value of Postgres.
func (*Health) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Health) SetPostgres ¶
func (s *Health) SetPostgres(val Dependency)
SetPostgres sets the value of Postgres.
func (*Health) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type HealthcheckIMATeapot ¶
type HealthcheckIMATeapot struct{}
HealthcheckIMATeapot is response for Healthcheck operation.
type HealthcheckRes ¶
type HealthcheckRes interface {
// contains filtered or unexported methods
}
type Invoker ¶
type Invoker interface {
// GetPublicKey invokes getPublicKey operation.
//
// Get a public key from its usage.
//
// GET /public-keys
GetPublicKey(ctx context.Context, params GetPublicKeyParams) (GetPublicKeyRes, error)
// Healthcheck invokes healthcheck operation.
//
// Returns a detailed report of the health of the service, including every dependency.
//
// GET /healthcheck
Healthcheck(ctx context.Context) (HealthcheckRes, error)
// ListPublicKeys invokes listPublicKeys operation.
//
// Get all public keys from the service that match a given usage.
//
// GET /public-keys/list
ListPublicKeys(ctx context.Context, params ListPublicKeysParams) (ListPublicKeysRes, error)
// Ping invokes ping operation.
//
// Check the status of the service. If the service is running, a successful response is returned.
//
// GET /ping
Ping(ctx context.Context) (PingRes, error)
// SignClaims invokes signClaims operation.
//
// Sign a payload using the configuration for the target usage.
//
// POST /payload/sign
SignClaims(ctx context.Context, request SignClaimsReq, params SignClaimsParams) (SignClaimsRes, error)
}
Invoker invokes operations described by OpenAPI v3 specification.
type JWK ¶
type JWK struct {
Kty KTY `json:"kty"`
Use Use `json:"use"`
KeyOps []KeyOp `json:"key_ops"`
Alg Alg `json:"alg"`
Kid OptKID `json:"kid"`
AdditionalProps JWKAdditional
}
Ref: #/components/schemas/JWK
func (*JWK) GetAdditionalProps ¶
func (s *JWK) GetAdditionalProps() JWKAdditional
GetAdditionalProps returns the value of AdditionalProps.
func (*JWK) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*JWK) SetAdditionalProps ¶
func (s *JWK) SetAdditionalProps(val JWKAdditional)
SetAdditionalProps sets the value of AdditionalProps.
func (*JWK) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type JWKAdditional ¶
func (*JWKAdditional) Decode ¶
func (s *JWKAdditional) Decode(d *jx.Decoder) error
Decode decodes JWKAdditional from json.
func (JWKAdditional) Encode ¶
func (s JWKAdditional) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (JWKAdditional) MarshalJSON ¶
func (s JWKAdditional) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*JWKAdditional) UnmarshalJSON ¶
func (s *JWKAdditional) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type KID ¶
func (KID) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*KID) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type KTY ¶
type KTY string
The type of the key embedded in the JWK. Ref: #/components/schemas/KTY
func (KTY) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (KTY) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*KTY) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
func (*KTY) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type KeyOp ¶
type KeyOp string
The operation that can be performed using the key. Ref: #/components/schemas/KeyOp
func (KeyOp) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (KeyOp) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*KeyOp) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
func (*KeyOp) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type KeyUsage ¶
type KeyUsage string
The intended usage of the key. Ref: #/components/schemas/KeyUsage
func (KeyUsage) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*KeyUsage) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
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 ¶
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) AttributeSet ¶
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type ListPublicKeysOKApplicationJSON ¶
type ListPublicKeysOKApplicationJSON []JWK
func (*ListPublicKeysOKApplicationJSON) Decode ¶
func (s *ListPublicKeysOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListPublicKeysOKApplicationJSON from json.
func (ListPublicKeysOKApplicationJSON) Encode ¶
func (s ListPublicKeysOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListPublicKeysOKApplicationJSON as json.
func (ListPublicKeysOKApplicationJSON) MarshalJSON ¶
func (s ListPublicKeysOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListPublicKeysOKApplicationJSON) UnmarshalJSON ¶
func (s *ListPublicKeysOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListPublicKeysOKApplicationJSON) Validate ¶
func (s ListPublicKeysOKApplicationJSON) Validate() error
type ListPublicKeysParams ¶
type ListPublicKeysParams struct {
// The intended usage of the keys.
Usage KeyUsage
}
ListPublicKeysParams is parameters of listPublicKeys operation.
type ListPublicKeysRes ¶
type ListPublicKeysRes interface {
// contains filtered or unexported methods
}
type NotFoundError ¶
type NotFoundError struct {
// The error message.
Error string `json:"error"`
}
Ref: #/components/schemas/NotFoundError
func (*NotFoundError) Decode ¶
func (s *NotFoundError) Decode(d *jx.Decoder) error
Decode decodes NotFoundError from json.
func (*NotFoundError) Encode ¶
func (s *NotFoundError) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*NotFoundError) GetError ¶
func (s *NotFoundError) GetError() string
GetError returns the value of Error.
func (*NotFoundError) MarshalJSON ¶
func (s *NotFoundError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*NotFoundError) SetError ¶
func (s *NotFoundError) SetError(val string)
SetError sets the value of Error.
func (*NotFoundError) UnmarshalJSON ¶
func (s *NotFoundError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const ( GetPublicKeyOperation OperationName = "GetPublicKey" HealthcheckOperation OperationName = "Healthcheck" ListPublicKeysOperation OperationName = "ListPublicKeys" PingOperation OperationName = "Ping" SignClaimsOperation OperationName = "SignClaims" )
type OptKID ¶
OptKID is optional KID.
func (OptKID) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptKID) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface {
ServerOption
ClientOption
}
Option is config option.
func WithAttributes ¶ added in v1.3.9
WithAttributes specifies default otel attributes.
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 SignClaimsParams ¶
type SignClaimsParams struct {
// The intended usage of the keys.
Usage KeyUsage
}
SignClaimsParams is parameters of signClaims operation.
type SignClaimsReq ¶
The claims to be signed. The structure of the claims depends on the intended usage of the key. For example, for authentication, it may include user ID, roles, and expiration time.
func (*SignClaimsReq) Decode ¶
func (s *SignClaimsReq) Decode(d *jx.Decoder) error
Decode decodes SignClaimsReq from json.
func (SignClaimsReq) Encode ¶
func (s SignClaimsReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (SignClaimsReq) MarshalJSON ¶
func (s SignClaimsReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SignClaimsReq) UnmarshalJSON ¶
func (s *SignClaimsReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type SignClaimsRes ¶
type SignClaimsRes interface {
// contains filtered or unexported methods
}
type Token ¶
type Token struct {
// The signed token.
Token string `json:"token"`
}
Ref: #/components/schemas/Token
func (*Token) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Token) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type UnauthorizedError ¶
type UnauthorizedError struct {
Error string `json:"error"`
}
Ref: #/components/schemas/UnauthorizedError
func (*UnauthorizedError) Decode ¶
func (s *UnauthorizedError) Decode(d *jx.Decoder) error
Decode decodes UnauthorizedError from json.
func (*UnauthorizedError) Encode ¶
func (s *UnauthorizedError) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UnauthorizedError) GetError ¶
func (s *UnauthorizedError) GetError() string
GetError returns the value of Error.
func (*UnauthorizedError) MarshalJSON ¶
func (s *UnauthorizedError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UnauthorizedError) SetError ¶
func (s *UnauthorizedError) SetError(val string)
SetError sets the value of Error.
func (*UnauthorizedError) UnmarshalJSON ¶
func (s *UnauthorizedError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UnexpectedError ¶
type UnexpectedError struct {
// The error message.
Error string `json:"error"`
}
Ref: #/components/schemas/UnexpectedError
func (*UnexpectedError) Decode ¶
func (s *UnexpectedError) Decode(d *jx.Decoder) error
Decode decodes UnexpectedError from json.
func (*UnexpectedError) Encode ¶
func (s *UnexpectedError) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UnexpectedError) GetError ¶
func (s *UnexpectedError) GetError() string
GetError returns the value of Error.
func (*UnexpectedError) MarshalJSON ¶
func (s *UnexpectedError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UnexpectedError) SetError ¶
func (s *UnexpectedError) SetError(val string)
SetError sets the value of Error.
func (*UnexpectedError) UnmarshalJSON ¶
func (s *UnexpectedError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UnexpectedErrorStatusCode ¶
type UnexpectedErrorStatusCode struct {
StatusCode int
Response UnexpectedError
}
UnexpectedErrorStatusCode wraps UnexpectedError with StatusCode.
func (*UnexpectedErrorStatusCode) Error ¶
func (s *UnexpectedErrorStatusCode) Error() string
func (*UnexpectedErrorStatusCode) GetResponse ¶
func (s *UnexpectedErrorStatusCode) GetResponse() UnexpectedError
GetResponse returns the value of Response.
func (*UnexpectedErrorStatusCode) GetStatusCode ¶
func (s *UnexpectedErrorStatusCode) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*UnexpectedErrorStatusCode) SetResponse ¶
func (s *UnexpectedErrorStatusCode) SetResponse(val UnexpectedError)
SetResponse sets the value of Response.
func (*UnexpectedErrorStatusCode) SetStatusCode ¶
func (s *UnexpectedErrorStatusCode) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) GetPublicKey ¶
func (UnimplementedHandler) GetPublicKey(ctx context.Context, params GetPublicKeyParams) (r GetPublicKeyRes, _ error)
GetPublicKey implements getPublicKey operation.
Get a public key from its usage.
GET /public-keys
func (UnimplementedHandler) Healthcheck ¶
func (UnimplementedHandler) Healthcheck(ctx context.Context) (r HealthcheckRes, _ error)
Healthcheck implements healthcheck operation.
Returns a detailed report of the health of the service, including every dependency.
GET /healthcheck
func (UnimplementedHandler) ListPublicKeys ¶
func (UnimplementedHandler) ListPublicKeys(ctx context.Context, params ListPublicKeysParams) (r ListPublicKeysRes, _ error)
ListPublicKeys implements listPublicKeys operation.
Get all public keys from the service that match a given usage.
GET /public-keys/list
func (UnimplementedHandler) NewError ¶
func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *UnexpectedErrorStatusCode)
NewError creates *UnexpectedErrorStatusCode from error returned by handler.
Used for common default response.
func (UnimplementedHandler) Ping ¶
func (UnimplementedHandler) Ping(ctx context.Context) (r PingRes, _ error)
Ping implements ping operation.
Check the status of the service. If the service is running, a successful response is returned.
GET /ping
func (UnimplementedHandler) SignClaims ¶
func (UnimplementedHandler) SignClaims(ctx context.Context, req SignClaimsReq, params SignClaimsParams) (r SignClaimsRes, _ error)
SignClaims implements signClaims operation.
Sign a payload using the configuration for the target usage.
POST /payload/sign
type Use ¶
type Use string
The intended use of the public key. Ref: #/components/schemas/Use
func (Use) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (Use) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*Use) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
func (*Use) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
Source Files
¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_labeler_gen.go
- oas_middleware_gen.go
- oas_operations_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go