Documentation
¶
Index ¶
- Constants
- func DurationFormat(d time.Duration) string
- func DurationFormatLong(d time.Duration) string
- func FormatAsListString() []string
- func FormatIsValid(t Format) bool
- func IntegerDisplayHint(format string, value int64) (formatted string)
- func StringDisplayHint(format string, value []byte) (formatted string)
- func ToInt64(value interface{}) (val int64, err error)
- type BaseNode
- type ColumnNode
- type Enum
- type Format
- type Import
- type Module
- type NamedNumber
- type Node
- type NotificationNode
- type Range
- type Revision
- type RowNode
- type ScalarNode
- type StringHint
- type TableNode
- type Type
- type Value
- func GetBitsFormatted(value interface{}, flags Format) (v Value)
- func GetDurationFormatted(value interface{}, flags Format) (v Value)
- func GetEnumBitsFormatted(value interface{}, flags Format, enum *Enum) (v Value)
- func GetEnumFormatted(value interface{}, flags Format, enum *Enum) (v Value)
- func GetInetAddressFormatted(value interface{}, flags Format) (v Value)
- func GetIntFormatted(value interface{}, flags Format, format string) Value
- func GetOctetStringFormatted(value interface{}, flags Format, format string) (v Value)
- type ValueFormatter
- func GetBitsFormatter(flags Format) (f ValueFormatter)
- func GetDurationFormatter(flags Format) (f ValueFormatter)
- func GetEnumBitsFormatter(flags Format, enum *Enum) (f ValueFormatter)
- func GetEnumFormatter(flags Format, enum *Enum) (f ValueFormatter)
- func GetInetAddressFormatter(flags Format) (f ValueFormatter)
- func GetIntFormatter(flags Format, format string) (f ValueFormatter)
- func GetOctetStringFormatter(flags Format, format string) (f ValueFormatter)
Constants ¶
View Source
const ( StateRepeat = iota StateLength StateFormat StateSeparator StateTerminator StateEnd )
Variables ¶
This section is empty.
Functions ¶
func DurationFormat ¶
func DurationFormatLong ¶
func FormatAsListString ¶
func FormatAsListString() []string
func FormatIsValid ¶
func IntegerDisplayHint ¶
func StringDisplayHint ¶
Types ¶
type ColumnNode ¶
type ColumnNode ScalarNode
func (ColumnNode) FormatValue ¶
func (n ColumnNode) FormatValue(value interface{}, flags ...Format) Value
func (ColumnNode) GetValueFormatter ¶
func (n ColumnNode) GetValueFormatter(flags ...Format) ValueFormatter
type Enum ¶
type Enum struct { BaseType types.BaseType Values []NamedNumber // contains filtered or unexported fields }
type Format ¶
type Format byte
const ( FormatNone Format = 0 FormatEnumName Format = 1 << iota FormatEnumValue FormatBits FormatString FormatUnits FormatDurationShort FormatAll Format = 0xff & ^FormatUnits )
func FormatAsList ¶
func FormatAsList() []Format
func FormatFromString ¶
func ResolveFormat ¶
func (Format) MarshalJSON ¶
func (*Format) UnmarshalJSON ¶
type NamedNumber ¶
type Node ¶
type Node struct { Access types.Access Decl types.Decl Description string Kind types.NodeKind Name string Oid types.Oid OidLen int Status types.Status Type *Type }
func (Node) FormatValue ¶
func (Node) GetValueFormatter ¶
func (n Node) GetValueFormatter(flags ...Format) ValueFormatter
type NotificationNode ¶
type NotificationNode struct { BaseNode Objects []ScalarNode }
type RowNode ¶
type RowNode struct { BaseNode Columns []ColumnNode Implied bool Index []ColumnNode }
type ScalarNode ¶
func (ScalarNode) FormatValue ¶
func (n ScalarNode) FormatValue(value interface{}, flags ...Format) Value
func (ScalarNode) GetValueFormatter ¶
func (n ScalarNode) GetValueFormatter(flags ...Format) ValueFormatter
type StringHint ¶
type TableNode ¶
func (TableNode) BuildIndex ¶
func (TableNode) Columns ¶
func (t TableNode) Columns() []ColumnNode
func (TableNode) Index ¶
func (t TableNode) Index() []ColumnNode
type Type ¶
type Type struct { BaseType types.BaseType Decl types.Decl Description string Enum *Enum Format string Name string Ranges []Range Reference string Status types.Status Units string }
func (Type) FormatValue ¶
func (Type) GetValueFormatter ¶
func (t Type) GetValueFormatter(flags ...Format) ValueFormatter
func (Type) IndexValue ¶
type Value ¶
func GetBitsFormatted ¶
func GetDurationFormatted ¶
func GetEnumBitsFormatted ¶
func GetEnumFormatted ¶
func GetInetAddressFormatted ¶
func GetIntFormatted ¶
func GetOctetStringFormatted ¶
type ValueFormatter ¶
type ValueFormatter func(interface{}) Value
func GetBitsFormatter ¶
func GetBitsFormatter(flags Format) (f ValueFormatter)
func GetDurationFormatter ¶
func GetDurationFormatter(flags Format) (f ValueFormatter)
func GetEnumBitsFormatter ¶
func GetEnumBitsFormatter(flags Format, enum *Enum) (f ValueFormatter)
func GetEnumFormatter ¶
func GetEnumFormatter(flags Format, enum *Enum) (f ValueFormatter)
func GetInetAddressFormatter ¶
func GetInetAddressFormatter(flags Format) (f ValueFormatter)
func GetIntFormatter ¶
func GetIntFormatter(flags Format, format string) (f ValueFormatter)
func GetOctetStringFormatter ¶
func GetOctetStringFormatter(flags Format, format string) (f ValueFormatter)
Click to show internal directories.
Click to hide internal directories.