Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeMime ¶
DeMime takes a Gemini response as a string and removes the mime header from it, returning what's left.
func LooksLikeLink ¶
LooksLikeLink returns whether a line looks like it could be turned into a Link.
func LooksLikeRedirect ¶
LooksLikeRedirect returns whether or not a raw response matches the format of a redirect.
Types ¶
type Index ¶
Index is a set of Lines mapped to ints representing line numbers.
type Link ¶
Link holds a name and a gemini Request to represent a Gemini link line.
type Request ¶
Request extends url.URL to handle gemini requests, etc.
func BuildRequest ¶
BuildRequest wraps url.Parse to parse a url string to produce a gemini Request.
func ParseRedirect ¶
ParseRedirect returns a request from a raw response.
type Response ¶
Response contains the various parts of a response from a Gemini server.
func Fetch ¶
Fetch builds a request from a URI, then handles it and produces a Response; basically wraps all of this together more neatly.
func NewResponse ¶
NewResponse takes a server byte-slice response and produces a Response (sin Request).
func (Response) FollowLink ¶
Response.FollowLink returns a Response from an int corresponding to a link number in the current Response.