Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InSmartphoneMode ¶
func InSmartphoneMode() bool
InSmartphoneMode returns whether the css selector used for enabling smartphone UI currently matches.
func LogGrouped ¶
LogGrouped write the given message with the given loglevel to the console. It appends the content at the same level inside a group, each content item logged separately. group is initially collapsed when collapsed=true.
Types ¶
type RequestMethod ¶
type RequestMethod int
RequestMethod is an enum of known methods for Fetch.
const ( // Get is a GET request Get RequestMethod = iota // Post is a POST request Post // Put is a PUT request Put // Delete is a DELETE request Delete )
func (RequestMethod) String ¶
func (r RequestMethod) String() string
type Server ¶
type Server interface { // gives access to the server's context. server.Context // Fetch sends an HTTP request to the server with the given method and given // payload, at the path created from joining a base path with the given // subpath. The result JSON is deserialized into the given target. // // The base path is defined by the ServerState implementation. // subpath must be relative and may not begin with a slash. It may be empty. // If it is not empty, it will be joined with the base path using a slash. Fetch(method RequestMethod, subpath string, payload interface{}, target interface{}) }
Server is the web UI's interface to the server's state.
Click to show internal directories.
Click to hide internal directories.