Documentation ¶
Overview ¶
Package sdtypes is a package providing various helpers for serialized data types.
Index ¶
- type EpochTime
- func (e *EpochTime) MarshalJSON() ([]byte, error)
- func (e *EpochTime) MarshalXML(elem *xml.Encoder, start xml.StartElement) error
- func (e *EpochTime) MarshalXMLAttr(name xml.Name) xml.Attr
- func (e *EpochTime) UnmarshalJSON(data []byte) error
- func (e *EpochTime) UnmarshalXML(elem *xml.Decoder, start xml.StartElement) error
- func (e *EpochTime) UnmarshalXMLAttr(attr xml.Attr) error
- type EpochTimeMillis
- func (e *EpochTimeMillis) MarshalJSON() ([]byte, error)
- func (e *EpochTimeMillis) MarshalXML(elem *xml.Encoder, start xml.StartElement) error
- func (e *EpochTimeMillis) MarshalXMLAttr(name xml.Name) xml.Attr
- func (e *EpochTimeMillis) UnmarshalJSON(data []byte) error
- func (e *EpochTimeMillis) UnmarshalXML(elem *xml.Decoder, start xml.StartElement) error
- func (e *EpochTimeMillis) UnmarshalXMLAttr(attr xml.Attr) error
- type EpochTimeNanos
- func (e *EpochTimeNanos) MarshalJSON() ([]byte, error)
- func (e *EpochTimeNanos) MarshalXML(elem *xml.Encoder, start xml.StartElement) error
- func (e *EpochTimeNanos) MarshalXMLAttr(name xml.Name) xml.Attr
- func (e *EpochTimeNanos) UnmarshalJSON(data []byte) error
- func (e *EpochTimeNanos) UnmarshalXML(elem *xml.Decoder, start xml.StartElement) error
- func (e *EpochTimeNanos) UnmarshalXMLAttr(attr xml.Attr) error
- type EpochXCoder
- func (x *EpochXCoder) DecodeInt(i int64) time.Time
- func (x *EpochXCoder) DecodeJSON(data []byte) (t time.Time, err error)
- func (x *EpochXCoder) DecodeString(s string) (t time.Time, err error)
- func (x EpochXCoder) DecodeXMLAttr(attr xml.Attr) (t time.Time, err error)
- func (x *EpochXCoder) DecodeXMLElement(elem *xml.Decoder, start xml.StartElement) (t time.Time, err error)
- func (x *EpochXCoder) EncodeInt(t time.Time) int64
- func (x *EpochXCoder) EncodeJSON(t time.Time) ([]byte, error)
- func (x *EpochXCoder) EncodeString(t time.Time) string
- func (x *EpochXCoder) EncodeXML(t time.Time, elem *xml.Encoder, start xml.StartElement) error
- func (x *EpochXCoder) EncodeXMLAttr(t time.Time, name xml.Name) xml.Attr
- type ISOTime
- type RFC3339Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EpochTime ¶
EpochTime represents a time.Time that is encoded and decoded as a Unix timestamp in seconds.
func (*EpochTime) MarshalJSON ¶
func (*EpochTime) MarshalXML ¶
func (*EpochTime) UnmarshalJSON ¶
func (*EpochTime) UnmarshalXML ¶
type EpochTimeMillis ¶
EpochTimeMillis represents a time.Time that is encoded and decoded as a Unix timestamp in milliseconds.
func (*EpochTimeMillis) MarshalJSON ¶
func (e *EpochTimeMillis) MarshalJSON() ([]byte, error)
func (*EpochTimeMillis) MarshalXML ¶
func (e *EpochTimeMillis) MarshalXML(elem *xml.Encoder, start xml.StartElement) error
func (*EpochTimeMillis) MarshalXMLAttr ¶
func (e *EpochTimeMillis) MarshalXMLAttr(name xml.Name) xml.Attr
func (*EpochTimeMillis) UnmarshalJSON ¶
func (e *EpochTimeMillis) UnmarshalJSON(data []byte) error
func (*EpochTimeMillis) UnmarshalXML ¶
func (e *EpochTimeMillis) UnmarshalXML(elem *xml.Decoder, start xml.StartElement) error
func (*EpochTimeMillis) UnmarshalXMLAttr ¶
func (e *EpochTimeMillis) UnmarshalXMLAttr(attr xml.Attr) error
type EpochTimeNanos ¶
EpochTimeNanos represents a time.Time that is encoded and decoded as a Unix timestamp in nanoseconds.
func (*EpochTimeNanos) MarshalJSON ¶
func (e *EpochTimeNanos) MarshalJSON() ([]byte, error)
func (*EpochTimeNanos) MarshalXML ¶
func (e *EpochTimeNanos) MarshalXML(elem *xml.Encoder, start xml.StartElement) error
func (*EpochTimeNanos) MarshalXMLAttr ¶
func (e *EpochTimeNanos) MarshalXMLAttr(name xml.Name) xml.Attr
func (*EpochTimeNanos) UnmarshalJSON ¶
func (e *EpochTimeNanos) UnmarshalJSON(data []byte) error
func (*EpochTimeNanos) UnmarshalXML ¶
func (e *EpochTimeNanos) UnmarshalXML(elem *xml.Decoder, start xml.StartElement) error
func (*EpochTimeNanos) UnmarshalXMLAttr ¶
func (e *EpochTimeNanos) UnmarshalXMLAttr(attr xml.Attr) error
type EpochXCoder ¶
type EpochXCoder struct {
// contains filtered or unexported fields
}
func (*EpochXCoder) DecodeJSON ¶
func (x *EpochXCoder) DecodeJSON(data []byte) (t time.Time, err error)
func (*EpochXCoder) DecodeString ¶
func (x *EpochXCoder) DecodeString(s string) (t time.Time, err error)
func (EpochXCoder) DecodeXMLAttr ¶
func (*EpochXCoder) DecodeXMLElement ¶
func (x *EpochXCoder) DecodeXMLElement(elem *xml.Decoder, start xml.StartElement) (t time.Time, err error)
func (*EpochXCoder) EncodeJSON ¶
func (x *EpochXCoder) EncodeJSON(t time.Time) ([]byte, error)
func (*EpochXCoder) EncodeString ¶
func (x *EpochXCoder) EncodeString(t time.Time) string
func (*EpochXCoder) EncodeXML ¶
func (x *EpochXCoder) EncodeXML(t time.Time, elem *xml.Encoder, start xml.StartElement) error
func (*EpochXCoder) EncodeXMLAttr ¶
type RFC3339Time ¶
func (RFC3339Time) MarshalJSON ¶
func (t RFC3339Time) MarshalJSON() ([]byte, error)
func (RFC3339Time) Time ¶
func (t RFC3339Time) Time() time.Time
func (*RFC3339Time) UnmarshalJSON ¶
func (t *RFC3339Time) UnmarshalJSON(v []byte) error
Click to show internal directories.
Click to hide internal directories.