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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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