service

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultFactory

func NewDefaultFactory() defaultFactory

func NewDefaultManager

func NewDefaultManager() defaultManager

Types

type AuthService

type AuthService interface {
	Service

	SupportsRequestAuth(http.Request) (bool, error)
	ParseRequestAuth(http.Request) (*auth.Token, error)
}

func GetAuthServices added in v0.17.0

func GetAuthServices(m Manager) []AuthService

type AuthServices added in v0.17.0

type AuthServices []AuthService

type Factory

type Factory interface {
	Create(service.Type, string, map[string]interface{}) (Service, error)
}

type Manager

type Manager interface {
	Add(Service)
	Get(string) (Service, error)
	Services() []string
}

type Service

type Service interface {
	Name() string
	Type() service.Type
	Version() string
	Metadata() interface{}
	GetRoutes() []req.RouteHandler
	VerifyAuthorization(http.Request, *auth.Token) error
}

type ServiceFactory

type ServiceFactory interface {
	Create(string, map[string]interface{}) (Service, error)
	Type() service.Type
}

Directories

Path Synopsis
dynamicvaluefakes
Code generated by counterfeiter.
Code generated by counterfeiter.
req
reqfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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