api

package
v0.0.0-...-4712362 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerScopes = "Bearer.Scopes"
)

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, m *http.ServeMux) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, m *http.ServeMux, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

Types

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type JWKSetKey

type JWKSetKey struct {
	// Alg 署名検証アルゴリズム
	Alg string `json:"alg"`

	// E exponent 公開鍵を復元するための指数値
	E string `json:"e"`

	// Kid 鍵識別子
	Kid openapi_types.UUID `json:"kid"`

	// Kty RSAやEC等の暗号アルゴリズムファミリー
	Kty string `json:"kty"`

	// N modulus 公開鍵を復元するための公開鍵の絶対値
	N string `json:"n"`

	// Use 公開鍵の用途
	Use string `json:"use"`
}

JWKSetKey jwk set key

type JWKSetSchema

type JWKSetSchema struct {
	Keys []JWKSetKey `json:"keys"`
}

JWKSetSchema https://openid-foundation-japan.github.io/rfc7517.ja.html#anchor5

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type PostCertsJSONRequestBody

type PostCertsJSONRequestBody = JWKSetKey

PostCertsJSONRequestBody defines body for PostCerts for application/json ContentType.

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ServerInterface

type ServerInterface interface {
	// Get JWK Set
	// (GET /certs)
	GetCerts(w http.ResponseWriter, r *http.Request)
	// Post JWK Set
	// (POST /certs)
	PostCerts(w http.ResponseWriter, r *http.Request)
	// Verify JWT
	// (GET /verify)
	Verify(w http.ResponseWriter, r *http.Request)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) GetCerts

func (siw *ServerInterfaceWrapper) GetCerts(w http.ResponseWriter, r *http.Request)

GetCerts operation middleware

func (*ServerInterfaceWrapper) PostCerts

func (siw *ServerInterfaceWrapper) PostCerts(w http.ResponseWriter, r *http.Request)

PostCerts operation middleware

func (*ServerInterfaceWrapper) Verify

Verify operation middleware

type StdHTTPServerOptions

type StdHTTPServerOptions struct {
	BaseURL          string
	BaseRouter       *http.ServeMux
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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