types

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: MIT Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessAsListString

func AccessAsListString() []string

func AccessIsValid

func AccessIsValid(t Access) bool

func BaseTypeAsListString

func BaseTypeAsListString() []string

func BaseTypeIsValid

func BaseTypeIsValid(t BaseType) bool

func DeclAsListString

func DeclAsListString() []string

func DeclIsValid

func DeclIsValid(t Decl) bool

func IndexKindAsListString

func IndexKindAsListString() []string

func IndexKindIsValid

func IndexKindIsValid(t IndexKind) bool

func LanguageAsListString

func LanguageAsListString() []string

func LanguageIsValid

func LanguageIsValid(t Language) bool

func NodeKindAsListString

func NodeKindAsListString() []string

func NodeKindIsValid

func NodeKindIsValid(t NodeKind) bool

func RenderAsListString

func RenderAsListString() []string

func RenderIsValid

func RenderIsValid(t Render) bool

func StatusAsListString

func StatusAsListString() []string

func StatusIsValid

func StatusIsValid(t Status) bool

Types

type Access

type Access int
const (
	AccessUnknown Access = iota
	AccessNotImplemented
	AccessNotAccessible
	AccessNotify
	AccessReadOnly
	AccessReadWrite
	AccessInstall
	AccessInstallNotify
	AccessReportOnly
	AccessEventOnly
)

func AccessAsList

func AccessAsList() []Access

func AccessFromString

func AccessFromString(s string) (Access, error)

func (Access) MarshalJSON

func (i Access) MarshalJSON() ([]byte, error)

func (Access) String

func (i Access) String() string

func (*Access) UnmarshalJSON

func (i *Access) UnmarshalJSON(data []byte) error

type BaseType

type BaseType int
const (
	BaseTypeUnknown BaseType = iota
	BaseTypeInteger32
	BaseTypeOctetString
	BaseTypeObjectIdentifier
	BaseTypeUnsigned32
	BaseTypeInteger64
	BaseTypeUnsigned64
	BaseTypeFloat32
	BaseTypeFloat64
	BaseTypeFloat128
	BaseTypeEnum
	BaseTypeBits
	BaseTypePointer
)

func BaseTypeAsList

func BaseTypeAsList() []BaseType

func BaseTypeFromString

func BaseTypeFromString(s string) (BaseType, error)

func (BaseType) MarshalJSON

func (i BaseType) MarshalJSON() ([]byte, error)

func (BaseType) String

func (i BaseType) String() string

func (*BaseType) UnmarshalJSON

func (i *BaseType) UnmarshalJSON(data []byte) error

type Decl

type Decl int
const (
	DeclUnknown Decl = iota
	DeclImplicitType
	DeclTypeAssignment

	DeclImplSequenceOf
	DeclValueAssignment
	DeclObjectType
	DeclObjectIdentity
	DeclModuleIdentity
	DeclNotificationType
	DeclTrapType
	DeclObjectGroup
	DeclNotificationGroup
	DeclModuleCompliance
	DeclAgentCapabilities
	DeclTextualConvention
	DeclMacro
	DeclComplGroup
	DeclComplObject
	DeclImplObject
	DeclModule Decl = iota + 13
	DeclExtension
	DeclTypedef
	DeclNode
	DeclScalar
	DeclTable
	DeclRow
	DeclColumn
	DeclNotification
	DeclGroup
	DeclCompliance
	DeclIdentity
	DeclClass
	DeclAttribute
	DeclEvent
)

func DeclAsList

func DeclAsList() []Decl

func DeclFromString

func DeclFromString(s string) (Decl, error)

func (Decl) MarshalJSON

func (i Decl) MarshalJSON() ([]byte, error)

func (Decl) String

func (i Decl) String() string

func (*Decl) UnmarshalJSON

func (i *Decl) UnmarshalJSON(data []byte) error

type IndexKind

type IndexKind int
const (
	IndexUnknown IndexKind = iota
	IndexIndex
	IndexAugment
	IndexReorder
	IndexSparse
	IndexExpand
)

func IndexKindAsList

func IndexKindAsList() []IndexKind

func IndexKindFromString

func IndexKindFromString(s string) (IndexKind, error)

func (IndexKind) MarshalJSON

func (i IndexKind) MarshalJSON() ([]byte, error)

func (IndexKind) String

func (i IndexKind) String() string

func (*IndexKind) UnmarshalJSON

func (i *IndexKind) UnmarshalJSON(data []byte) error

type Language

type Language int
const (
	LanguageUnknown Language = iota
	LanguageSMIv1
	LanguageSMIv2
	LanguageSMIng
	LanguageSPPI
)

func LanguageAsList

func LanguageAsList() []Language

func LanguageFromString

func LanguageFromString(s string) (Language, error)

func (Language) MarshalJSON

func (i Language) MarshalJSON() ([]byte, error)

func (Language) String

func (i Language) String() string

func (*Language) UnmarshalJSON

func (i *Language) UnmarshalJSON(data []byte) error

type NodeKind

