Version: v1.0.2 Latest Latest

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

Go to latest
Published: Jan 4, 2019 License: GPL-2.0 Imports: 10 Imported by: 0




This section is empty.


This section is empty.


func RegisterUsing

func RegisterUsing(router *mux.Router)

RegisterUsing a router controllers endpoints via ControllerFactory (variable defaultFactories, defined in injectors.go)


type ControllerFactory

type ControllerFactory func() (string, controller)

ControllerFactory is a function that creates a rootEndpoint for a controller, and the controller that maps to that rootEndpoint

func DriverControllerInjector

func DriverControllerInjector(driverStore domain.DriverStore, validator domain.Validator) ControllerFactory

func RouterControllerInjector

func RouterControllerInjector(repoFactory persistence.RepositoryFactory, driverStore domain.DriverStore, cipher domain.Cipher, createToken domain.Tokenizer, validator domain.Validator) ControllerFactory

type DriverController

type DriverController struct {
	// contains filtered or unexported fields

func (DriverController) GetAuthModes

func (r DriverController) GetAuthModes(w http.ResponseWriter, request *http.Request)

func (DriverController) GetAvailableDrivers

func (r DriverController) GetAvailableDrivers(w http.ResponseWriter, request *http.Request)

type HTTPMethod

type HTTPMethod string
const (
	Get    HTTPMethod = "Get"
	Post   HTTPMethod = "Post"
	Delete HTTPMethod = "Delete"

Strong typed version for HTTP verbs

type RouterController

type RouterController struct {
	// contains filtered or unexported fields

func (RouterController) AddRouter

func (r RouterController) AddRouter(w http.ResponseWriter, request *http.Request)

func (RouterController) DeleteRouter

func (r RouterController) DeleteRouter(w http.ResponseWriter, request *http.Request)

func (RouterController) ExecuteCommand

func (r RouterController) ExecuteCommand(w http.ResponseWriter, request *http.Request)

func (RouterController) GetAll

func (r RouterController) GetAll(w http.ResponseWriter, request *http.Request)

func (RouterController) GetAvailableCommands

func (r RouterController) GetAvailableCommands(w http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

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