Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ASCII = []string{" d8b",
" ?88",
" 88b",
" 888 d88' d888b8b ?88,.d88b,?88,.d88b, d888b8b",
" 888bd8P' d8P' ?88 ?88' ?88 ?88' ?88d8P' ?88",
" d88888b 88b ,88b 88b d8P 88b d8P88b ,88b",
" d88' ?88b, ?88P' 88b 888888P' 888888P' ?88P' 88b",
" 88P' 88P'",
" d88 d88",
" ?8P ?8P"}
View Source
var DefaultColorCodes = ColorCodes{ Black: []byte{keyEscape, '[', '3', '0', 'm'}, Red: []byte{keyEscape, '[', '3', '1', 'm'}, Green: []byte{keyEscape, '[', '3', '2', 'm'}, Yellow: []byte{keyEscape, '[', '3', '3', 'm'}, Blue: []byte{keyEscape, '[', '3', '4', 'm'}, Magenta: []byte{keyEscape, '[', '3', '5', 'm'}, Cyan: []byte{keyEscape, '[', '3', '6', 'm'}, White: []byte{keyEscape, '[', '3', '7', 'm'}, LightGrey: []byte{keyEscape, '[', '9', '0', 'm'}, LightRed: []byte{keyEscape, '[', '9', '1', 'm'}, LightGreen: []byte{keyEscape, '[', '9', '2', 'm'}, LightYellow: []byte{keyEscape, '[', '9', '3', 'm'}, LightBlue: []byte{keyEscape, '[', '9', '4', 'm'}, LightMagenta: []byte{keyEscape, '[', '9', '5', 'm'}, LightCyan: []byte{keyEscape, '[', '9', '6', 'm'}, LightWhite: []byte{keyEscape, '[', '9', '7', 'm'}, Reset: []byte{keyEscape, '[', '0', 'm'}, }
ANSI colors
Functions ¶
This section is empty.
Types ¶
type ColorCodes ¶
type ResponseWriter ¶
type ResponseWriter struct { Colors ColorCodes Writer io.Writer }
ResponseWriter writes data and status codes to the client
func (*ResponseWriter) Fail ¶
func (r *ResponseWriter) Fail(code StatusCode, format string, args ...interface{})
Fail writes the error status code to the Writer
func (*ResponseWriter) Success ¶
func (r *ResponseWriter) Success(code StatusCode, format string, args ...interface{})
Success writes the status code to the Writer
type StatusCode ¶
type StatusCode int
const ( OK StatusCode = iota + 2000 NamespaceAlreadyExists UserAlreadyExists )
Success codes
const ( InternalServerError StatusCode = iota + 5000 InvalidStatementType NamespaceDoesNotExist UserDoesNotExist CreateNamespaceError )
Error codes
const (
)Authentication related error codes
Click to show internal directories.
Click to hide internal directories.