Documentation ¶
Index ¶
- func RegisterUsing(router *mux.Router)
- type ControllerFactory
- type DriverController
- type HTTPMethod
- type RouterController
- func (r RouterController) AddRouter(w http.ResponseWriter, request *http.Request)
- func (r RouterController) DeleteRouter(w http.ResponseWriter, request *http.Request)
- func (r RouterController) ExecuteCommand(w http.ResponseWriter, request *http.Request)
- func (r RouterController) GetAll(w http.ResponseWriter, request *http.Request)
- func (r RouterController) GetAvailableCommands(w http.ResponseWriter, request *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterUsing ¶
RegisterUsing a router controllers endpoints via ControllerFactory (variable defaultFactories, defined in injectors.go)
Types ¶
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)
Click to show internal directories.
Click to hide internal directories.