Documentation ¶
Index ¶
- type Base
- func (h *Base) BeginHandler(r *http.Request) (*ContextData, error)
- func (h *Base) DebugStruct(msg string, rec interface{})
- func (h *Base) DecodeRequest(r *http.Request, s interface{}) error
- func (h *Base) Delete(w http.ResponseWriter, r *http.Request)
- func (h *Base) DeleteCollection(w http.ResponseWriter, r *http.Request)
- func (h *Base) EndHandler(ctx *ContextData, success bool) error
- func (h *Base) Get(w http.ResponseWriter, r *http.Request)
- func (h *Base) GetCollection(w http.ResponseWriter, r *http.Request)
- func (h *Base) GetCollectionPath() string
- func (h *Base) GetContextData(r *http.Request) (*ContextData, error)
- func (h *Base) GetLogger() zerolog.Logger
- func (h *Base) GetName() string
- func (h *Base) GetPath() string
- func (h *Base) GetRequestData(r *http.Request, rd interface{}) (Params, []error)
- func (h *Base) GetVersioned() bool
- func (h *Base) Init() error
- func (h *Base) Options(w http.ResponseWriter, r *http.Request)
- func (h *Base) Post(w http.ResponseWriter, r *http.Request)
- func (h *Base) Put(w http.ResponseWriter, r *http.Request)
- func (h *Base) PutCollection(w http.ResponseWriter, r *http.Request)
- func (h *Base) RequiresAuthentication() bool
- func (h *Base) RequiresAuthorization() bool
- func (h *Base) SendErrorResponse(w http.ResponseWriter, ctx *ContextData, errs []error)
- func (h *Base) SendResponse(w http.ResponseWriter, ctx *ContextData, data interface{}) error
- func (h *Base) SendSystemErrorResponse(w http.ResponseWriter, ctx *ContextData, err error)
- func (h *Base) Validate(str interface{}) (errs []error)
- func (h *Base) ValidateParams(r *http.Request) (params Params, errs []error)
- type ContextData
- type ErrorData
- type ErrorResponse
- type Handler
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { Name string Path string CollectionPath string Unauthenticated bool Versioned bool Env env.Env Logger zerolog.Logger Database *sqlx.DB RepoStore *repostore.RepoStore ValidationError error // models TemplateModel *template.Model AppModel *app.Model AppAttributeModel *attribute.Model AppEffectModel *effect.Model AppEntityModel *entity.Model AppEntityGroupModel *entitygroup.Model AppFightModel *fight.Model AppItemModel *item.Model AppSkillModel *skill.Model }
Base -
func (*Base) BeginHandler ¶
func (h *Base) BeginHandler(r *http.Request) (*ContextData, error)
BeginHandler -
func (*Base) DecodeRequest ¶
DecodeRequest -
func (*Base) DeleteCollection ¶
func (h *Base) DeleteCollection(w http.ResponseWriter, r *http.Request)
DeleteCollection -
func (*Base) EndHandler ¶
func (h *Base) EndHandler(ctx *ContextData, success bool) error
EndHandler -
func (*Base) GetCollection ¶
func (h *Base) GetCollection(w http.ResponseWriter, r *http.Request)
GetCollection -
func (*Base) GetCollectionPath ¶
GetCollectionPath - Returns configured resource collection path
func (*Base) GetContextData ¶
func (h *Base) GetContextData(r *http.Request) (*ContextData, error)
GetContextData -
func (*Base) GetRequestData ¶
GetRequestData -
func (*Base) PutCollection ¶
func (h *Base) PutCollection(w http.ResponseWriter, r *http.Request)
PutCollection -
func (*Base) RequiresAuthentication ¶
RequiresAuthentication -
func (*Base) RequiresAuthorization ¶
RequiresAuthorization -
func (*Base) SendErrorResponse ¶
func (h *Base) SendErrorResponse(w http.ResponseWriter, ctx *ContextData, errs []error)
SendErrorResponse -
func (*Base) SendResponse ¶
func (h *Base) SendResponse(w http.ResponseWriter, ctx *ContextData, data interface{}) error
SendResponse -
func (*Base) SendSystemErrorResponse ¶
func (h *Base) SendSystemErrorResponse(w http.ResponseWriter, ctx *ContextData, err error)
SendSystemErrorResponse -
type ErrorResponse ¶
type ErrorResponse struct {
Errors []ErrorData `json:"errors"`
}
ErrorResponse -
type Handler ¶
type Handler interface { Get(w http.ResponseWriter, r *http.Request) Post(w http.ResponseWriter, r *http.Request) Put(w http.ResponseWriter, r *http.Request) Delete(w http.ResponseWriter, r *http.Request) GetCollection(w http.ResponseWriter, r *http.Request) PutCollection(w http.ResponseWriter, r *http.Request) DeleteCollection(w http.ResponseWriter, r *http.Request) GetName() string GetPath() string GetCollectionPath() string RequiresAuthentication() bool RequiresAuthorization() bool GetVersioned() bool GetLogger() zerolog.Logger DecodeRequest(r *http.Request, s interface{}) error }
Handler -
Directories ¶
Path | Synopsis |
---|---|
Package app -
|
Package app - |
Package appattribute provides handlers for REST methods allowing web clients to manage appattributes
|
Package appattribute provides handlers for REST methods allowing web clients to manage appattributes |
Package appeffect provides handlers for REST methods allowing web clients to manage appeffects
|
Package appeffect provides handlers for REST methods allowing web clients to manage appeffects |
Package appeffectattribute provides handlers for REST methods allowing web clients to manage appentityitems
|
Package appeffectattribute provides handlers for REST methods allowing web clients to manage appentityitems |
Package appentity -
|
Package appentity - |
Package appentityattribute provides handlers for REST methods allowing web clients to manage appentityattributes
|
Package appentityattribute provides handlers for REST methods allowing web clients to manage appentityattributes |
Package appentitygroup -
|
Package appentitygroup - |
Package appentitygroupmember provides handlers for REST methods allowing web clients to manage appentitygroupmembers
|
Package appentitygroupmember provides handlers for REST methods allowing web clients to manage appentitygroupmembers |
Package appentityitem provides handlers for REST methods allowing web clients to manage appentityitems
|
Package appentityitem provides handlers for REST methods allowing web clients to manage appentityitems |
Package appentityskill provides handlers for REST methods allowing web clients to manage appentityskills
|
Package appentityskill provides handlers for REST methods allowing web clients to manage appentityskills |
Package appentitytactic provides handlers for REST methods allowing web clients to manage appentitytactics
|
Package appentitytactic provides handlers for REST methods allowing web clients to manage appentitytactics |
Package appfight provides handlers for REST methods allowing web clients to manage
|
Package appfight provides handlers for REST methods allowing web clients to manage |
Package appfightentitygroup provides handlers for REST methods allowing web clients to manage appfightentitygroups
|
Package appfightentitygroup provides handlers for REST methods allowing web clients to manage appfightentitygroups |
Package appfightinstance - REST API handlers
|
Package appfightinstance - REST API handlers |
Package appfightinstanceturn - REST API handlers
|
Package appfightinstanceturn - REST API handlers |
Package appitem provides handlers for REST methods allowing web clients to manage appitems
|
Package appitem provides handlers for REST methods allowing web clients to manage appitems |
Package appitemeffect provides handlers for REST methods allowing web clients to manage appitemeffects
|
Package appitemeffect provides handlers for REST methods allowing web clients to manage appitemeffects |
Package appskill provides handlers for REST methods allowing web clients to manage appskills
|
Package appskill provides handlers for REST methods allowing web clients to manage appskills |
Package appskilleffect provides handlers for REST methods allowing web clients to manage appskilleffects
|
Package appskilleffect provides handlers for REST methods allowing web clients to manage appskilleffects |
Package doc serves content from the ./www/doc directory
|
Package doc serves content from the ./www/doc directory |
Package template provides handlers for REST methods allowing web clients to manage templates
|
Package template provides handlers for REST methods allowing web clients to manage templates |
Click to show internal directories.
Click to hide internal directories.