Documentation ¶
Overview ¶
Package util defines the common utilities including string and time.
Index ¶
- Constants
- Variables
- func CalculateContentMD5(data io.Reader, size int64) (string, error)
- func FormatISO8601Date(timestamp_second int64) string
- func FormatRFC822Date(timestamp_second int64) string
- func GetMimeMap() map[string]string
- func HmacSha256Hex(key, str_to_sign string) string
- func LoadMimeMap()
- func NewRequestId() string
- func NewUUID() string
- func NowUTCNanoSeconds() int64
- func NowUTCSeconds() int64
- func ParseISO8601Date(time_string string) (time.Time, error)
- func ParseRFC822Date(time_string string) (time.Time, error)
- func UriEncode(uri string, encodeSlash bool) string
Constants ¶
View Source
const ( RFC822Format = "Mon, 02 Jan 2006 15:04:05 MST" ISO8601Format = "2006-01-02T15:04:05Z" )
Variables ¶
View Source
var DefaultMimeMap map[string]string
Functions ¶
func FormatISO8601Date ¶
func FormatRFC822Date ¶
func GetMimeMap ¶ added in v0.9.139
func HmacSha256Hex ¶
func LoadMimeMap ¶ added in v0.9.139
func LoadMimeMap()
func NewRequestId ¶
func NewRequestId() string
func NowUTCNanoSeconds ¶
func NowUTCNanoSeconds() int64
func NowUTCSeconds ¶
func NowUTCSeconds() int64
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.