Documentation ¶
Index ¶
- Constants
- func CreateRandomString() string
- func CreateSignature(stringToSignature, accessKeySecret string) string
- func CreateSignatureForRequest(method string, values *url.Values, accessKeySecret string) string
- func CreateSignatureForStreamUrlWithA(uri, rand, uid, privateKey string, timeout time.Duration) (authKey string, timestamp int64)
- func GetISO8601TimeStamp(ts time.Time) string
- type ISO6801Time
Constants ¶
const FormatISO8601 = "2006-01-02T15:04:05Z"
Variables ¶
This section is empty.
Functions ¶
func CreateRandomString ¶
func CreateRandomString() string
func CreateSignature ¶
CreateSignature creates signature for string following Aliyun rules
func CreateSignatureForRequest ¶
CreateSignatureForRequest creates signature for query string values
func CreateSignatureForStreamUrlWithA ¶
func CreateSignatureForStreamUrlWithA(uri, rand, uid, privateKey string, timeout time.Duration) (authKey string, timestamp int64)
CreateSignatureForStreamUrlWithA creates signature for Url string whit method A
func GetISO8601TimeStamp ¶
GetISO8601TimeStamp gets timestamp string in ISO8601 format
Types ¶
type ISO6801Time ¶
A ISO6801Time represents a time in ISO8601 format
func NewISO6801Time ¶
func NewISO6801Time(t time.Time) ISO6801Time
New constructs a new iso8601.Time instance from an existing time.Time instance. This causes the nanosecond field to be set to 0, and its time zone set to a fixed zone with no offset from UTC (but it is *not* UTC itself).
func (*ISO6801Time) IsDefault ¶
func (it *ISO6801Time) IsDefault() bool
IsDefault checks if the time is default
func (ISO6801Time) MarshalJSON ¶
func (it ISO6801Time) MarshalJSON() ([]byte, error)
MarshalJSON serializes the ISO6801Time into JSON string
func (ISO6801Time) String ¶
func (it ISO6801Time) String() string
String returns the time in ISO6801Time format
func (*ISO6801Time) UnmarshalJSON ¶
func (it *ISO6801Time) UnmarshalJSON(data []byte) error
UnmarshalJSON deserializes the ISO6801Time from JSON string