company

package
v0.0.0-...-d3d53d6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2016 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompaniesInterfaceRoutes

func CompaniesInterfaceRoutes(r *mux.Router, i CompaniesInterface)

CompaniesInterfaceRoutes is routing for /companies root endpoint

Types

type CompaniesAPI

type CompaniesAPI struct {
}

func (CompaniesAPI) GetCompanyList

func (api CompaniesAPI) GetCompanyList(w http.ResponseWriter, r *http.Request)

GetCompanyList is the handler for GET /companies Get companies. Authorization limits are applied to requesting user.

func (CompaniesAPI) Post

func (api CompaniesAPI) Post(w http.ResponseWriter, r *http.Request)

Post is handler for POST /companies Register a new company

func (CompaniesAPI) RegisterNewContract

func (api CompaniesAPI) RegisterNewContract(w http.ResponseWriter, r *http.Request)

RegisterNewContract is handler for GET /companies/{globalId}/contracts

type CompaniesInterface

type CompaniesInterface interface {
	// Get companies. Authorization limits are applied to requesting user.
	GetCompanyList(http.ResponseWriter, *http.Request)
	// Post is the handler for POST /companies
	// Register a new company
	Post(http.ResponseWriter, *http.Request)

	RegisterNewContract(http.ResponseWriter, *http.Request)
	// contains filtered or unexported methods
}

CompaniesInterface is interface for /companies root endpoint

type Oauth2oauth_2_0Middleware

type Oauth2oauth_2_0Middleware struct {
	security.OAuth2Middleware
}

Oauth2oauth_2_0Middleware is oauth2 middleware for oauth_2_0

func (*Oauth2oauth_2_0Middleware) CheckScopes

func (om *Oauth2oauth_2_0Middleware) CheckScopes(scopes []string) bool

CheckScopes checks whether user has needed scopes

func (*Oauth2oauth_2_0Middleware) Handler

Handler return HTTP handler representation of this middleware

Jump to

Keyboard shortcuts

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