Versions in this module Expand all Collapse all v0 v0.4.5 Oct 18, 2023 v0.1.0 May 29, 2019 Changes in this version + const StateEnd + const StateFormat + const StateLength + const StateRepeat + const StateSeparator + const StateTerminator + 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 struct + Name string + Oid Oid + OidFormatted string + OidLen uint + func (b BaseNode) ChildOf(n BaseNode) bool + func (b BaseNode) ParentOf(n BaseNode) bool + type ColumnNode ScalarNode + func (n ColumnNode) FormatValue(value interface{}, flags ...Format) Value + func (n ColumnNode) GetValueFormatter(flags ...Format) ValueFormatter + type Enum struct + BaseType types.BaseType + Values []NamedNumber + func (e *Enum) Name(value int64) string + func (e *Enum) Value(name string) (int64, error) + type Format byte + const FormatAll + const FormatBits + const FormatDurationShort + const FormatEnumName + const FormatEnumValue + const FormatNone + const FormatString + const FormatUnits + func FormatAsList() []Format + func FormatFromString(s string) (Format, error) + func ResolveFormat(formats []Format, defaultFormat ...Format) (format Format) + func (i *Format) UnmarshalJSON(data []byte) error + func (i Format) MarshalJSON() ([]byte, error) + func (i Format) String() string + type Import struct + Module string + Name string + type Module struct + ContactInfo string + Description string + Language types.Language + Name string + Organization string + Path string + Reference string + type NamedNumber struct + Name string + Value int64 + type Node struct + Access types.Access + Decl types.Decl + Description string + Kind types.NodeKind + Name string + Oid Oid + OidLen int + Status types.Status + Type *Type + func (n Node) FormatValue(value interface{}, flags ...Format) Value + func (n Node) GetValueFormatter(flags ...Format) ValueFormatter + type NotificationNode struct + Objects []ScalarNode + type Oid []uint32 + func OidFromString(s string) (Oid, error) + func (o Oid) After(oid Oid) bool + func (o Oid) Before(oid Oid) bool + func (o Oid) ChildOf(oid Oid) bool + func (o Oid) Equals(oid Oid) bool + func (o Oid) ParentOf(oid Oid) bool + func (o Oid) String() string + type Range struct + BaseType types.BaseType + MaxValue int64 + MinValue int64 + type Revision struct + Date time.Time + Description string + type RowNode struct + Columns []ColumnNode + Implied bool + Index []ColumnNode + type ScalarNode struct + Type Type + func (n ScalarNode) FormatValue(value interface{}, flags ...Format) Value + func (n ScalarNode) GetValueFormatter(flags ...Format) ValueFormatter + type StringHint struct + Format string + Length int + Numeric bool + Repeat bool + Separator byte + Terminator byte + type TableNode struct + Row RowNode + func (t TableNode) BuildIndex(index ...interface{}) ([]uint32, error) + func (t TableNode) Columns() []ColumnNode + func (t TableNode) Implied() bool + func (t TableNode) Index() []ColumnNode + 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 (t Type) FormatValue(value interface{}, flags ...Format) Value + func (t Type) GetValueFormatter(flags ...Format) ValueFormatter + func (t Type) IndexValue(value interface{}, implied bool) ([]uint32, error) + func (t Type) String() string + type Value struct + Format Format + Formatted string + Raw interface{} + 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) + func (v Value) Bytes() []byte + func (v Value) Duration() time.Duration + func (v Value) Int64() int64 + func (v Value) String() string + func (v Value) Uint64() uint64 + type ValueFormatter func(interface{}) Value + 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)