api

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountController added in v1.3.7

type AccountController struct {
	types.Controller `group:"/api/v1/users"` //statement as `controller`, use `group` tag as mapping prefix
	service.Factory  `wire:"service_factory"`
	// contains filtered or unexported fields
}

func (*AccountController) GetAllUsers added in v1.3.7

func (r *AccountController) GetAllUsers(ctx context.Context) ([]*dto.AccountDTO, error)

GetAllUsers associate with AccountController.getAllUsers

func (*AccountController) GetUserById added in v1.3.7

func (r *AccountController) GetUserById(ctx context.Context, username string) (*dto.AccountDTO, error)

GetUserById associate with AccountController.getUserById

func (*AccountController) SaveUser added in v1.3.7

func (r *AccountController) SaveUser(ctx context.Context, username string, employee *dto.AccountDTO) (resp.Response, error)

SaveUser associate with AccountController.saveUser

type DemoCacheController

type DemoCacheController struct {
	types.Controller `group:"/api/v1/cache"`
	service.Factory  `wire:"service_factory"`
	// contains filtered or unexported fields
}

func (*DemoCacheController) GetCache

func (r *DemoCacheController) GetCache(key string) interface{}

func (*DemoCacheController) SaveCache

func (r *DemoCacheController) SaveCache(key, value string) interface{}

type FeignController added in v1.4.2

type FeignController struct {
	types.Controller `group:"/feign"`
	feign.Factory    `wire:"feign_factory"`
	// contains filtered or unexported fields
}

func (*FeignController) GetUserById added in v1.4.2

func (h *FeignController) GetUserById(ctx context.Context, username string) (*dto.AccountDTO, error)

func (*FeignController) SaveUser added in v1.4.2

func (h *FeignController) SaveUser(ctx context.Context, username string, employee *dto.AccountDTO) (resp.Response, error)

func (*FeignController) TestGetAllUsers added in v1.4.2

func (h *FeignController) TestGetAllUsers() ([]*dto.AccountDTO, error)

type IndexController

type IndexController struct {
	types.Controller `name:"IndexController" group:""`
	service.Factory  `wire:"service_factory"`
	// contains filtered or unexported fields
}

func (*IndexController) Index

func (r *IndexController) Index() resp.Response

type StaticController added in v1.4.3

type StaticController struct {
	types.FsController `group:"/static" compile:"false"`
	// contains filtered or unexported fields
}

func (*StaticController) Test added in v1.4.3

func (c *StaticController) Test() string

type WsHandler added in v1.4.0

type WsHandler struct {
	types.Websocket `endpoint:"/ws/channel/v1"`
	Log             log.Logger `wire:""`
}

func (*WsHandler) OnClose added in v1.4.0

func (w *WsHandler) OnClose(session *Session)

func (*WsHandler) OnError added in v1.4.0

func (w *WsHandler) OnError(session *Session, err error)

func (*WsHandler) OnMessage added in v1.4.0

func (w *WsHandler) OnMessage(session *Session, message []byte) error

func (*WsHandler) OnOpen added in v1.4.0

func (w *WsHandler) OnOpen(session *Session)

Jump to

Keyboard shortcuts

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