Help us shape the future of Go! Take the 2026 Go Developer Survey

apiserver

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APIGroup is a common group for api
	APIGroup = "cicdapi.tmax.io"

	// NamespaceParamKey is a common key for namespace var
	NamespaceParamKey = "namespace"
)

Variables

This section is empty.

Functions

func GetUserExtras

func GetUserExtras(header http.Header) map[string]authorization.ExtraValue

GetUserExtras extracts user extras from the header

func GetUserGroup

func GetUserGroup(header http.Header) ([]string, error)

GetUserGroup extracts user group from the header

func GetUserName

func GetUserName(header http.Header) (string, error)

GetUserName extracts user name from the header

Types

type APIHandler

type APIHandler interface{}

APIHandler is an api handler interface. Common functions should be defined, if needed

type Authorizer

type Authorizer interface {
	Authorize(h http.Handler) http.Handler
}

Authorizer authorizes an api request

func NewAuthorizer

func NewAuthorizer(cli *authorization.AuthorizationV1Client, apiGroup, apiVersion, verb string) Authorizer

NewAuthorizer instantiates a new authorizer

Jump to

Keyboard shortcuts

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