Discover Packages
github.com/enaeseth/asciist
service
package
Version:
v0.0.0-...-d09d7ef
Opens a new window with list of versions in this module.
Published: Mar 12, 2017
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package service provides the asciist HTTP service.
New creates an instance of the asciist service.
func SetDebug(debug bool )
SetDebug enables or disables the debug mode of the underlying HTTP framework.
Call SetDebug before creating an instance of the service with New.
type Failure struct {
Error string `json:"error"`
}
Failure is the shape of a failed ASCII art conversion response
(indicated with an HTTP status ≥ 400 and an application/json Content-Type).
Note that internal server errors or gateway errors may result in clients
seeing non-JSON responses or JSON responses not matching this shape.
type Request struct {
Width uint `json:"width"`
Image []byte `json:"image"`
}
Request is the shape of an ASCII art conversion request.
(Note that encoding/json will automatically base64-encode Image).
type Success struct {
Art string `json:"art"`
}
Success is the shape of a successful ASCII art conversion response
(indicated with a 200 OK status).
Source Files
¶
Click to show internal directories.
Click to hide internal directories.