auth

package
Version: v2.5.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Client = "client"
	Server = "server"
	Hybrid = "hybrid"
)

Variables

This section is empty.

Functions

func CanI

func CanI(ctx context.Context, verb, resource, namespace, name string) (bool, error)

func GetKubeClient

func GetKubeClient(ctx context.Context) kubernetes.Interface

func GetWfClient

func GetWfClient(ctx context.Context) versioned.Interface

Types

type Authorizer

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

func NewAuthorizer

func NewAuthorizer(ctx context.Context) *Authorizer

func (Authorizer) CanI

func (a Authorizer) CanI(verb, resource, namespace, name string) (bool, error)

type ContextKey

type ContextKey string
const (
	WfKey   ContextKey = "versioned.Interface"
	KubeKey ContextKey = "kubernetes.Interface"
)

type Gatekeeper

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

func NewGatekeeper

func NewGatekeeper(authType string, wfClient versioned.Interface, kubeClient kubernetes.Interface, restConfig *rest.Config) Gatekeeper

func (*Gatekeeper) Context

func (s *Gatekeeper) Context(ctx context.Context) (context.Context, error)

func (*Gatekeeper) StreamServerInterceptor

func (s *Gatekeeper) StreamServerInterceptor() grpc.StreamServerInterceptor

func (*Gatekeeper) UnaryServerInterceptor

func (s *Gatekeeper) UnaryServerInterceptor() grpc.UnaryServerInterceptor

Jump to

Keyboard shortcuts

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