Documentation
¶
Index ¶
- type Access
- type AgentCapabilities
- type AgentCapabilityModule
- type AgentCapabilityVariation
- type Compliance
- type ComplianceGroup
- type ComplianceModuleName
- type ComplianceObject
- type Date
- type Implicit
- type Import
- type Index
- type Macro
- type MacroBody
- type Module
- type ModuleBody
- type ModuleCompliance
- type ModuleComplianceModule
- type ModuleIdentity
- type NamedNumber
- type Node
- type NotificationGroup
- type NotificationType
- type ObjectGroup
- type ObjectIdentity
- type ObjectType
- type Oid
- type Range
- type Revision
- type Sequence
- type SequenceEntry
- type SequenceType
- type Status
- type SubIdentifier
- type SubType
- type Syntax
- type SyntaxType
- type TextualConvention
- type TrapType
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access string
const ( // In order from least to greatest AccessWriteOnly Access = "write-only" // Do not use AccessNotImplemented Access = "not-implemented" AccessNotAccessible Access = "not-accessible" AccessAccessibleForNotify Access = "accesible-for-notify" AccessReadOnly Access = "read-only" AccessReadWrite Access = "read-write" AccessReadCreate Access = "read-create" )
type AgentCapabilities ¶
type AgentCapabilities struct { Pos lexer.Position ProductRelease string `parser:"\"PRODUCT-RELEASE\" @Text"` // Required Status Status `parser:"\"STATUS\" @( \"current\" | \"obsolete\" )"` // Required Description string `parser:"\"DESCRIPTION\" @Text"` // Required Reference string `parser:"( \"REFERENCE\" @Text )?"` Modules []AgentCapabilityModule `parser:"@@*"` }
type AgentCapabilityModule ¶
type AgentCapabilityModule struct { Pos lexer.Position Module types.SmiIdentifier `parser:"\"SUPPORTS\" @Ident"` // Required Includes []types.SmiIdentifier `parser:"\"INCLUDES\" \"{\" @Ident ( \",\" @Ident )* \",\"? \"}\""` // Required Variations []AgentCapabilityVariation `parser:"@@*"` }
type AgentCapabilityVariation ¶
type AgentCapabilityVariation struct { Pos lexer.Position Name types.SmiIdentifier `parser:"\"VARIATION\" @Ident"` // Required Syntax *Syntax `parser:"( \"SYNTAX\" @@ )?"` WriteSyntax *Syntax `parser:"( \"WRITE-SYNTAX\" @@ )?"` Access *Access `` /* 145-byte string literal not displayed */ Creation []types.SmiIdentifier `parser:"( \"CREATION-REQUIRES\" \"{\" @Ident ( \",\" @Ident )* \",\"? \"}\" )?"` Defval *string `` /* 155-byte string literal not displayed */ Description string `parser:"\"DESCRIPTION\" @Text"` // Required }
type Compliance ¶
type Compliance struct { Pos lexer.Position Group *ComplianceGroup `parser:"@@"` Object *ComplianceObject `parser:"| @@"` }
type ComplianceGroup ¶
type ComplianceGroup struct { Pos lexer.Position Name types.SmiIdentifier `parser:"\"GROUP\" @Ident"` Description string `parser:"\"DESCRIPTION\" @Text"` }
type ComplianceModuleName ¶
type ComplianceModuleName string
func (*ComplianceModuleName) Parse ¶
func (n *ComplianceModuleName) Parse(lex *lexer.PeekingLexer) error
type ComplianceObject ¶
type ComplianceObject struct { Pos lexer.Position Name types.SmiIdentifier `parser:"\"OBJECT\" @Ident"` Syntax *Syntax `parser:"( \"SYNTAX\" @@ )?"` WriteSyntax *Syntax `parser:"( \"WRITE-SYNTAX\" @@ )?"` MinAccess *Access `` /* 131-byte string literal not displayed */ Description string `parser:"\"DESCRIPTION\" @Text"` }
type Implicit ¶
type Implicit struct { Pos lexer.Position Application bool `parser:"\"[\" @\"APPLICATION\"?"` Number int `parser:"@Int \"]\""` Syntax SyntaxType `parser:"\"IMPLICIT\" @@"` }
type Import ¶
type Import struct { Pos lexer.Position Names []types.SmiIdentifier `parser:"@Ident ( \",\" @Ident )* \",\"?"` Module types.SmiIdentifier `parser:"\"FROM\" @Ident"` }
type Index ¶
type Index struct { Pos lexer.Position Implied bool `parser:"@\"IMPLIED\"?"` Name types.SmiIdentifier `parser:"@Ident"` }
type Macro ¶
type Macro struct { Pos lexer.Position Name types.SmiIdentifier `parser:"@Ident \"MACRO\" Assign"` Body MacroBody `parser:"@@"` }
type MacroBody ¶
type Module ¶
type Module struct { Pos lexer.Position Name types.SmiIdentifier `parser:"@Ident"` Body ModuleBody `parser:"\"DEFINITIONS\" Assign \"BEGIN\" @@ \"END\""` }
type ModuleBody ¶
type ModuleBody struct { Pos lexer.Position Imports []Import `parser:"( \"IMPORTS\" @@+ \";\" )?"` Exports []types.SmiIdentifier `parser:"( \"EXPORTS\" @Ident ( \",\" @Ident )* \";\" )?"` Identity *ModuleIdentity `parser:"( @@"` Types []Type `parser:"| @@"` Nodes []Node `parser:"| @@"` Macros []Macro `parser:"| @@ )*"` }
type ModuleCompliance ¶
type ModuleCompliance struct { Pos lexer.Position Status Status `parser:"\"STATUS\" @( \"current\" | \"deprecated\" | \"obsolete\" )"` // Required Description string `parser:"\"DESCRIPTION\" @Text"` // Required Reference string `parser:"( \"REFERENCE\" @Text )?"` Modules []ModuleComplianceModule `parser:"( \"MODULE\" @@ )+"` }
type ModuleComplianceModule ¶
type ModuleComplianceModule struct { Pos lexer.Position Name ComplianceModuleName `parser:"@@"` MandatoryGroups []types.SmiIdentifier `parser:"( \"MANDATORY-GROUPS\" \"{\" @Ident ( \",\" @Ident )* \",\"? \"}\" )?"` Compliances []Compliance `parser:"@@*"` }
type ModuleIdentity ¶
type ModuleIdentity struct { Pos lexer.Position Name types.SmiIdentifier `parser:"@Ident \"MODULE-IDENTITY\""` LastUpdated Date `parser:"\"LAST-UPDATED\" @ExtUTCTime"` // Required Organization string `parser:"\"ORGANIZATION\" @Text"` // Required ContactInfo string `parser:"\"CONTACT-INFO\" @Text"` // Required Description string `parser:"\"DESCRIPTION\" @Text"` // Required Revisions []Revision `parser:"( \"REVISION\" @@ )*"` Oid Oid `parser:"Assign \"{\" @@ \"}\""` }
type NamedNumber ¶
type NamedNumber struct { Pos lexer.Position Name types.SmiIdentifier `parser:"@Ident"` Value string `parser:"\"(\" @( \"-\"? Int ) \")\""` }
type Node ¶
type Node struct { Pos lexer.Position Name types.SmiIdentifier `parser:"@Ident"` ObjectIdentifier bool `parser:"( ( ( @ObjectIdentifier"` ObjectIdentity *ObjectIdentity `parser:"| ( \"OBJECT-IDENTITY\" @@ )"` ObjectGroup *ObjectGroup `parser:"| ( \"OBJECT-GROUP\" @@ )"` ObjectType *ObjectType `parser:"| ( \"OBJECT-TYPE\" @@ )"` NotificationGroup *NotificationGroup `parser:"| ( \"NOTIFICATION-GROUP\" @@ )"` NotificationType *NotificationType `parser:"| ( \"NOTIFICATION-TYPE\" @@ )"` ModuleCompliance *ModuleCompliance `parser:"| ( \"MODULE-COMPLIANCE\" @@ )"` AgentCapabilities *AgentCapabilities `parser:"| ( \"AGENT-CAPABILITIES\" @@ ) )"` Oid *Oid `parser:"Assign \"{\" @@ \"}\" )"` TrapType *TrapType `parser:"| ( ( \"TRAP-TYPE\" @@ )"` SubIdentifier *types.SmiSubId `parser:"Assign @Int ) )"` }
type NotificationGroup ¶
type NotificationGroup struct { Pos lexer.Position Notifications []types.SmiIdentifier `parser:"\"NOTIFICATIONS\" \"{\" @Ident ( \",\" @Ident )* \",\"? \"}\""` // Required Status Status `parser:"\"STATUS\" @( \"current\" | \"deprecated\" | \"obsolete\" )"` // Required Description string `parser:"\"DESCRIPTION\" @Text"` // Required Reference string `parser:"( \"REFERENCE\" @Text )?"` }
type NotificationType ¶
type NotificationType struct { Pos lexer.Position Objects []types.SmiIdentifier `parser:"( \"OBJECTS\" \"{\" @Ident ( \",\" @Ident )* \",\"? \"}\" )?"` Status Status `parser:"\"STATUS\" @( \"current\" | \"deprecated\" | \"obsolete\" )"` // Required Description string `parser:"\"DESCRIPTION\" @Text"` // Required Reference string `parser:"( \"REFERENCE\" @Text )?"` }
type ObjectGroup ¶
type ObjectGroup struct { Pos lexer.Position Objects []types.SmiIdentifier `parser:"\"OBJECTS\" \"{\" @Ident ( \",\" @Ident )* \",\"? \"}\""` // Required Status Status `parser:"\"STATUS\" @( \"current\" | \"deprecated\" | \"obsolete\" )"` // Required Description string `parser:"\"DESCRIPTION\" @Text"` // Required Reference string `parser:"( \"REFERENCE\" @Text )?"` }
type ObjectIdentity ¶
type ObjectType ¶
type ObjectType struct { Pos lexer.Position Syntax Syntax `parser:"\"SYNTAX\" @@"` // Required Units string `parser:"( \"UNITS\" @Text )?"` Access Access `` // Required /* 160-byte string literal not displayed */ Status Status `parser:"\"STATUS\" @( \"mandatory\" | \"optional\" | \"current\" | \"deprecated\" | \"obsolete\" )"` // Required Description string `parser:"( \"DESCRIPTION\" @Text )?"` // Required RFC 1212+ Reference string `parser:"( \"REFERENCE\" @Text )?"` Index []Index `parser:"( ( \"INDEX\" \"{\" @@ ( \",\" @@ )* \",\"? \"}\" )"` // Required for "row" without AUGMENTS Augments *types.SmiIdentifier `parser:"| ( \"AUGMENTS\" \"{\" @Ident \"}\" ) )?"` // Required for "row" without INDEX Defval *string `` /* 155-byte string literal not displayed */ }
type Oid ¶
type Oid struct { Pos lexer.Position SubIdentifiers []SubIdentifier `parser:"@@+"` }
type Sequence ¶
type Sequence struct { Pos lexer.Position Type SequenceType `parser:"@( \"CHOICE\" | \"SEQUENCE\" )"` Entries []SequenceEntry `parser:"\"{\" @@ ( \",\" @@ )* \",\"? \"}\""` }
type SequenceEntry ¶
type SequenceEntry struct { Pos lexer.Position Descriptor types.SmiIdentifier `parser:"@Ident"` Syntax SyntaxType `parser:"@@"` }
type SequenceType ¶
type SequenceType string
const ( SequenceTypeChoice SequenceType = "CHOICE" SequenceTypeSequence SequenceType = "SEQUENCE" )
type SubIdentifier ¶
func (*SubIdentifier) Parse ¶
func (x *SubIdentifier) Parse(lex *lexer.PeekingLexer) error
type Syntax ¶
type Syntax struct { Pos lexer.Position Sequence *types.SmiIdentifier `parser:"( \"SEQUENCE\" \"OF\" @Ident )"` Type *SyntaxType `parser:"| @@"` }
type SyntaxType ¶
type SyntaxType struct { Pos lexer.Position Name types.SmiIdentifier `parser:"@( OctetString | ObjectIdentifier | Ident )"` SubType *SubType `parser:"( ( \"(\" @@ \")\" )"` Enum []NamedNumber `parser:"| ( \"{\" @@ ( \",\" @@ )* \",\"? \"}\" ) )?"` }
type TextualConvention ¶
type TextualConvention struct { Pos lexer.Position DisplayHint string `parser:"( \"DISPLAY-HINT\" @Text )?"` Status Status `parser:"\"STATUS\" @( \"current\" | \"deprecated\" | \"obsolete\" )"` // Required Description string `parser:"\"DESCRIPTION\" @Text"` // Required Reference string `parser:"( \"REFERENCE\" @Text )?"` Syntax SyntaxType `parser:"\"SYNTAX\" @@"` // Required }
type TrapType ¶
type TrapType struct { Pos lexer.Position Enterprise types.SmiIdentifier `parser:"\"ENTERPRISE\" @Ident"` Objects []types.SmiIdentifier `parser:"( \"VARIABLES\" \"{\" @Ident ( \",\" @Ident )* \",\"? \"}\" )?"` Description string `parser:"( \"DESCRIPTION\" @Text )?"` Reference string `parser:"( \"REFERENCE\" @Text )?"` }
type Type ¶
type Type struct { Pos lexer.Position Name types.SmiIdentifier `parser:"@Ident Assign"` TextualConvention *TextualConvention `parser:"( ( \"TEXTUAL-CONVENTION\" @@ )"` Sequence *Sequence `parser:"| @@"` Implicit *Implicit `parser:"| @@"` Syntax *SyntaxType `parser:"| @@ )"` }
Click to show internal directories.
Click to hide internal directories.