type NodeKind int
const (
	NodeUnknown NodeKind = iota
	NodeNode    NodeKind = 1 << (iota - 1)
	NodeScalar
	NodeTable
	NodeRow
	NodeColumn
	NodeNotification
	NodeGroup
	NodeCompliance
	NodeCapabilities
	NodeAny NodeKind = 0xffff
)

func NodeKindAsList

func NodeKindAsList() []NodeKind

func NodeKindFromString

func NodeKindFromString(s string) (NodeKind, error)

func (NodeKind) MarshalJSON

func (i NodeKind) MarshalJSON() ([]byte, error)

func (NodeKind) String

func (i NodeKind) String() string

func (*NodeKind) UnmarshalJSON

func (i *NodeKind) UnmarshalJSON(data []byte) error

type Oid added in v0.2.0

type Oid []SmiSubId

func NewOid added in v0.2.0

func NewOid(parent Oid, subId SmiSubId) Oid

func OidFromString added in v0.2.0

func OidFromString(s string) (Oid, error)

func OidMustFromString added in v0.2.3

func OidMustFromString(s string) Oid

Helper for defining constants from strings

func (Oid) After added in v0.2.0

func (o Oid) After(oid Oid) bool

func (Oid) Before added in v0.2.0

func (o Oid) Before(oid Oid) bool

func (Oid) ChildOf added in v0.2.0

func (o Oid) ChildOf(oid Oid) bool

func (Oid) Equals added in v0.2.0

func (o Oid) Equals(oid Oid) bool

func (Oid) ParentOf added in v0.2.0

func (o Oid) ParentOf(oid Oid) bool

func (Oid) String added in v0.2.0

func (o Oid) String() string

type Render

type Render int
const (
	RenderNumeric Render = 1 << iota
	RenderName
	RenderQualified
	RenderFormat
	RenderPrintable
	RenderUnknown
	RenderAll Render = 0xff
)

func RenderAsList

func RenderAsList() []Render

func RenderFromString

func RenderFromString(s string) (Render, error)

func (Render) MarshalJSON

func (i Render) MarshalJSON() ([]byte, error)

func (Render) String

func (i Render) String() string

func (*Render) UnmarshalJSON

func (i *Render) UnmarshalJSON(data []byte) error

type SmiElement added in v0.2.0

type SmiElement struct{}

type SmiErrorHandler added in v0.2.0

type SmiErrorHandler func(path string, line int, severity int, msg string, tag string)

void (SmiErrorHandler) (char *path, int line, int severity, char *msg, char *tag)

type SmiIdentifier added in v0.2.0

type SmiIdentifier string

func (SmiIdentifier) String added in v0.2.0

func (x SmiIdentifier) String() string

type SmiImport added in v0.2.0

type SmiImport struct {
	Module SmiIdentifier
	Name   SmiIdentifier
}

type SmiMacro added in v0.2.0

type SmiMacro struct {
	Name        SmiIdentifier
	Decl        Decl
	Status      Status
	Description string
	Reference   string
}

type SmiModule added in v0.2.0

type SmiModule struct {
	Name         SmiIdentifier
	Path         string
	Organization string
	ContactInfo  string
	Description  string
	Reference    string
	Language     Language
	Conformance  bool
}

type SmiNamedNumber added in v0.2.0

type SmiNamedNumber struct {
	Name  SmiIdentifier
	Value SmiValue
}

type SmiNode added in v0.2.0

type SmiNode struct {
	Name        SmiIdentifier
	OidLen      int
	Oid         Oid
	Decl        Decl
	Access      Access
	Status      Status
	Format      string
	Value       SmiValue
	Units       string
	Description string
	Reference   string
	IndexKind   IndexKind
	Implied     bool
	Create      bool
	NodeKind    NodeKind
}

type SmiOption added in v0.2.0

type SmiOption struct {
	Description string
}

type SmiRange added in v0.2.0

type SmiRange struct {
	MinValue SmiValue
	MaxValue SmiValue
}

type SmiRefinement added in v0.2.0

type SmiRefinement struct {
	Access      Access
	Description string
}

type SmiRevision added in v0.2.0

type SmiRevision struct {
	Date        time.Time
	Description string
}

type SmiSubId added in v0.2.0

type SmiSubId uint32

type SmiType added in v0.2.0

type SmiType struct {
	Name        SmiIdentifier
	BaseType    BaseType
	Decl        Decl
	Format      string
	Value       SmiValue
	Units       string
	Status      Status
	Description string
	Reference   string
}

type SmiValue added in v0.2.0

type SmiValue struct {
	BaseType BaseType
	Len      uint
	Value    interface{}
}

type Status

type Status int
const (
	StatusUnknown Status = iota
	StatusCurrent
	StatusDeprecated
	StatusMandatory
	StatusOptional
	StatusObsolete
)

func StatusAsList

func StatusAsList() []Status

func StatusFromString

func StatusFromString(s string) (Status, error)

func (Status) MarshalJSON

func (i Status) MarshalJSON() ([]byte, error)

func (Status) String

func (i Status) String() string

func (*Status) UnmarshalJSON

func (i *Status) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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