ext

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: BSD-2-Clause Imports: 9 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(val bool) *bool

func Byte

func Byte(val byte) *byte

func CloneBool

func CloneBool(test *bool) *bool

func CloneFloat64

func CloneFloat64(test *float64) *float64

func CloneInt64

func CloneInt64(test *int64) *int64

func CloneStr

func CloneStr(test *string) *string

func CloneTime

func CloneTime(test *time.Time) *time.Time

func DefBool

func DefBool(test *bool, value bool) bool

func DefFloat64

func DefFloat64(test *float64, value float64) float64

func DefInt64

func DefInt64(test *int64, value int64) int64

func DefStr

func DefStr(test *string, value string) string

func DefTime

func DefTime(test *time.Time, value time.Time) time.Time

func Float32

func Float32(val float32) *float32

func Float64

func Float64(val float64) *float64

func Int

func Int(val int) *int

func Int16

func Int16(val int16) *int16

func Int32

func Int32(val int32) *int32

func Int64

func Int64(val int64) *int64

func Int8

func Int8(val int8) *int8

func IsEmpty

func IsEmpty(test *string) bool

func IsNil

func IsNil(value interface{}) bool

func String

func String(val string) *string

Types

type Any

type Any struct {
	Val interface{}
}

func ANY

func ANY(val interface{}) Any

func (Any) IsNil

func (this Any) IsNil() bool

func (*Any) Scan

func (this *Any) Scan(value interface{}) error

Scan implements the Scanner interface.

func (Any) Value

func (this Any) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Boolean

type Boolean bool

BOOL

func NewBool

func NewBool(val Boolean) *Boolean

func (Boolean) Equals

func (this Boolean) Equals(other interface{}) bool

func (Boolean) HashCode

func (this Boolean) HashCode() int

func (Boolean) String

func (this Boolean) String() string

type Date

type Date time.Time

Date I Created this type because I wanted to control the generated/parsed JSON

func CloneDate

func CloneDate(test *Date) *Date

func DefDate

func DefDate(test *Date, value Date) Date

func NOW

func NOW() *Date

func NewDate

func NewDate(val Date) *Date

func (Date) Equals

func (this Date) Equals(other interface{}) bool

func (Date) HashCode

func (this Date) HashCode() int

func (Date) MarshalJSON

func (this Date) MarshalJSON() ([]byte, error)

func (*Date) Scan

func (this *Date) Scan(value interface{}) error

Scan implements the Scanner interface.

func (Date) String

func (this Date) String() string

func (*Date) UnmarshalJSON

func (this *Date) UnmarshalJSON(b []byte) error

func (Date) Value

func (this Date) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Double

type Double float64

Double

func NewDouble

func NewDouble(val Double) *Double

func (Double) Equals

func (this Double) Equals(other interface{}) bool

func (Double) HashCode

func (this Double) HashCode() int

func (Double) String

func (this Double) String() string

type Duration

type Duration time.Duration

Duration gives us control to the generated/parsed JSON

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() (b []byte, err error)

func (Duration) String

func (d Duration) String() string

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) (err error)

type Float

type Float float32

Float

func NewFloat

func NewFloat(val Float) *Float

func (Float) Equals

func (this Float) Equals(other interface{}) bool

func (Float) HashCode

func (this Float) HashCode() int

func (Float) String

func (this Float) String() string

type Integer

type Integer int32

Integer

func NewInt

func NewInt(val Integer) *Integer

func (Integer) Equals

func (this Integer) Equals(other interface{}) bool

func (Integer) HashCode

func (this Integer) HashCode() int

func (Integer) String

func (this Integer) String() string

type Long

type Long int64

Long

func NewLong

func NewLong(val Long) *Long

func (Long) Equals

func (this Long) Equals(other interface{}) bool

func (Long) HashCode

func (this Long) HashCode() int

func (Long) String

func (this Long) String() string

type Short

type Short int16

Short

func NewShort

func NewShort(val Short) *Short

func (Short) Equals

func (this Short) Equals(other interface{}) bool

func (Short) HashCode

func (this Short) HashCode() int

func (Short) String

func (this Short) String() string

type Str

type Str string

STRING

func NewStr

func NewStr(val Str) *Str

func (Str) Equals

func (this Str) Equals(other interface{}) bool

func (Str) HashCode

func (this Str) HashCode() int

func (*Str) Scan

func (this *Str) Scan(value interface{}) error

func (*Str) String

func (this *Str) String() string

func (Str) Value

func (this Str) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Tiny

type Tiny int8

Tiny

func NewTiny

func NewTiny(val Tiny) *Tiny

func (Tiny) Equals

func (this Tiny) Equals(other interface{}) bool

func (Tiny) HashCode

func (this Tiny) HashCode() int

func (Tiny) String

func (this Tiny) String() string

type Unit

type Unit byte

Byte

func NewUnit

func NewUnit(val Unit) *Unit

func (Unit) Equals

func (this Unit) Equals(other interface{}) bool

func (Unit) HashCode

func (this Unit) HashCode() int

Jump to

Keyboard shortcuts

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