util

package
v0.9.182 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 21

Documentation

Overview

Package util defines the common utilities including string and time.

Index

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 CalculateContentMD5

func CalculateContentMD5(data io.Reader, size int64) (string, error)

func FormatISO8601Date

func FormatISO8601Date(timestamp_second int64) string

func FormatRFC822Date

func FormatRFC822Date(timestamp_second int64) string

func GetMimeMap added in v0.9.139

func GetMimeMap() map[string]string

func HmacSha256Hex

func HmacSha256Hex(key, str_to_sign string) string

func LoadMimeMap added in v0.9.139

func LoadMimeMap()

func NewRequestId

func NewRequestId() string

func NewUUID

func NewUUID() string

func NowUTCNanoSeconds

func NowUTCNanoSeconds() int64

func NowUTCSeconds

func NowUTCSeconds() int64

func ParseISO8601Date

func ParseISO8601Date(time_string string) (time.Time, error)

func ParseRFC822Date

func ParseRFC822Date(time_string string) (time.Time, error)

func UriEncode

func UriEncode(uri string, encodeSlash bool) string

Types

This section is empty.

Directories

Path Synopsis
Package log implements the log facilities for BCE.
Package log implements the log facilities for BCE.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL