msproxy

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context interface {
	SetResult(data interface{})
}

type IProxyResp

type IProxyResp interface {
	GetErrMsg() string
	GetData() interface{}
	GetSuccess() bool
}

type ProxyResp

type ProxyResp struct {
	Success bool        `json:"success"`
	Data    interface{} `json:"data"`
	ErrMsg  string      `json:"err_msg"`
}

func (*ProxyResp) GetData

func (p *ProxyResp) GetData() interface{}

func (*ProxyResp) GetErrMsg

func (p *ProxyResp) GetErrMsg() string

func (*ProxyResp) GetSuccess

func (p *ProxyResp) GetSuccess() bool

type Requester

type Requester interface {
	Post(api string, req interface{}, respData interface{}) error
}

type RestyRequester

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

func NewRestyRequester

func NewRestyRequester(url string) *RestyRequester

func (*RestyRequester) Post

func (r *RestyRequester) Post(api string, req interface{}, respData interface{}) error

type Srv

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

func NewSrv

func NewSrv(requester Requester) *Srv

func (*Srv) PostProxy

func (s *Srv) PostProxy(api string, ctx Context, resp IProxyResp) error

Jump to

Keyboard shortcuts

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