library

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AuthFilters []*HandlerConfig `mapstructure:"authFilters" yaml:"authFilters"`
	Decorators  []*HandlerConfig `mapstructure:"decorators" yaml:"decorators"`
	Endorsers   PluginMapping    `mapstructure:"endorsers" yaml:"endorsers"`
	Validators  PluginMapping    `mapstructure:"validators" yaml:"validators"`
}

func LoadConfig

func LoadConfig() (Config, error)

type HandlerConfig

type HandlerConfig struct {
	Name    string `mapstructure:"name" yaml:"name"`
	Library string `mapstructure:"library" yaml:"library"`
}

type HandlerLibrary

type HandlerLibrary struct {
}

func (*HandlerLibrary) DefaultAuth

func (r *HandlerLibrary) DefaultAuth() auth.Filter

func (*HandlerLibrary) DefaultDecorator

func (r *HandlerLibrary) DefaultDecorator() decoration.Decorator

func (*HandlerLibrary) DefaultEndorsement

func (r *HandlerLibrary) DefaultEndorsement() endorsement.PluginFactory

func (*HandlerLibrary) DefaultValidation

func (r *HandlerLibrary) DefaultValidation() validation.PluginFactory

func (*HandlerLibrary) ExpirationCheck

func (r *HandlerLibrary) ExpirationCheck() auth.Filter

type HandlerType

type HandlerType int
const (
	Auth HandlerType = iota

	Decoration
	Endorsement
	Validation
)

type PluginMapping

type PluginMapping map[string]*HandlerConfig

type Registry

type Registry interface {
	Lookup(HandlerType) interface{}
}

func InitRegistry

func InitRegistry(c Config) Registry

Jump to

Keyboard shortcuts

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