Documentation
¶
Index ¶
- Variables
- func DeepSearch(m map[string]interface{}, path []string) map[string]interface{}
- func Ensure(err error)
- func EnsureLeft(left interface{}, err error) interface{}
- func EnsureRight(err error, right interface{}) interface{}
- func JoinObject(arr interface{}, format ...string) (str string)
- func JsonCheck(req *http.Request) bool
- func LastChar(str string) uint8
- func RandString(randLen int, randType RandType) string
- func RandomInt(min, max int) int
- func SetFormatter(isTerminal bool)
- func SomeOne(srv interface{}, def interface{}) interface{}
- func UserHomeDir() string
- type M
- type RandType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidRedirectURI = errors.New("invalid redirect uri") ErrInvalidAuthorizeCode = errors.New("invalid authorize code") ErrInvalidAccessToken = errors.New("invalid access token") ErrInvalidEncryData = errors.New("invalid encry data") ErrInvalidRefreshToken = errors.New("invalid refresh token") ErrExpiredAccessToken = errors.New("expired access token") ErrExpiredRefreshToken = errors.New("expired refresh token") )
known errors
View Source
var ( ErrInvalidRequest = errors.New("invalid_request") ErrAccessDenied = errors.New("access_denied") ErrUnsupportedResponseType = errors.New("unsupported_response_type") ErrInvalidScope = errors.New("invalid_scope") ErrServerError = errors.New("server_error") ErrInvalidClient = errors.New("invalid_client") ErrInvalidGrant = errors.New("invalid_grant") ErrUnsupportedGrantType = errors.New("unsupported_grant_type") )
known errors
View Source
var (
ErrInvalidDomain = errors.New("invalid_domain")
)
known errors
Functions ¶
func DeepSearch ¶
DeepSearch scans deep maps, following the key indexes listed in the
func EnsureLeft ¶
func EnsureLeft(left interface{}, err error) interface{}
EnsureLeft defined return left
func EnsureRight ¶
func EnsureRight(err error, right interface{}) interface{}
EnsureRight defined return right
func JoinObject ¶
JoinObject defined TODO
func RandString ¶
RandString defined random char
Types ¶
Directories
¶
Path | Synopsis |
---|---|
Package http is used as http.Client Usage: b := http.Post("http://.me/") b.Param("username","astaxie") b.Param("password","123456") b.PostFile("uploadfile1", "httplib.pdf") b.PostFile("uploadfile2", "httplib.txt") str, err := b.String() if err != nil { t.Fatal(err) } fmt.Println(str)
|
Package http is used as http.Client Usage: b := http.Post("http://.me/") b.Param("username","astaxie") b.Param("password","123456") b.PostFile("uploadfile1", "httplib.pdf") b.PostFile("uploadfile2", "httplib.txt") str, err := b.String() if err != nil { t.Fatal(err) } fmt.Println(str) |
Click to show internal directories.
Click to hide internal directories.