v1

package
v0.0.0-...-5dbc029 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package v1 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 (
	BearerAuthScopes = "BearerAuth.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 *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

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 ApiService

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

func NewApiService

func NewApiService(clientset *kubernetes.Clientset, config *rest.Config) *ApiService

func (*ApiService) KubernetesList

KubernetesList implements StrictServerInterface.

func (*ApiService) NamespaceCreate

NamespaceCreate implements StrictServerInterface.

func (*ApiService) NamespaceDelete

NamespaceDelete implements StrictServerInterface.

func (*ApiService) NamespaceGet

NamespaceGet implements StrictServerInterface.

func (*ApiService) NamespaceKubeconfig

NamespaceKubeconfig implements StrictServerInterface.

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 KubernetesList200JSONResponse

type KubernetesList200JSONResponse []ModelsKubernetesNamespace

func (KubernetesList200JSONResponse) VisitKubernetesListResponse

func (response KubernetesList200JSONResponse) VisitKubernetesListResponse(w http.ResponseWriter) error

type KubernetesList400JSONResponse

type KubernetesList400JSONResponse ModelsErrorGeneric

func (KubernetesList400JSONResponse) VisitKubernetesListResponse

func (response KubernetesList400JSONResponse) VisitKubernetesListResponse(w http.ResponseWriter) error

type KubernetesList401JSONResponse

type KubernetesList401JSONResponse ModelsErrorUnauthorized

func (KubernetesList401JSONResponse) VisitKubernetesListResponse

func (response KubernetesList401JSONResponse) VisitKubernetesListResponse(w http.ResponseWriter) error

type KubernetesListRequestObject

type KubernetesListRequestObject struct {
}

type KubernetesListResponseObject

type KubernetesListResponseObject interface {
	VisitKubernetesListResponse(w http.ResponseWriter) error
}

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type ModelsErrorAlreadyExists

type ModelsErrorAlreadyExists struct {
	Detail   string                       `json:"detail"`
	Instance string                       `json:"instance"`
	Title    string                       `json:"title"`
	Type     ModelsErrorAlreadyExistsType `json:"type"`
}

ModelsErrorAlreadyExists defines model for Models.ErrorAlreadyExists.

type ModelsErrorAlreadyExistsType

type ModelsErrorAlreadyExistsType string

ModelsErrorAlreadyExistsType defines model for ModelsErrorAlreadyExists.Type.

const (
	AlreadyExists ModelsErrorAlreadyExistsType = "AlreadyExists"
)

Defines values for ModelsErrorAlreadyExistsType.

type ModelsErrorGeneric

type ModelsErrorGeneric struct {
	Detail   string                 `json:"detail"`
	Instance string                 `json:"instance"`
	Title    string                 `json:"title"`
	Type     ModelsErrorGenericType `json:"type"`
}

ModelsErrorGeneric defines model for Models.ErrorGeneric.

type ModelsErrorGenericType

type ModelsErrorGenericType string

ModelsErrorGenericType defines model for ModelsErrorGeneric.Type.

const (
	Generic ModelsErrorGenericType = "Generic"
)

Defines values for ModelsErrorGenericType.

type ModelsErrorNotFound

type ModelsErrorNotFound struct {
	Detail   string                  `json:"detail"`
	Instance string                  `json:"instance"`
	Title    string                  `json:"title"`
	Type     ModelsErrorNotFoundType `json:"type"`
}

ModelsErrorNotFound defines model for Models.ErrorNotFound.

type ModelsErrorNotFoundType

type ModelsErrorNotFoundType string

ModelsErrorNotFoundType defines model for ModelsErrorNotFound.Type.

const (
	NotFound ModelsErrorNotFoundType = "NotFound"
)

Defines values for ModelsErrorNotFoundType.

type ModelsErrorUnauthorized

type ModelsErrorUnauthorized struct {
	Detail   string                      `json:"detail"`
	Instance string                      `json:"instance"`
	Title    string                      `json:"title"`
	Type     ModelsErrorUnauthorizedType `json:"type"`
}

ModelsErrorUnauthorized defines model for Models.ErrorUnauthorized.

type ModelsErrorUnauthorizedType

type ModelsErrorUnauthorizedType string

ModelsErrorUnauthorizedType defines model for ModelsErrorUnauthorized.Type.

const (
	Unauthorized ModelsErrorUnauthorizedType = "Unauthorized"
)

Defines values for ModelsErrorUnauthorizedType.

type ModelsKubeconfigOptionsCertificateAuthorityData

type ModelsKubeconfigOptionsCertificateAuthorityData = []byte

ModelsKubeconfigOptionsCertificateAuthorityData defines model for Models.KubeconfigOptions.certificateAuthorityData.

type ModelsKubeconfigOptionsInsecure

type ModelsKubeconfigOptionsInsecure = bool

ModelsKubeconfigOptionsInsecure defines model for Models.KubeconfigOptions.insecure.

type ModelsKubeconfigOptionsPublicK8sEndpoint

type ModelsKubeconfigOptionsPublicK8sEndpoint = string

ModelsKubeconfigOptionsPublicK8sEndpoint defines model for Models.KubeconfigOptions.publicK8sEndpoint.

type ModelsKubernetesNamespace

type ModelsKubernetesNamespace struct {
	Name string `json:"name"`
}

ModelsKubernetesNamespace defines model for Models.KubernetesNamespace.

type NamespaceCreate200JSONResponse

type NamespaceCreate200JSONResponse ModelsKubernetesNamespace

func (NamespaceCreate200JSONResponse) VisitNamespaceCreateResponse

func (response NamespaceCreate200JSONResponse) VisitNamespaceCreateResponse(w http.ResponseWriter) error

type NamespaceCreate400JSONResponse

type NamespaceCreate400JSONResponse ModelsErrorGeneric

func (NamespaceCreate400JSONResponse) VisitNamespaceCreateResponse

func (response NamespaceCreate400JSONResponse) VisitNamespaceCreateResponse(w http.ResponseWriter) error

type NamespaceCreate401JSONResponse

type NamespaceCreate401JSONResponse ModelsErrorUnauthorized

func (NamespaceCreate401JSONResponse) VisitNamespaceCreateResponse

func (response NamespaceCreate401JSONResponse) VisitNamespaceCreateResponse(w http.ResponseWriter) error

type NamespaceCreate409JSONResponse

type NamespaceCreate409JSONResponse ModelsErrorAlreadyExists

func (NamespaceCreate409JSONResponse) VisitNamespaceCreateResponse

func (response NamespaceCreate409JSONResponse) VisitNamespaceCreateResponse(w http.ResponseWriter) error

type NamespaceCreateRequestObject

type NamespaceCreateRequestObject struct {
	Namespace string `json:"namespace"`
}

type NamespaceCreateResponseObject

type NamespaceCreateResponseObject interface {
	VisitNamespaceCreateResponse(w http.ResponseWriter) error
}

type NamespaceDelete200JSONResponse

type NamespaceDelete200JSONResponse bool

func (NamespaceDelete200JSONResponse) VisitNamespaceDeleteResponse

func (response NamespaceDelete200JSONResponse) VisitNamespaceDeleteResponse(w http.ResponseWriter) error

type NamespaceDelete400JSONResponse

type NamespaceDelete400JSONResponse ModelsErrorGeneric

func (NamespaceDelete400JSONResponse) VisitNamespaceDeleteResponse

func (response NamespaceDelete400JSONResponse) VisitNamespaceDeleteResponse(w http.ResponseWriter) error

type NamespaceDelete401JSONResponse

type NamespaceDelete401JSONResponse ModelsErrorUnauthorized

func (NamespaceDelete401JSONResponse) VisitNamespaceDeleteResponse

func (response NamespaceDelete401JSONResponse) VisitNamespaceDeleteResponse(w http.ResponseWriter) error

type NamespaceDelete404JSONResponse

type NamespaceDelete404JSONResponse ModelsErrorNotFound

func (NamespaceDelete404JSONResponse) VisitNamespaceDeleteResponse

func (response NamespaceDelete404JSONResponse) VisitNamespaceDeleteResponse(w http.ResponseWriter) error

type NamespaceDeleteRequestObject

type NamespaceDeleteRequestObject struct {
	Namespace string `json:"namespace"`
}

type NamespaceDeleteResponseObject

type NamespaceDeleteResponseObject interface {
	VisitNamespaceDeleteResponse(w http.ResponseWriter) error
}

type NamespaceGet200JSONResponse

type NamespaceGet200JSONResponse ModelsKubernetesNamespace

func (NamespaceGet200JSONResponse) VisitNamespaceGetResponse

func (response NamespaceGet200JSONResponse) VisitNamespaceGetResponse(w http.ResponseWriter) error

type NamespaceGet400JSONResponse

type NamespaceGet400JSONResponse ModelsErrorGeneric

func (NamespaceGet400JSONResponse) VisitNamespaceGetResponse

func (response NamespaceGet400JSONResponse) VisitNamespaceGetResponse(w http.ResponseWriter) error

type NamespaceGet401JSONResponse

type NamespaceGet401JSONResponse ModelsErrorUnauthorized

func (NamespaceGet401JSONResponse) VisitNamespaceGetResponse

func (response NamespaceGet401JSONResponse) VisitNamespaceGetResponse(w http.ResponseWriter) error

type NamespaceGet404JSONResponse

type NamespaceGet404JSONResponse ModelsErrorNotFound

func (NamespaceGet404JSONResponse) VisitNamespaceGetResponse

func (response NamespaceGet404JSONResponse) VisitNamespaceGetResponse(w http.ResponseWriter) error

type NamespaceGetRequestObject

type NamespaceGetRequestObject struct {
	Namespace string `json:"namespace"`
}

type NamespaceGetResponseObject

type NamespaceGetResponseObject interface {
	VisitNamespaceGetResponse(w http.ResponseWriter) error
}

type NamespaceKubeconfig200TextyamlResponse

type NamespaceKubeconfig200TextyamlResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (NamespaceKubeconfig200TextyamlResponse) VisitNamespaceKubeconfigResponse

func (response NamespaceKubeconfig200TextyamlResponse) VisitNamespaceKubeconfigResponse(w http.ResponseWriter) error

type NamespaceKubeconfig401JSONResponse

type NamespaceKubeconfig401JSONResponse ModelsErrorUnauthorized

func (NamespaceKubeconfig401JSONResponse) VisitNamespaceKubeconfigResponse

func (response NamespaceKubeconfig401JSONResponse) VisitNamespaceKubeconfigResponse(w http.ResponseWriter) error

type NamespaceKubeconfig404JSONResponse

type NamespaceKubeconfig404JSONResponse ModelsErrorNotFound

func (NamespaceKubeconfig404JSONResponse) VisitNamespaceKubeconfigResponse

func (response NamespaceKubeconfig404JSONResponse) VisitNamespaceKubeconfigResponse(w http.ResponseWriter) error

type NamespaceKubeconfigParams

type NamespaceKubeconfigParams struct {
	Insecure          *ModelsKubeconfigOptionsInsecure          `form:"insecure,omitempty" json:"insecure,omitempty"`
	PublicK8sEndpoint *ModelsKubeconfigOptionsPublicK8sEndpoint `form:"publicK8sEndpoint,omitempty" json:"publicK8sEndpoint,omitempty"`

	// CertificateAuthorityData Base64-encoded certificate data
	CertificateAuthorityData *ModelsKubeconfigOptionsCertificateAuthorityData `form:"certificateAuthorityData,omitempty" json:"certificateAuthorityData,omitempty"`
}

NamespaceKubeconfigParams defines parameters for NamespaceKubeconfig.

type NamespaceKubeconfigRequestObject

type NamespaceKubeconfigRequestObject struct {
	Namespace string `json:"namespace"`
	Params    NamespaceKubeconfigParams
}

type NamespaceKubeconfigResponseObject

type NamespaceKubeconfigResponseObject interface {
	VisitNamespaceKubeconfigResponse(w http.ResponseWriter) error
}

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 /kubernetes)
	KubernetesList(w http.ResponseWriter, r *http.Request)

	// (DELETE /kubernetes/{namespace})
	NamespaceDelete(w http.ResponseWriter, r *http.Request, namespace string)

	// (GET /kubernetes/{namespace})
	NamespaceGet(w http.ResponseWriter, r *http.Request, namespace string)

	// (POST /kubernetes/{namespace})
	NamespaceCreate(w http.ResponseWriter, r *http.Request, namespace string)

	// (GET /kubernetes/{namespace}/kubeconfig)
	NamespaceKubeconfig(w http.ResponseWriter, r *http.Request, namespace string, params NamespaceKubeconfigParams)
}

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

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

