custom

package
v0.0.0-...-bb1ab1e Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UtcLocation                   = "UTC"
	DateLayout                    = "2006-01-02"
	DateTimeLayout                = "2006-01-02 15:04:05"
	DateTimeWithNumericZone       = "2006-01-02 15:04:05 -0700"
	DateTimeWithNumericAndUtcZone = "2006-01-02 15:04:05 -0700 MST"
	DateDisplay                   = "Monday, 02 Jan 2006"
	DateTimeDisplay               = "Monday, 02 Jan 2006 15:04:05"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool bool

func (*Bool) Boolean

func (b *Bool) Boolean() bool

Boolean returns the built-in bool value of the Bool type. This is only advised to be used within if statements where required

func (*Bool) Equals

func (b *Bool) Equals(boolean bool) bool

Equals is primarily used for passing a default bool variable in. By this is meant of a variable storing a bool value as you can compare directly to a true or false value

func (*Bool) Scan

func (b *Bool) Scan(src any) error

type Date

type Date time.Time

func (*Date) Display

func (d *Date) Display() string

func (*Date) MarshalBSONValue

func (d *Date) MarshalBSONValue() (bsontype.Type, []byte, error)

func (*Date) MarshalJSON

func (d *Date) MarshalJSON() ([]byte, error)

func (*Date) MarshalText

func (d *Date) MarshalText() ([]byte, error)

func (*Date) Scan

func (d *Date) Scan(src any) error

func (*Date) String

func (d *Date) String() string

func (*Date) TimeValue

func (d *Date) TimeValue() *time.Time

func (*Date) UnmarshalBSON

func (d *Date) UnmarshalBSON(bytes []byte) error

func (*Date) UnmarshalText

func (d *Date) UnmarshalText(text []byte) error

type Datetime

type Datetime time.Time

func (*Datetime) Display

func (d *Datetime) Display() string

func (*Datetime) MarshalBSON

func (d *Datetime) MarshalBSON() ([]byte, error)

func (*Datetime) MarshalBSONValue

func (d *Datetime) MarshalBSONValue() (bsontype.Type, []byte, error)

func (*Datetime) MarshalJSON

func (d *Datetime) MarshalJSON() ([]byte, error)

func (*Datetime) MarshalText

func (d *Datetime) MarshalText() ([]byte, error)

func (*Datetime) Scan

func (d *Datetime) Scan(src any) error

func (*Datetime) String

func (d *Datetime) String() string

func (*Datetime) TimeValue

func (d *Datetime) TimeValue() *time.Time

func (*Datetime) UTC

func (d *Datetime) UTC() *Datetime

func (*Datetime) UnmarshalBSON

func (d *Datetime) UnmarshalBSON(bytes []byte) error

func (*Datetime) UnmarshalText

func (d *Datetime) UnmarshalText(text []byte) error

type Map

type Map[T, V comparable] map[T]V

func (*Map[T, V]) Get

func (c *Map[T, V]) Get(key T) *V

func (*Map[T, V]) Has

func (c *Map[T, V]) Has(key T) bool

func (*Map[T, V]) Keys

func (c *Map[T, V]) Keys() []T

func (*Map[T, V]) Remove

func (c *Map[T, V]) Remove(key T)

func (*Map[T, V]) Set

func (c *Map[T, V]) Set(key T, value V)

func (*Map[T, V]) Values

func (c *Map[T, V]) Values() []V

Jump to

Keyboard shortcuts

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