Documentation
¶
Index ¶
- func AuthFastGet(url string, resData interface{}, th string) error
- func AuthFastPost(body interface{}, url string, resData interface{}, th string) error
- func BodyParser(r *http.Request, body interface{}) error
- func Delete(url string, header map[string]string) ([]byte, error)
- func DownloadFileFromUrl(url string, saveIn string, name string) error
- func FastGet(url string, resData interface{}) error
- func FastPost(body interface{}, url string, resData interface{}) error
- func FastUpload(url string, body map[string]string, resData interface{}, files ...FileToUpload) error
- func Get(url string, header map[string]string) ([]byte, error)
- func Post(url string, body interface{}, header map[string]string) ([]byte, error)
- func Put(url string, body interface{}, header map[string]string) ([]byte, error)
- func SendJson(w http.ResponseWriter, data interface{}) error
- func SendString(w http.ResponseWriter, data string) error
- func SetStatus(w http.ResponseWriter, status int)
- type Caller
- func (caller *Caller) AddQuery(k string, v string) *Caller
- func (caller *Caller) Decode(res any) error
- func (caller *Caller) Delete() *Caller
- func (caller *Caller) Get() *Caller
- func (caller *Caller) GetData() string
- func (caller *Caller) GetHeader() map[string]string
- func (caller *Caller) GetUrl() string
- func (caller *Caller) Post() *Caller
- func (caller *Caller) Put() *Caller
- func (caller *Caller) SetAuth(auth string) *Caller
- func (caller *Caller) SetBody(body interface{}) *Caller
- func (caller *Caller) SetHeader(header map[string]string) *Caller
- func (caller *Caller) SetParam(param []string) *Caller
- func (caller *Caller) SetQuery(query map[string]string) *Caller
- func (caller *Caller) SetUrl(url string) *Caller
- type FileToUpload
- type HaConnection
- type MsgRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthFastGet ¶
func AuthFastPost ¶
post with body, url and auth, get decoded res
func BodyParser ¶ added in v0.0.14
http post req body parser
func DownloadFileFromUrl ¶ added in v0.1.23
func FastUpload ¶
func FastUpload(url string, body map[string]string, resData interface{}, files ...FileToUpload) error
func SendJson ¶ added in v0.0.15
func SendJson(w http.ResponseWriter, data interface{}) error
http send json
func SendString ¶ added in v0.0.15
func SendString(w http.ResponseWriter, data string) error
http send string
Types ¶
type Caller ¶ added in v0.1.20
type Caller struct { Url string Body interface{} Data []byte Err error Param []string Auth string Header map[string]string Query map[string]string }
type FileToUpload ¶ added in v0.0.8
type HaConnection ¶ added in v0.1.18
func (HaConnection) GetConnection ¶ added in v0.1.18
func (conn HaConnection) GetConnection() string
func (HaConnection) GetPort ¶ added in v0.1.18
func (conn HaConnection) GetPort() string
Click to show internal directories.
Click to hide internal directories.