name

package
v0.0.0-...-ee7ae68 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Name

type Name struct {
	Segments []name_segment.NameSegment `json:"segments"`
}

func CreateFromTLV

func CreateFromTLV(nameTlv codec.TLV) (*Name, error)

func New

func New(segments []name_segment.NameSegment) *Name

func Parse

func Parse(nameString string) (*Name, error)

func (Name) AppendComponent

func (n Name) AppendComponent(component string) (*Name, error)

func (Name) Children

func (n Name) Children() []codec.TLV

func (*Name) DropSuffix

func (n *Name) DropSuffix()

func (Name) IsPrefix

func (n Name) IsPrefix(other *Name) bool

func (Name) Length

func (n Name) Length() uint16

func (Name) Prefix

func (n Name) Prefix(num int) string

func (Name) SegmentStrings

func (n Name) SegmentStrings() []string

func (Name) String

func (n Name) String() string

func (Name) Type

func (n Name) Type() uint16

func (Name) TypeString

func (n Name) TypeString() string

func (Name) Value

func (n Name) Value() []byte

type RegularName

type RegularName struct {
	// contains filtered or unexported fields
}

func CreateFromString

func CreateFromString(name string) (*RegularName, error)

func (RegularName) Accepts

func (r RegularName) Accepts(other *Name) bool

func (RegularName) AppendComponent

func (n RegularName) AppendComponent(component string) (*RegularName, error)

func (*RegularName) DropSuffix

func (n *RegularName) DropSuffix()

func (RegularName) IsPrefix

func (n RegularName) IsPrefix(other *RegularName) bool

func (RegularName) Prefix

func (n RegularName) Prefix(num int) string

func (RegularName) SegmentStrings

func (n RegularName) SegmentStrings() []string

Jump to

Keyboard shortcuts

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