util

package
v0.0.0-...-64409e6 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ISOFormat = "2006-01-02T15:04:05.000Z07:00"

ISOFormat is a date format that generated by Javascript engine, which means it includes the millisecond, it is a little bit different to "RFC3339" format that ignore the millisecond.

Variables

This section is empty.

Functions

func GetRSAPrivateKey

func GetRSAPrivateKey(fileName string) *rsa.PrivateKey

GetRSAPrivateKey returns RSA sign key

func GetRSAPublicKey

func GetRSAPublicKey(fileName string) *rsa.PublicKey

GetRSAPublicKey returns RSA key of verification

func ToISODate

func ToISODate(t time.Time, loc string) (string, error)

ToISODate returns date with ISO string format based on location time zone. But returns error if location time zone is not a standard.

Example of return:

When the location is "UTC", it will return "2006-01-02T08:04:05.000Z", but if the location is "Asia/Jakarta", it will return "2006-01-02T15:04:05.000+07:00".

Types

This section is empty.

Jump to

Keyboard shortcuts

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