mapper

package
v0.0.0-...-4f7a9cb Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2017 License: MIT Imports: 0 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle []Entry

Bundle - set of entries

func (Bundle) EntryByTLD

func (bundle Bundle) EntryByTLD(TLD string) *Entry

EntryByTLD returns whois data by TLD

type Entry

type Entry struct {
	// TLDs - list of TLDs, which accepted by specified Entry
	TLDs []string

	// Default - use this entry as default for all undefined TLDs
	Default bool

	// a list of fields from "01" to last number "nn" in ascending order
	Fields map[string]Field
}

Entry contains whois data specified for TLDs list

type Field

type Field struct {
	// a label in whois output
	Key string

	// used if a field has constant value
	Value []string

	// a name of the field in the database, if "value" is not defined
	Name []string

	// special instructions to indicate how to display the field
	Format string

	// if this option is set to 'true', each value will be repeated in whois output with the same label
	Multiple bool

	// if this option is set to 'true', a value of the field will not shown in whois output
	Hide bool

	// a name of the field in a database through which a request for
	Related string

	// a name of the field in a database through which related a request for
	RelatedBy string

	// a name of the table/type in a database through which made a relation
	RelatedTo string

	// it contains the number of field that replaces this field.
	// If the field is referenced by "replacedBy" has non-empty value,
	// then this field will not show in whois output, because this field
	// should be replaced by the field specified in 'ReplacedBy'
	ReplacedBy string
}

Field - representation of one field

Jump to

Keyboard shortcuts

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