Documentation ¶
Overview ¶
Package render generates HTML pages listing edits.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenFile ¶
OpenFile writes an HTML page containing edits to a temporary file and opens it in a browser.
func OpenHTTP ¶
OpenHTTP starts a local HTTP server at addr and opens an HTML page containing edits in a browser. This is fairly complicated but it can be convenient if the browser doesn't have direct filesystem access (e.g. the server is running in a Chrome OS VM), and I think that a fixed host:port may be needed in order to permanently tell Chrome to avoid blocking popups.
Types ¶
type EditInfo ¶
type EditInfo struct { Desc string `json:"desc"` URL string `json:"url"` // includes params iff GET Params []paramInfo `json:"params"` // includes params iff POST }
EditInfo is a version of seed.Edit used in HTML pages. It's used both for passing edits to pageTmpl in CLI mode and for returning edits via XHRs when running in server mode.
func NewEditInfo ¶
NewEditInfo converts a seed.Edit into an EditInfo struct.
type Option ¶
type Option func(*config)
Option can be passed to configure the page.
func ServerURL ¶
ServerURL sets the base MusicBrainz server URL, e.g. "https://musicbrainz.org" or "https://test.musicbrainz.org".