internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeTime

func DecodeTime(value string) (time.Time, error)

DecodeTime parses data bytes as time.Time in UTC timezone. Supported formats of the data bytes are: 1. RFC3339Nano string, e.g. "2006-01-02T15:04:05-07:00". 2. Date string, e.g. "2006-01-02". 3. Unix timestamp, e.g. "1136239445", "1136239445.8", "1136239445.812738".

func DecodeUnixtime

func DecodeUnixtime(value string) (time.Time, error)

value must be valid unix timestamp, matches reUnixtime.

Types

type Bool

type Bool bool

func (*Bool) FromString

func (bv *Bool) FromString(s string) error

func (Bool) ToString

func (bv Bool) ToString() (string, error)

type ByteSlice

type ByteSlice []byte

ByteSlice is a wrapper of []byte to implement Stringable. NOTE: we're using base64.StdEncoding here, not base64.URLEncoding.

func (*ByteSlice) FromString

func (bs *ByteSlice) FromString(s string) error

func (ByteSlice) ToString

func (bs ByteSlice) ToString() (string, error)

type Complex128

type Complex128 complex128

func (*Complex128) FromString

func (cv *Complex128) FromString(s string) error

func (Complex128) ToString

func (cv Complex128) ToString() (string, error)

type Complex64

type Complex64 complex64

func (*Complex64) FromString

func (cv *Complex64) FromString(s string) error

func (Complex64) ToString

func (cv Complex64) ToString() (string, error)

type Float32

type Float32 float32

func (*Float32) FromString

func (fv *Float32) FromString(s string) error

func (Float32) ToString

func (fv Float32) ToString() (string, error)

type Float64

type Float64 float64

func (*Float64) FromString

func (fv *Float64) FromString(s string) error

func (Float64) ToString

func (fv Float64) ToString() (string, error)

type Int

type Int int

func (*Int) FromString

func (iv *Int) FromString(s string) error

func (Int) ToString

func (iv Int) ToString() (string, error)

type Int16

type Int16 int16

func (*Int16) FromString

func (iv *Int16) FromString(s string) error

func (Int16) ToString

func (iv Int16) ToString() (string, error)

type Int32

type Int32 int32

func (*Int32) FromString

func (iv *Int32) FromString(s string) error

func (Int32) ToString

func (iv Int32) ToString() (string, error)

type Int64

type Int64 int64

func (*Int64) FromString

func (iv *Int64) FromString(s string) error

func (Int64) ToString

func (iv Int64) ToString() (string, error)

type Int8

type Int8 int8

func (*Int8) FromString

func (iv *Int8) FromString(s string) error

func (Int8) ToString

func (iv Int8) ToString() (string, error)

type String

type String string

func (*String) FromString

func (sv *String) FromString(s string) error

func (String) ToString

func (sv String) ToString() (string, error)

type Time

type Time time.Time

func (*Time) FromString

func (tv *Time) FromString(s string) error

func (Time) ToString

func (tv Time) ToString() (string, error)

type Uint

type Uint uint

func (*Uint) FromString

func (uv *Uint) FromString(s string) error

func (Uint) ToString

func (uv Uint) ToString() (string, error)

type Uint16

type Uint16 uint16

func (*Uint16) FromString

func (uv *Uint16) FromString(s string) error

func (Uint16) ToString

func (uv Uint16) ToString() (string, error)

type Uint32

type Uint32 uint32

func (*Uint32) FromString

func (uv *Uint32) FromString(s string) error

func (Uint32) ToString

func (uv Uint32) ToString() (string, error)

type Uint64

type Uint64 uint64

func (*Uint64) FromString

func (uv *Uint64) FromString(s string) error

func (Uint64) ToString

func (uv Uint64) ToString() (string, error)

type Uint8

type Uint8 uint8

func (*Uint8) FromString

func (uv *Uint8) FromString(s string) error

func (Uint8) ToString

func (uv Uint8) ToString() (string, error)

Jump to

Keyboard shortcuts

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