Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIController ¶
type APIController struct {
// contains filtered or unexported fields
}
APIController is REST API controller
func NewAPIController ¶
func NewAPIController(u *usecase.Usecase) *APIController
newAPIController constructs APIController with Usecase
func (*APIController) CatchAll ¶
func (c *APIController) CatchAll(w http.ResponseWriter, r *http.Request)
func (*APIController) CreateShortcut ¶
func (c *APIController) CreateShortcut(w http.ResponseWriter, r *http.Request)
func (*APIController) RegisterRoute ¶
func (c *APIController) RegisterRoute(r *mux.Router)
type Config ¶
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
type JSONResponseWriter ¶
type JSONResponseWriter struct {
// contains filtered or unexported fields
}
func (JSONResponseWriter) Header ¶
func (w JSONResponseWriter) Header() http.Header
func (JSONResponseWriter) WriteBody ¶
func (w JSONResponseWriter) WriteBody(body interface{}) error
func (JSONResponseWriter) WriteError ¶
func (w JSONResponseWriter) WriteError(statusCode int, err error) error
func (JSONResponseWriter) WriteHeader ¶
func (w JSONResponseWriter) WriteHeader(statusCode int)
type ShortcutController ¶
type ShortcutController struct {
// contains filtered or unexported fields
}
ShortcutController is default controller
func NewShortcutController ¶
func NewShortcutController(u *usecase.Usecase) *ShortcutController
NewShortcutController constructs ShortcutController with Usecase
func (*ShortcutController) CatchAll ¶
func (c *ShortcutController) CatchAll(w http.ResponseWriter, r *http.Request)
func (*ShortcutController) GetShortcut ¶
func (c *ShortcutController) GetShortcut(w http.ResponseWriter, r *http.Request)
func (*ShortcutController) RegisterRoute ¶
func (c *ShortcutController) RegisterRoute(r *mux.Router)
Click to show internal directories.
Click to hide internal directories.