service

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2017 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

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

type Factory

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

type Manager

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

type Service

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

type ServiceFactory

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

Directories

Path Synopsis
req
reqfakes
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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