Documentation ¶
Index ¶
- Constants
- type Helper
- func (r *Helper) BaseInfo(em string, statusCode int64) responseobjs.BaseInfo
- func (r *Helper) DebugOut(s string, a ...interface{})
- func (r *Helper) Err(msg string, err error)
- func (r *Helper) ErrRespond(msg string, err error, response string)
- func (r *Helper) Fatal(msg string, err error)
- func (r *Helper) GetCallingPlayer() (netobj.Player, error)
- func (r *Helper) GetGameRequest() []byte
- func (r *Helper) InternalErr(msg string, err error)
- func (r *Helper) InternalFatal(msg string, err error)
- func (r *Helper) InvalidRequest()
- func (r *Helper) Out(s string, a ...interface{})
- func (r *Helper) Respond(out []byte)
- func (r *Helper) RespondInsecure(out []byte)
- func (r *Helper) RespondRaw(out []byte, secureFlag, iv string)
- func (r *Helper) SendCompatibleResponse(out interface{}) error
- func (r *Helper) SendInsecureResponse(i interface{}) error
- func (r *Helper) SendResponse(i interface{}) error
- func (r *Helper) Uncatchable(msg string)
- func (r *Helper) Warn(s string, a ...interface{})
- func (r *Helper) WarnErr(msg string, err error)
Constants ¶
View Source
const ( PrefixErr = "ERR" PrefixOut = "OUT" PrefixWarn = "WARN" PrefixUncatchableErr = "UNCATCHABLE ERR" PrefixDebugOut = "DEBUG (OUT)" LogOutBase = "[%s] (%s) %s\n" LogErrBase = "[%s] (%s) %s: %s\n" InternalServerError = "Internal server error" BadRequest = "Bad request" //DefaultIV = "HotAndSunnyMiami" DefaultIV = "FoundDeadInMiami" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Helper ¶
type Helper struct { CallerName string RespW http.ResponseWriter Request *http.Request }
func MakeHelper ¶
func (*Helper) BaseInfo ¶
func (r *Helper) BaseInfo(em string, statusCode int64) responseobjs.BaseInfo
func (*Helper) GetGameRequest ¶
func (*Helper) InternalErr ¶
func (*Helper) InternalFatal ¶
func (*Helper) InvalidRequest ¶
func (r *Helper) InvalidRequest()
func (*Helper) RespondInsecure ¶
func (*Helper) RespondRaw ¶
func (*Helper) SendCompatibleResponse ¶
func (*Helper) SendInsecureResponse ¶
func (*Helper) SendResponse ¶
func (*Helper) Uncatchable ¶
Click to show internal directories.
Click to hide internal directories.