Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App interface {
Run() error
}
App is an interface that defines the methods that an app should implement.
type CreateShortURLRequest ¶
type CreateShortURLRequest struct {
LongURL string `json:"long_url"`
}
func (*CreateShortURLRequest) Validate ¶
func (r *CreateShortURLRequest) Validate() error
type CreateShortURLResponse ¶
type CreateShortURLResponse struct {
ShortURL string `json:"short_url"`
}
type GetStatsRequest ¶
type GetStatsRequest string
func (*GetStatsRequest) Validate ¶
func (r *GetStatsRequest) Validate() error
type GetStatsResponse ¶
type RESTApp ¶
type RESTApp struct {
// contains filtered or unexported fields
}
RESTApp is an app that implements the App interface.
func (*RESTApp) RegisterRoutes ¶
func (app *RESTApp) RegisterRoutes()
type RedirectToLongURLRequest ¶
type RedirectToLongURLRequest string
func (*RedirectToLongURLRequest) Validate ¶
func (r *RedirectToLongURLRequest) Validate() error
Click to show internal directories.
Click to hide internal directories.