Documentation
¶
Overview ¶
spell-checker: disable
spell-checker: disable
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fuse ¶
func Fuse(restfulPort, grpcPort int, autoRecover bool, withErr bool, routes func(router FuseRouter))
func SetFuseStatusMessage ¶
func SetFuseStatusMessage(call func(status *FuseDefaultStatus, message *FuseDefaultMessage))
Types ¶
type ClientFuseGRPC ¶
type ClientFuseGRPC interface {
Restful(path string, header map[string]string, payload map[string]interface{}, params map[string]string) (*grf.Response, error)
}
func ConnectFuseGRPC ¶
func ConnectFuseGRPC(address string) (ClientFuseGRPC, error)
type FuseContext ¶
type FuseContext interface { Params(key string, defaultValue ...string) string Query(key string, defaultValue ...string) string Parser(cli *clog.Instance, header, body interface{}) (bool, error) AuthX() interface{} AuthY() interface{} AuthZ() interface{} SetAuth(authX, authY, authZ interface{}) R200OK(cli *clog.Instance, data interface{}, opt ...FuseOpt) error R400BadRequest(cli *clog.Instance, message string, opt ...FuseOpt) error R403Forbidden(cli *clog.Instance, message string, opt ...FuseOpt) error R404NotFound(cli *clog.Instance, message string, opt ...FuseOpt) error R406NotAcceptable(cli *clog.Instance, message string, opt ...FuseOpt) error R428PreconditionRequired(cli *clog.Instance, message string, opt ...FuseOpt) error R500InternalServerError(cli *clog.Instance, err error, opt ...FuseOpt) error }
type FuseDefaultMessage ¶
type FuseDefaultStatus ¶
type FuseRouter ¶
type FuseRouter interface { Single(path string, handlers ...func(sc FuseContext) error) Group(endpoints map[string][]func(sc FuseContext) error) }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.