Back to

Package controller

Latest Go to latest

The highest tagged major version is .

Published: Nov 17, 2019 | License: MIT | Module:


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": ""}' 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 ...

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier