Documentation ¶
Index ¶
- func Aes128ECBDecode(data, key []byte) []byte
- func Base64Decode(data string) ([]byte, error)
- func Base64Encode(data []byte) string
- func Date(format string, timestamp int64) string
- func ErrorNew(msg string) error
- func ErrorWrap(err error, msg string) error
- func FileGetContents(fileName string) (string, error)
- func FilePutContents(fileName string, content string) (int, error)
- func GetISO8601TimeStamp() string
- func GetNowDatetime() string
- func ParsePrivateFromFile(file string) (private *rsa.PrivateKey, err error)
- func RawUrlencode(str string) string
- func RsaPrivateDecode(cipherText []byte, file string) ([]byte, error)
- func RsaPrivateSha256Encode(data string, PrivateKey *rsa.PrivateKey) (signer []byte, err error)
- func Rtrim(str string, characterMask ...string) string
- func Sha256Encode(string string) string
- func StrInArray(search string, strArr []string) bool
- func Strrchr(haystack string, needle string) string
- func Strrpos(haystack, needle string, offset int) int
- func Strtolower(str string) string
- func Strtr(haystack string, params ...interface{}) string
- func Substr(str string, start uint, length int) string
- func Time() int64
- func Uniqid(prefix string) string
- func Urlencode(str string) string
- func Uuid() string
- func YeepayBase64Decode(data string) ([]byte, error)
- func YeepayBase64Encode(data []byte, usePadding bool) string
- func YeepayCallback(response string, yeepayConfig yeepayGo.YeepayConfig) (string, string, error)
- func YeepayEncrypt(str string, pKeyFile string) string
- func YeepayGetHeader(arr map[string]string) string
- func YeepayGetHeaders(req request.YeepayRequest, yeepayConfig yeepayGo.YeepayConfig, ...) map[string]string
- func YeepayGetSignedHeader() string
- func YeepayGetSortQuery(arr map[string]string) string
- type HttpResponse
- func (resp HttpResponse) GetBytes() []byte
- func (resp HttpResponse) GetCode() int
- func (resp HttpResponse) GetLatency() float64
- func (resp HttpResponse) GetLatencyStr() string
- func (resp HttpResponse) IsOk() bool
- func (resp *HttpResponse) SetBytes(bytes []byte) *HttpResponse
- func (resp *HttpResponse) SetCode(code int) *HttpResponse
- func (resp *HttpResponse) SetStartTime(startTime time.Time) *HttpResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
func Base64Encode ¶
func FileGetContents ¶
func GetISO8601TimeStamp ¶
func GetISO8601TimeStamp() string
func GetNowDatetime ¶
func GetNowDatetime() string
func ParsePrivateFromFile ¶
func ParsePrivateFromFile(file string) (private *rsa.PrivateKey, err error)
根据文件名解析出私钥 ,文件必须是 rsa 私钥格式
func RawUrlencode ¶
func RsaPrivateDecode ¶
RSA 解密
func RsaPrivateSha256Encode ¶
func RsaPrivateSha256Encode(data string, PrivateKey *rsa.PrivateKey) (signer []byte, err error)
ras sha256 私钥加密
func StrInArray ¶
func Strtolower ¶
func YeepayBase64Decode ¶
func YeepayBase64Encode ¶
func YeepayCallback ¶
func YeepayEncrypt ¶
func YeepayGetHeader ¶
func YeepayGetHeaders ¶
func YeepayGetHeaders(req request.YeepayRequest, yeepayConfig yeepayGo.YeepayConfig, yeepayLogger yeepayGo.YeepayLoggerInterface) map[string]string
func YeepayGetSignedHeader ¶
func YeepayGetSignedHeader() string
func YeepayGetSortQuery ¶
Types ¶
type HttpResponse ¶
type HttpResponse struct {
// contains filtered or unexported fields
}
func (HttpResponse) GetBytes ¶
func (resp HttpResponse) GetBytes() []byte
func (HttpResponse) GetCode ¶
func (resp HttpResponse) GetCode() int
func (HttpResponse) GetLatency ¶
func (resp HttpResponse) GetLatency() float64
func (HttpResponse) GetLatencyStr ¶
func (resp HttpResponse) GetLatencyStr() string
func (HttpResponse) IsOk ¶
func (resp HttpResponse) IsOk() bool
func (*HttpResponse) SetBytes ¶
func (resp *HttpResponse) SetBytes(bytes []byte) *HttpResponse
func (*HttpResponse) SetCode ¶
func (resp *HttpResponse) SetCode(code int) *HttpResponse
func (*HttpResponse) SetStartTime ¶
func (resp *HttpResponse) SetStartTime(startTime time.Time) *HttpResponse
Click to show internal directories.
Click to hide internal directories.