Documentation
¶
Index ¶
- Variables
- func BoolInterface(i interface{}) *bool
- func BoolPtr(b bool) *bool
- func BoolValue(b *bool) (v bool)
- func Float32Interface(i interface{}) *float32
- func Float32Ptr(v float32) *float32
- func Float32Value(f *float32) (v float32)
- func Float64Interface(i interface{}) *float64
- func Float64Ptr(v float64) *float64
- func Float64Value(f *float64) (v float64)
- func Int32Interface(i interface{}) *int32
- func Int32Ptr(v int32) *int32
- func Int32Value(i *int32) (v int32)
- func Int64Interface(i interface{}) *int64
- func Int64Ptr(v int64) *int64
- func Int64Value(i *int64) (v int64)
- func IntInterface(i interface{}) *int
- func IntPtr(v int) *int
- func IntValue(i *int) (v int)
- func StringInterface(i interface{}) *string
- func StringPtr(v string) *string
- func StringValue(s *string) (v string)
- func TimePtr(time time.Time) *time.Time
- func TimeValue(t *time.Time) (v time.Time)
- type DateTime
- func (dt DateTime) Equal(input DateTime) bool
- func (dt DateTime) Format(layout string) string
- func (dt DateTime) IsZero() bool
- func (dt DateTime) MarshalJSON() ([]byte, error)
- func (dt *DateTime) Scan(src interface{}) error
- func (dt *DateTime) UnmarshalJSON(bytes []byte) error
- func (dt DateTime) Value() (driver.Value, error)
- type ID
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidID = errors.New("invalid id")
Functions ¶
func BoolInterface ¶
func BoolInterface(i interface{}) *bool
BoolInterface returns a pointer of the interface value.
func Float32Interface ¶
func Float32Interface(i interface{}) *float32
Float32Interface returns a pointer of the interface value.
func Float32Ptr ¶
Float32Ptr returns a pointer to the float32 value passed in.
func Float32Value ¶
Float32Value returns the value or 0 if the pointer is nil.
func Float64Interface ¶
func Float64Interface(i interface{}) *float64
Float64Interface returns a pointer of the interface value.
func Float64Ptr ¶
Float64Ptr returns a pointer to the float64 value passed in.
func Float64Value ¶
Float64Value returns the value or 0 if the pointer is nil.
func Int32Interface ¶
func Int32Interface(i interface{}) *int32
Int32Interface returns a pointer of the interface value.
func Int32Value ¶
Int32Value returns the value or 0 if the pointer is nil.
func Int64Interface ¶
func Int64Interface(i interface{}) *int64
Int64Interface returns a pointer of the interface value.
func Int64Value ¶
Int64Value returns the value or 0 if the pointer is nil.
func IntInterface ¶
func IntInterface(i interface{}) *int
IntInterface returns a pointer of the interface value.
func StringInterface ¶
func StringInterface(i interface{}) *string
StringInterface returns a pointer of the interface value.
func StringValue ¶
StringValue returns the value or "" if the pointer is nil.
Types ¶
type DateTime ¶
DateTime is a time.Time type.
func DateTimeNow ¶
func DateTimeNow() DateTime
DateTimeNow generates a datetime with the current date.
func DateTimePtr ¶
DateTimePtr returns the pointer of a date-time given.
func DateTimeVal ¶
DateTimeVal return the value of a date-time pointer.
func (DateTime) IsZero ¶
IsZero returns true if the DateTime on which it was called is a zero-valued DateTime.
func (DateTime) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*DateTime) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type ID ¶
func MustParseID ¶
MustParseID parses a string and if has any errors will panic.
func (ID) MarshalBinary ¶
MarshalBinary is self-described.
func (*ID) UnmarshalBinary ¶
UnmarshalBinary is self-described.