KubernetesList operation middleware

func (*ServerInterfaceWrapper) NamespaceCreate

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

NamespaceCreate operation middleware

func (*ServerInterfaceWrapper) NamespaceDelete

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

NamespaceDelete operation middleware

func (*ServerInterfaceWrapper) NamespaceGet

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

NamespaceGet operation middleware

func (*ServerInterfaceWrapper) NamespaceKubeconfig

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

NamespaceKubeconfig 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 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 {

	// (GET /kubernetes)
	KubernetesList(ctx context.Context, request KubernetesListRequestObject) (KubernetesListResponseObject, error)

	// (DELETE /kubernetes/{namespace})
	NamespaceDelete(ctx context.Context, request NamespaceDeleteRequestObject) (NamespaceDeleteResponseObject, error)

	// (GET /kubernetes/{namespace})
	NamespaceGet(ctx context.Context, request NamespaceGetRequestObject) (NamespaceGetResponseObject, error)

	// (POST /kubernetes/{namespace})
	NamespaceCreate(ctx context.Context, request NamespaceCreateRequestObject) (NamespaceCreateResponseObject, error)

	// (GET /kubernetes/{namespace}/kubeconfig)
	NamespaceKubeconfig(ctx context.Context, request NamespaceKubeconfigRequestObject) (NamespaceKubeconfigResponseObject, 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