utils

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFileName

func CheckFileName(fileName string) error

CheckFileName ***

func CheckFileType

func CheckFileType(allSupportedType []string, fileName string) error

CheckFileType ***

func DecodeURI

func DecodeURI(encoded string) (string, error)

DecodeURI ***

func EncodeURI

func EncodeURI(rawString string) string

EncodeURI ***

func RespToBean

func RespToBean(resp *req.Resp, returnObj interface{}) error

RespToBean : the obj must be pointer, and will be populated by resp

func RespToResult

func RespToResult(resp *req.Resp) (*bean.RespResult, error)

RespToResult ***

Types

type EscapeError

type EscapeError string

EscapeError ***

func (EscapeError) Error

func (e EscapeError) Error() string

type Headers

type Headers struct {
	Header req.Header // = make(Header)
}

Headers ***

func NewHeaders

func NewHeaders() *Headers

NewHeaders ***

func (*Headers) AddBasicAuthHeader

func (o *Headers) AddBasicAuthHeader(appKey string, appSecret string)

AddBasicAuthHeader ***

func (*Headers) AddOAuth2Header

func (o *Headers) AddOAuth2Header(token string)

AddOAuth2Header ***

type ServiceClient

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

ServiceClient ***

func NewServiceClient

func NewServiceClient() *ServiceClient

NewServiceClient ***

func (*ServiceClient) Delete

func (o *ServiceClient) Delete(url string, v ...interface{}) *req.Resp

Delete ***

func (*ServiceClient) Get

func (o *ServiceClient) Get(url string, v ...interface{}) *req.Resp

Get ***

func (*ServiceClient) Head

func (o *ServiceClient) Head(url string, v ...interface{}) *req.Resp

Head ***

func (*ServiceClient) Post

func (o *ServiceClient) Post(url string, v ...interface{}) *req.Resp

Post ***

func (*ServiceClient) Put

func (o *ServiceClient) Put(url string, v ...interface{}) *req.Resp

Put ***

Jump to

Keyboard shortcuts

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