Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRedirectNotFound = errors.New("Redirect Not Found") ErrRedirectInvalid = errors.New("Redirect Invalid") )
Functions ¶
This section is empty.
Types ¶
type Redirect ¶
type Redirect struct { Code string `json:"code" bson:"code" msgpack:"code"` URL string `json:"url" bson:"url" msgpack:"url" validate:"empty=false & format=url"` CreatedAt int64 `json:"created_at" bson:"created_at" msgpack:"created_at"` }
Redirect represents a item of database which contains redirect data
type RedirectRepository ¶
type RedirectSerializer ¶
type RedirectService ¶
type RedirectService interface { Find(code string) (*Redirect, error) Store(redirect *Redirect) error }
func NewRedirectService ¶
func NewRedirectService(redirectRepo RedirectRepository) RedirectService
Click to show internal directories.
Click to hide internal directories.