common

package
v0.0.0-...-3c1713d Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckContext

func CheckContext(ctx context.Context) error

CheckContext checks if a go context is still active or done When it's done, returns a generic error

func myFunc(ctx context.Context) error {
  if err := common.CheckContext(ctx); err != nil {
  	 return err
  } else {
    doSomething()
  }
}

func UnmashalJSONResponse

func UnmashalJSONResponse(resp *http.Response, v interface{}, b *[]byte) error

UnmashalJSONResponse unmarshalls a generic HTTP response body into a JSON structure Pass optionally a pointer to a byte array to get the raw body of the response object written back

Types

type APIKeySecretFinder

type APIKeySecretFinder interface {
	FindSecretByName(types.NamespacedName) *v1.Secret
}

type AuthConfigEvaluator

type AuthConfigEvaluator interface {
	Call(AuthPipeline, context.Context) (interface{}, error)
}

AuthConfigEvaluator interface represents the configuration pieces of Identity, Metadata and Authorization

type AuthPipeline

type AuthPipeline interface {
	GetParentContext() *context.Context
	GetRequest() *envoy_auth.CheckRequest
	GetHttp() *envoy_auth.AttributeContext_HttpRequest
	GetAPI() interface{}
	GetResolvedIdentity() (interface{}, interface{})
	GetResolvedMetadata() map[interface{}]interface{}
	GetDataForAuthorization() interface{}
}

type IdentityConfigEvaluator

type IdentityConfigEvaluator interface {
	GetAuthCredentials() auth_credentials.AuthCredentials
	GetOIDC() interface{}
}

type NamedConfigEvaluator

type NamedConfigEvaluator interface {
	GetName() string
}

Directories

Path Synopsis
mocks
Package mock_auth_credentials is a generated GoMock package.
Package mock_auth_credentials is a generated GoMock package.
Package mock_common is a generated GoMock package.
Package mock_common is a generated GoMock package.

Jump to

Keyboard shortcuts

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