Documentation ¶
Index ¶
Constants ¶
View Source
const ( FILE = ItemType('0') // Item is a file DIRECTORY = ItemType('1') // Item is a directory PHONEBOOK = ItemType('2') // Item is a CSO phone-book server ERROR = ItemType('3') // Error BINHEX = ItemType('4') // Item is a BinHexed Macintosh file. DOSARCHIVE = ItemType('5') // Item is DOS binary archive of some sort. (*) UUENCODED = ItemType('6') // Item is a UNIX uuencoded file. INDEXSEARCH = ItemType('7') // Item is an Index-Search server. TELNET = ItemType('8') // Item points to a text-based telnet session. BINARY = ItemType('9') // Item is a binary file! (*) REDUNDANT = ItemType('+') // Item is a redundant server TN3270 = ItemType('T') // Item points to a text-based tn3270 session. GIF = ItemType('g') // Item is a GIF format graphics file. IMAGE = ItemType('I') // Item is some kind of image file. // non-standard INFO = ItemType('i') // Item is an informational message HTML = ItemType('h') // Item is a HTML document AUDIO = ItemType('s') // Item is an Audio file PNG = ItemType('p') // Item is a PNG Image DOC = ItemType('d') // Item is a Document )
Item Types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directory ¶
type Directory struct {
Items []*Item `json:"items"`
}
Directory representes a Gopher Menu of Items
type Item ¶
type Item struct { Type ItemType `json:"type"` Description string `json:"description"` Selector string `json:"selector"` Host string `json:"host"` Port string `json:"port"` // non-standard extensions (ignored by standard clients) Extras []string `json:"extras"` }
Item describes an entry in a directory listing.
func ParseItem ¶
ParseItem parses a line of text into an item
func (*Item) FetchDirectory ¶
FetchDirectory fetches directory information, not data. Calling this on an Item whose type is not DIRECTORY will return an error.
type Response ¶
Response represents a Gopher resource that Items contains a non-empty array of Item(s) for directory types, otherwise the Body contains the fetched resource (file, image, etc).
Click to show internal directories.
Click to hide internal directories.