controller

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct{}

Controller ...

func NewController

func NewController() *Controller

NewController ...

func (*Controller) HandleMessage

func (ctrl *Controller) HandleMessage(c echo.Context) error

HandleMessage ... curl localhost:8080/messageeee

type Controller2

type Controller2 struct {
	// contains filtered or unexported fields
}

Controller2 ...

func NewController2

func NewController2(p *service2.Provider) *Controller2

NewController2 ...

func (*Controller2) HandlePersonGet

func (ctrl *Controller2) HandlePersonGet(c echo.Context) error

HandlePersonGet ... curl localhost:8080/people/999

func (*Controller2) HandlePersonRegister

func (ctrl *Controller2) HandlePersonRegister(c echo.Context) error

HandlePersonRegister ... curl -X POST -H 'Content-type: application/json' -d '{"name": "Alice", "email": "alice@example.com"}' localhost:8080/people

type Controller3

type Controller3 struct {
	// contains filtered or unexported fields
}

Controller3 ...

func NewController3

func NewController3(p *service3.Provider) *Controller3

NewController3 ...

func (*Controller3) HandleAccountOpen

func (ctrl *Controller3) HandleAccountOpen(c echo.Context) error

HandleAccountOpen ... curl -X POST -H 'Content-type: application/json' -d '{"ammount": 1000}' localhost:8080/accounts

func (*Controller3) HandleMoneyTransfer

func (ctrl *Controller3) HandleMoneyTransfer(c echo.Context) error

HandleMoneyTransfer ... curl -X POST -H 'Content-type: application/json' -d '{"fromId": , "toId": , "ammount": 1000}' localhost:8080/accounts/transfer

type Controllers

type Controllers struct {
	Ctrl  *Controller
	Ctrl2 *Controller2
	Ctrl3 *Controller3
}

Controllers ...

func NewControllers

func NewControllers(ctrl *Controller, ctrl2 *Controller2, ctrl3 *Controller3) *Controllers

NewControllers ...

Jump to

Keyboard shortcuts

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