Documentation ¶
Overview ¶
Package dictionary parses FreeRADIUS dictionary files.
API is currently unstable.
Index ¶
- Constants
- func SortAttributes(attrs []*Attribute)
- func SortValues(values []*Value)
- func SortVendors(vendors []*Vendor)
- type Attribute
- type AttributeType
- type AttributesOIDMap
- type BeginVendorIncludeError
- type BoolFlag
- type Dictionary
- type DuplicateAttributeError
- type DuplicateAttributeFlagError
- type DuplicateVendorError
- type File
- type FileSystemOpener
- type IntFlag
- type InvalidAttributeEncryptTypeError
- type InvalidEndVendorError
- type InvalidOIDError
- type InvalidVendorFormatError
- type NestedVendorBlockError
- type OID
- type Opener
- type ParseError
- type Parser
- type RecursiveIncludeError
- type UnclosedVendorBlockError
- type UnknownAttributeFlagError
- type UnknownAttributeTypeError
- type UnknownLineError
- type UnknownVendorError
- type UnmatchedEndVendorError
- type Value
- type Vendor
Constants ¶
View Source
const ( EncryptUserPassword = 1 EncryptTunnelPassword = 2 )
Variables ¶
This section is empty.
Functions ¶
func SortAttributes ¶
func SortAttributes(attrs []*Attribute)
func SortValues ¶
func SortValues(values []*Value)
func SortVendors ¶
func SortVendors(vendors []*Vendor)
Types ¶
type Attribute ¶
type Attribute struct { Name string OID OID Type AttributeType Size IntFlag FlagEncrypt IntFlag FlagHasTag BoolFlag FlagConcat BoolFlag }
func AttributeByName ¶
func AttributeByOID ¶
func (*Attribute) MostlyEquals ¶
type AttributeType ¶
type AttributeType int
const ( AttributeString AttributeType = iota + 1 AttributeOctets AttributeIPAddr AttributeDate AttributeInteger AttributeIPv6Addr AttributeIPv6Prefix AttributeIFID AttributeInteger64 AttributeVSA AttributeEther AttributeABinary AttributeByte AttributeShort AttributeSigned AttributeTLV AttributeIPv4Prefix )
func (AttributeType) String ¶
func (t AttributeType) String() string
type AttributesOIDMap ¶
type AttributesOIDMap struct { Attribute *Attribute Map map[int]*AttributesOIDMap }
type BeginVendorIncludeError ¶
type BeginVendorIncludeError struct { }
func (*BeginVendorIncludeError) Error ¶
func (e *BeginVendorIncludeError) Error() string
type Dictionary ¶
type Dictionary struct { AttributesByOID AttributesOIDMap Attributes []*Attribute Values []*Value Vendors []*Vendor VendorByName map[string]*Vendor VendorByNumber map[uint]*Vendor }
func Merge ¶
func Merge(d1, d2 *Dictionary) (*Dictionary, error)
func (*Dictionary) GetAttributeByOID ¶
func (d *Dictionary) GetAttributeByOID(oid OID) *Attribute
func (*Dictionary) GetVendorByName ¶
func (d *Dictionary) GetVendorByName(name string) *Vendor
func (*Dictionary) GetVendorByNumber ¶
func (d *Dictionary) GetVendorByNumber(num uint) *Vendor
func (*Dictionary) GoString ¶
func (d *Dictionary) GoString() string
type DuplicateAttributeError ¶
type DuplicateAttributeError struct {
Attribute *Attribute
}
func (*DuplicateAttributeError) Error ¶
func (e *DuplicateAttributeError) Error() string
type DuplicateAttributeFlagError ¶
type DuplicateAttributeFlagError struct {
Flag string
}
func (*DuplicateAttributeFlagError) Error ¶
func (e *DuplicateAttributeFlagError) Error() string
type DuplicateVendorError ¶
type DuplicateVendorError struct {
Vendor *Vendor
}
func (*DuplicateVendorError) Error ¶
func (e *DuplicateVendorError) Error() string
type FileSystemOpener ¶
type FileSystemOpener struct {
Root string
}
type InvalidAttributeEncryptTypeError ¶
type InvalidAttributeEncryptTypeError struct {
Type string
}
func (*InvalidAttributeEncryptTypeError) Error ¶
func (e *InvalidAttributeEncryptTypeError) Error() string
type InvalidEndVendorError ¶
type InvalidEndVendorError struct {
Vendor string
}
func (*InvalidEndVendorError) Error ¶
func (e *InvalidEndVendorError) Error() string
type InvalidOIDError ¶
type InvalidOIDError struct {
OID string
}
func (*InvalidOIDError) Error ¶
func (e *InvalidOIDError) Error() string
type InvalidVendorFormatError ¶
type InvalidVendorFormatError struct {
Format string
}
func (*InvalidVendorFormatError) Error ¶
func (e *InvalidVendorFormatError) Error() string
type NestedVendorBlockError ¶
type NestedVendorBlockError struct { }
func (*NestedVendorBlockError) Error ¶
func (e *NestedVendorBlockError) Error() string
type ParseError ¶
func (*ParseError) Error ¶
func (e *ParseError) Error() string
type Parser ¶
type RecursiveIncludeError ¶
type RecursiveIncludeError struct {
Filename string
}
func (*RecursiveIncludeError) Error ¶
func (e *RecursiveIncludeError) Error() string
type UnclosedVendorBlockError ¶
type UnclosedVendorBlockError struct { }
func (*UnclosedVendorBlockError) Error ¶
func (e *UnclosedVendorBlockError) Error() string
type UnknownAttributeFlagError ¶
type UnknownAttributeFlagError struct {
Flag string
}
func (*UnknownAttributeFlagError) Error ¶
func (e *UnknownAttributeFlagError) Error() string
type UnknownAttributeTypeError ¶
type UnknownAttributeTypeError struct {
Type string
}
func (*UnknownAttributeTypeError) Error ¶
func (e *UnknownAttributeTypeError) Error() string
type UnknownLineError ¶
type UnknownLineError struct {
Line string
}
func (*UnknownLineError) Error ¶
func (e *UnknownLineError) Error() string
type UnknownVendorError ¶
type UnknownVendorError struct {
Vendor string
}
func (*UnknownVendorError) Error ¶
func (e *UnknownVendorError) Error() string
type UnmatchedEndVendorError ¶
type UnmatchedEndVendorError struct { }
func (*UnmatchedEndVendorError) Error ¶
func (e *UnmatchedEndVendorError) Error() string
type Value ¶
func ValuesByAttribute ¶
type Vendor ¶
type Vendor struct { Name string Number uint TypeOctets *int LengthOctets *int AttributesByOID AttributesOIDMap Attributes []*Attribute Values []*Value }
func VendorByName ¶
func VendorByNumber ¶
func (*Vendor) GetAttributeByOID ¶
func (*Vendor) GetLengthOctets ¶
func (*Vendor) GetTypeOctets ¶
Click to show internal directories.
Click to hide internal directories.