libgemini

package
v0.0.0-...-3f53507 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATUS_INPUT                  = 10
	STATUS_SUCCESS                = 20
	STATUS_SUCCESS_CERT           = 21
	STATUS_REDIRECT_TEMP          = 30
	STATUS_REDIRECT_PERM          = 31
	STATUS_TEMP_FAILURE           = 40
	STATUS_SERVER_UNAVAILABLE     = 41
	STATUS_CGI_ERROR              = 42
	STATUS_PROXY_ERROR            = 43
	STATUS_SLOW_DOWN              = 44
	STATUS_PERM_FAILURE           = 50
	STATUS_NOT_FOUND              = 51
	STATUS_GONE                   = 52
	STATUS_PROXY_REFUSED          = 53
	STATUS_BAD_REQUEST            = 59
	STATUS_CLIENT_CERT_EXPIRED    = 60
	STATUS_TRANSIENT_CERT_REQUEST = 61
	STATUS_AUTH_CERT_REQUIRED     = 62
	STATUS_CERT_REJECTED          = 63
	STATUS_FUTURE_CERT_REJECTED   = 64
	STATUS_EXPIRED_CERT_REJECTED  = 65
)
View Source
const (
	MIME_GEMINI     = "text/gemini"
	DEFAULT_MIME    = MIME_GEMINI
	DEFAULT_CHARSET = "utf-8"
)
View Source
const (
	CRLF = "\r\n"
)

Variables

View Source
var (
	HeaderPattern = regexp.MustCompile("^(\\d\\d)[ \\t]+(.*)$")
	LinkPattern   = regexp.MustCompile("^=>[ \\t]*([^ \\t]+)(?:[ \\t]+(.*))?$")
)

Functions

This section is empty.

Types

type Header struct {
	Status int
	Meta   string
}

func ParseHeader

func ParseHeader(line string) (header *Header, err error)

type Response

type Response struct {
	Header *Header
	Body   io.Reader
}

func Get

func Get(uri string) (*Response, error)

Jump to

Keyboard shortcuts

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