Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Channels ¶
type Channels struct {
// contains filtered or unexported fields
}
func NewChannels ¶
func (*Channels) CreateChannel ¶
func (ctrl *Channels) CreateChannel(payload *payloads.CreateChannel) ControllerFunc
CreateChannel creates a new channel.
func (*Channels) GetChannel ¶
func (ctrl *Channels) GetChannel(id int) ControllerFunc
GetChannel finds a single channel by its ID.
type ControllerFunc ¶
ControllerFunc is the execution API that any function called in a route must conform to. It executes, then returns a response that can be handled.
type FoxContext ¶
FoxContext is a wrapper around echo.Context that eases error handling, provides helper methods, and ensures we have consistent response handling.
func NewFoxContext ¶
func NewFoxContext(c echo.Context) *FoxContext
NewFoxContext creates a new FoxContext from an existing echo.Context.
func (*FoxContext) BindJSON ¶
func (fc *FoxContext) BindJSON(payload payloads.Payload)
BindJSON grabs the JSON payload and unmarshals it into the interface provided.
func (*FoxContext) ParamInt ¶
func (fc *FoxContext) ParamInt(name string) int
ParamInt parses an integer from the parameters list (as defined by the URI).
func (*FoxContext) ParamString ¶
func (fc *FoxContext) ParamString(name string) string
ParamString parses an string from the parameters list (as defined by the URI).
func (*FoxContext) Run ¶
func (fc *FoxContext) Run(ctrlFn ControllerFunc) error
Run executes the primary controller method and returns the response.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) GET ¶
func (r *Router) GET(uri string, rf RouterFunc)
func (*Router) POST ¶
func (r *Router) POST(uri string, rf RouterFunc)
type RouterFunc ¶
type RouterFunc func(fc *FoxContext) error