Documentation ¶
Index ¶
- Constants
- Variables
- func ConfirmPassword() (string, error)
- func ConvertStringToMap(key string) map[string]string
- func Decrypt(key, ciphertext []byte) []byte
- func DeleteJson(url string, req, rsp interface{}) error
- func Encrypt(key, text []byte) (d []byte)
- func GetJson(url string, header map[string]string, rsp interface{}) error
- func GetPassword() (string, error)
- func Hold()
- func NewJar(key, domain, u string) *cookiejar.Jar
- func NewRequest(method, url string, body io.Reader) (*http.Request, context.CancelFunc, error)
- func NewTLSConfig(ca, cert, key string) *tls.Config
- func ParseBody(client *http.Client, u string, v interface{}) error
- func ParseBodyHeader(client *http.Client, u string, header map[string]string) error
- func ParseBodyPost(client *http.Client, u string, reader io.Reader, v interface{}) error
- func ParseRawBody(client *http.Client, u string) ([]byte, error)
- func PopulateStruct(key string, s interface{}) error
- func PostForm(url string, f url.Values) (*http.Client, *http.Response, error)
- func PostJson(url string, req, rsp interface{}) error
- func PutJson(url string, req, rsp interface{}) error
- func ReadPassword(prompt string) (string, error)
- func ResolveCookies(raw, domain string) []*http.Cookie
- func Salt() string
- func VerifyDate(raw string) error
- func WithSalt(pass, salt string) string
Constants ¶
View Source
const ( EnterPassword = "Enter Password" RepeatPassword = "Repeat Password" )
Variables ¶
View Source
var (
ErrPasswordInconsistent = errors.New("passwords are inconsistent")
)
View Source
var (
ErrSignInFailed = errors.New("sign in failed")
)
Functions ¶
func ConfirmPassword ¶ added in v0.7.0
func ConvertStringToMap ¶ added in v0.7.0
ConvertStringToMap 将 'key1=value1;key2=value2' 转换成 map
func DeleteJson ¶ added in v0.5.0
func GetPassword ¶ added in v0.5.1
func NewRequest ¶ added in v0.7.0
func NewTLSConfig ¶ added in v0.7.0
func ParseBodyHeader ¶ added in v0.7.0
ParseBodyHeader 用于访问一个 url, 并且可以指定 http.Request header
func ParseBodyPost ¶ added in v0.7.0
ParseBodyPost 可以指定 http.Request body
func ParseRawBody ¶ added in v0.7.0
ParseRawBody 读取 body 为 []byte
func PopulateStruct ¶ added in v0.7.0
PopulateStruct 从 key 中解码数据到 s
func PostForm ¶ added in v0.7.0
PostForm 使用带 context 方式发送请求, 并返回 client 和 response. 返回 client 的意图是其中保存了 cookie, 以便后续发送请求可重用该 cookie.
func ReadPassword ¶ added in v0.5.1
func ResolveCookies ¶ added in v0.7.0
ResolveCookies 从字符构造 http.Cookie
func VerifyDate ¶ added in v0.7.0
VerifyDate 验证指定时间字符串与当前时间的日期是否相同
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.