Documentation
¶
Index ¶
Constants ¶
View Source
const (
ApiUrlFormat = "http://%s%s/%s?%s"
ApiPath = "/api/v0" // TODO: make configurable
)
Variables ¶
View Source
var ErrNotFound = errors.New("404 page not found")
Functions ¶
Types ¶
type Client ¶
type Client interface {
Send(req cmds.Request) (cmds.Response, error)
}
Client is the commands HTTP client interface.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(ctx cmds.Context, root *cmds.Command, origin string) *Handler
type MultiFileReader ¶
type MultiFileReader struct {
io.Reader
// contains filtered or unexported fields
}
MultiFileReader reads from a `commands.File` (which can be a directory of files or a regular file) as HTTP multipart encoded data.
func NewMultiFileReader ¶
func NewMultiFileReader(file files.File, form bool) *MultiFileReader
NewMultiFileReader constructs a MultiFileReader. `file` can be any `commands.File`. If `form` is set to true, the multipart data will have a Content-Type of 'multipart/form-data', if `form` is false, the Content-Type will be 'multipart/mixed'.
Click to show internal directories.
Click to hide internal directories.