handler

package
v2.17.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeJSON

func EncodeJSON(c context.Context, w http.ResponseWriter, response interface{}) (err error)

EncodeJSON writes the JSON encoding of response to the http response writer

func ErrorEncoder

func ErrorEncoder(ctx context.Context, err error, w http.ResponseWriter)

func SetStatusCreatedHeader

func SetStatusCreatedHeader(f func(context.Context, http.ResponseWriter, interface{}) error) func(context.Context, http.ResponseWriter, interface{}) error

Types

type EmptyResponse

type EmptyResponse struct{}

EmptyResponse is a empty response swagger:response empty

type ErrorDetails

type ErrorDetails struct {
	// The error code
	//
	// Required: true
	Code int `json:"code"`
	// The error message
	//
	// Required: true
	Message string `json:"message"`
	// Additional error messages
	//
	// Required: false
	Additional []string `json:"details,omitempty"`
}

ErrorDetails contains details about the error

type ErrorResponse

type ErrorResponse struct {
	// The error details
	// in: body
	Error ErrorDetails `json:"error"`
}

ErrorResponse is the default representation of an error swagger:model errorResponse

type Routing

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

Routing represents an object which binds endpoints to http handlers.

func NewRouting

func NewRouting(routingParams RoutingParams) Routing

NewRouting creates a new Routing.

func (Routing) RegisterV1

func (r Routing) RegisterV1(mux *mux.Router, metrics common.ServerMetrics)

RegisterV1 declares all router paths for v1

func (Routing) RegisterV1Admin

func (r Routing) RegisterV1Admin(mux *mux.Router)

RegisterV1Admin declares all router paths for the admin users

func (Routing) RegisterV1Legacy

func (r Routing) RegisterV1Legacy(mux *mux.Router)

RegisterV1Legacy declares legacy HTTP paths that can be deleted in the future At the time of this writing, there is no clear deprecation policy

func (Routing) RegisterV1Optional

func (r Routing) RegisterV1Optional(mux *mux.Router, oidcKubeConfEndpoint bool, oidcCfg common.OIDCConfiguration, mainMux *mux.Router)

RegisterV1Optional declares all router paths for v1

func (Routing) RegisterV1Websocket

func (r Routing) RegisterV1Websocket(mux *mux.Router)

type RoutingParams

type RoutingParams struct {
	Log                                   *zap.SugaredLogger
	PresetsProvider                       provider.PresetProvider
	SeedsGetter                           provider.SeedsGetter
	SeedsClientGetter                     provider.SeedClientGetter
	SSHKeyProvider                        provider.SSHKeyProvider
	PrivilegedSSHKeyProvider              provider.PrivilegedSSHKeyProvider
	UserProvider                          provider.UserProvider
	ServiceAccountProvider                provider.ServiceAccountProvider
	PrivilegedServiceAccountProvider      provider.PrivilegedServiceAccountProvider
	ServiceAccountTokenProvider           provider.ServiceAccountTokenProvider
	PrivilegedServiceAccountTokenProvider provider.PrivilegedServiceAccountTokenProvider
	ProjectProvider                       provider.ProjectProvider
	PrivilegedProjectProvider             provider.PrivilegedProjectProvider
	OIDCIssuerVerifier                    auth.OIDCIssuerVerifier
	TokenVerifiers                        auth.TokenVerifier
	TokenExtractors                       auth.TokenExtractor
	ClusterProviderGetter                 provider.ClusterProviderGetter
	AddonProviderGetter                   provider.AddonProviderGetter
	AddonConfigProvider                   provider.AddonConfigProvider
	UpdateManager                         common.UpdateManager
	PrometheusClient                      prometheusapi.Client
	ProjectMemberProvider                 provider.ProjectMemberProvider
	PrivilegedProjectMemberProvider       provider.PrivilegedProjectMemberProvider
	UserProjectMapper                     provider.ProjectMemberMapper
	SATokenAuthenticator                  serviceaccount.TokenAuthenticator
	SATokenGenerator                      serviceaccount.TokenGenerator
	EventRecorderProvider                 provider.EventRecorderProvider
	ExposeStrategy                        kubermaticv1.ExposeStrategy
	AccessibleAddons                      sets.String
	UserInfoGetter                        provider.UserInfoGetter
	SettingsProvider                      provider.SettingsProvider
	AdminProvider                         provider.AdminProvider
	AdmissionPluginProvider               provider.AdmissionPluginsProvider
	SettingsWatcher                       watcher.SettingsWatcher
	UserWatcher                           watcher.UserWatcher
	ExternalClusterProvider               provider.ExternalClusterProvider
	PrivilegedExternalClusterProvider     provider.PrivilegedExternalClusterProvider
	ConstraintTemplateProvider            provider.ConstraintTemplateProvider
	ConstraintProviderGetter              provider.ConstraintProviderGetter
	Versions                              kubermatic.Versions
	CABundle                              *x509.CertPool
}

type WebsocketSettingsWriter

type WebsocketSettingsWriter func(providers watcher.Providers, ws *websocket.Conn)

type WebsocketUserWriter

type WebsocketUserWriter func(providers watcher.Providers, ws *websocket.Conn, userEmail string)

Jump to

Keyboard shortcuts

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