Documentation ¶
Index ¶
- Constants
- Variables
- type Handler
- func (f *Handler) GetTemplatesFuncMap(conn *ttconn.Connection) (tplFunc map[string]interface{}, err error)
- func (f *Handler) MaxQueryBytes() int
- func (f *Handler) ParseData(conn *ttconn.Connection, inbuf []byte) (route string, extraData interface{}, err error)
- func (f *Handler) PostProcess(conn *ttconn.Connection, route string, extraData interface{}, ...) (output interface{}, err error)
- func (f *Handler) Process(conn *ttconn.Connection, route string, extraData interface{}, ...) (output interface{}, err error)
- func (f *Handler) Read(conn *ttconn.Connection) ([]byte, error)
- func (f *Handler) RegisterPrometheusMetrics() error
- func (f *Handler) ServeConn(conn *ttconn.Connection) error
- func (f *Handler) ServeCrontab(conn *ttconn.Connection, route string, routeExtraData interface{}) error
- func (f *Handler) Write(conn *ttconn.Connection, output interface{}) (n int64, err error)
- type Query
Constants ¶
View Source
const ( TEXT = gopherItemType('0') // Plain text file MENU = gopherItemType('1') // Gopher submenu PHONEBOOK = gopherItemType('2') // CCSO flat database; other databases ERROR = gopherItemType('3') // Error message BINHEX = gopherItemType('4') // Macintosh BinHex file ARCHIVE = gopherItemType('5') // Archive file (zip, tar, gzip, etc) UUENCODED = gopherItemType('6') // UUEncoded file INDEX = gopherItemType('7') // Search query TELNET = gopherItemType('8') // Telnet session BINARY = gopherItemType('9') // Binary file GIF = gopherItemType('g') // GIF format graphics file IMAGE = gopherItemType('I') // Image file DOC = gopherItemType('d') // Word processing document (ps, pdf, doc, etc) AUDIO = gopherItemType('s') // Sound file VIDEO = gopherItemType(';') // Video file HTML = gopherItemType('h') // HTML document INFO = gopherItemType('i') // Info line REDUNDANT = gopherItemType('+') // Redundant server TN3270 = gopherItemType('T') // Telnet to: tn3270 series server MIME = gopherItemType('M') // MIME file (mbox, emails, etc) CALENDAR = gopherItemType('c') // Calendar file )
Variables ¶
View Source
var TYPES_REGEXP = regexp.MustCompile(`^([0123456789gIds;hi+TMc])(.*?\s+)(((URL|TITLE):.*?)\s+)?([\w\d_\-.]+\s+\d+)$`)
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct{}
func (*Handler) GetTemplatesFuncMap ¶
func (f *Handler) GetTemplatesFuncMap(conn *ttconn.Connection) (tplFunc map[string]interface{}, err error)
func (*Handler) MaxQueryBytes ¶
func (*Handler) PostProcess ¶
func (f *Handler) PostProcess(conn *ttconn.Connection, route string, extraData interface{}, input interface{}) (output interface{}, err error)
func (*Handler) RegisterPrometheusMetrics ¶
func (*Handler) ServeCrontab ¶
func (f *Handler) ServeCrontab(conn *ttconn.Connection, route string, routeExtraData interface{}) error
Click to show internal directories.
Click to hide internal directories.