authadminapi

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

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

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

Index

Constants

View Source
const (
	SessionidScopes = "sessionid.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

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

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

func HandlerFromMuxWithBaseURL

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

func HandlerWithOptions

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

HandlerWithOptions creates http.Handler with additional options

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type APIErrorResponse

type APIErrorResponse struct {
	Errors []string `json:"errors"`
}

APIErrorResponse defines model for APIErrorResponse.

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 LoginSuperuser204Response

type LoginSuperuser204Response struct {
	Headers LoginSuperuser204ResponseHeaders
}

func (LoginSuperuser204Response) VisitLoginSuperuserResponse

func (response LoginSuperuser204Response) VisitLoginSuperuserResponse(w http.ResponseWriter) error

type LoginSuperuser204ResponseHeaders

type LoginSuperuser204ResponseHeaders struct {
	XKrbSession string
}

type LoginSuperuser400JSONResponse

type LoginSuperuser400JSONResponse APIErrorResponse

func (LoginSuperuser400JSONResponse) VisitLoginSuperuserResponse

func (response LoginSuperuser400JSONResponse) VisitLoginSuperuserResponse(w http.ResponseWriter) error

type LoginSuperuser401JSONResponse

type LoginSuperuser401JSONResponse APIErrorResponse

func (LoginSuperuser401JSONResponse) VisitLoginSuperuserResponse

func (response LoginSuperuser401JSONResponse) VisitLoginSuperuserResponse(w http.ResponseWriter) error

type LoginSuperuser500JSONResponse

type LoginSuperuser500JSONResponse APIErrorResponse

func (LoginSuperuser500JSONResponse) VisitLoginSuperuserResponse

func (response LoginSuperuser500JSONResponse) VisitLoginSuperuserResponse(w http.ResponseWriter) error

type LoginSuperuserJSONBody

type LoginSuperuserJSONBody struct {
	ClientId     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
}

LoginSuperuserJSONBody defines parameters for LoginSuperuser.

type LoginSuperuserJSONRequestBody

type LoginSuperuserJSONRequestBody LoginSuperuserJSONBody

LoginSuperuserJSONRequestBody defines body for LoginSuperuser for application/json ContentType.

type LoginSuperuserRequestObject

type LoginSuperuserRequestObject struct {
	Body *LoginSuperuserJSONRequestBody
}

type LoginSuperuserResponseObject

type LoginSuperuserResponseObject interface {
	VisitLoginSuperuserResponse(w http.ResponseWriter) error
}

type LogoutSuperuser204Response

type LogoutSuperuser204Response struct {
}

func (LogoutSuperuser204Response) VisitLogoutSuperuserResponse

func (response LogoutSuperuser204Response) VisitLogoutSuperuserResponse(w http.ResponseWriter) error

type LogoutSuperuser500JSONResponse

type LogoutSuperuser500JSONResponse APIErrorResponse

func (LogoutSuperuser500JSONResponse) VisitLogoutSuperuserResponse

func (response LogoutSuperuser500JSONResponse) VisitLogoutSuperuserResponse(w http.ResponseWriter) error

type LogoutSuperuserRequestObject

type LogoutSuperuserRequestObject struct {
}

type LogoutSuperuserResponseObject

type LogoutSuperuserResponseObject interface {
	VisitLogoutSuperuserResponse(w http.ResponseWriter) error
}

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

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 ServeMux

type ServeMux interface {
	HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
	ServeHTTP(w http.ResponseWriter, r *http.Request)
}

ServeMux is an abstraction of http.ServeMux.

type ServerInterface

type ServerInterface interface {

	// (POST /api/auth/admin/superuser/login)
	LoginSuperuser(w http.ResponseWriter, r *http.Request)

	// (POST /api/auth/admin/superuser/logout)
	LogoutSuperuser(w http.ResponseWriter, r *http.Request)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

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

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

LoginSuperuser operation middleware

func (*ServerInterfaceWrapper) LogoutSuperuser

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

LogoutSuperuser operation middleware

type StdHTTPServerOptions

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

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictServerInterface

type StrictServerInterface interface {

	// (POST /api/auth/admin/superuser/login)
	LoginSuperuser(ctx context.Context, request LoginSuperuserRequestObject) (LoginSuperuserResponseObject, error)

	// (POST /api/auth/admin/superuser/logout)
	LogoutSuperuser(ctx context.Context, request LogoutSuperuserRequestObject) (LogoutSuperuserResponseObject, error)
}

StrictServerInterface represents all server handlers.

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