Documentation ¶
Index ¶
- Variables
- func Get(url string, data map[string]string, header map[string]string) ([]byte, error)
- func Post(url string, data map[string]string, header map[string]string) ([]byte, error)
- func Request(url, method string, param map[string]string, header map[string]string) ([]byte, error)
- type Method
- type Option
- type Service
- type WS
- type WSCallback
- type WSClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MethodGet = "get" MethodPost = "post" MethodPut = "put" MethodDelete = "delete" MethodOptions = "options" )
View Source
var ( MsgTypeText = websocket.TextMessage MsgTypeBin = websocket.BinaryMessage )
Functions ¶
Types ¶
type Option ¶
type Option func(opt *Service)
func WithAddress ¶
func WithCertificate ¶
func WithMaxBodySize ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Register ¶
func (h *Service) Register(path, method string, f fasthttp.RequestHandler)
func (*Service) RegisterRootPath ¶
func (*Service) RegisterWS ¶
func (h *Service) RegisterWS(path string, msgType int, cb WSCallback)
type WSCallback ¶
Click to show internal directories.
Click to hide internal directories.