Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ // contains filtered or unexported fields }
Functions ¶
func WithClient ¶
func WithDefaultClient ¶
func WithDefaultClient() func(*Config)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type CreateLink ¶
type CreateLink struct {
TargetURL string `json:"targetUrl" validate:"required,http_url"` // Target link to shorten
}
type GetLinkResponse ¶
type GetLinkResponse struct {
Link Link `json:"link"`
}
type GetStatsResponse ¶
type GetStatsResponse struct {
Stats Stats `json:"stats"`
}
type Link ¶
type Link struct { ID string `json:"id"` // ID TargetURL string `json:"targetUrl" format:"uri"` // Target link URL string `json:"url" format:"uri"` // Short link CreatedAt time.Time `json:"createdAt" format:"date-time"` // Created at ValidUntil time.Time `json:"validUntil" format:"date-time"` // Valid until }
type PostLinksRequest ¶
type PostLinksRequest struct {
Link CreateLink `json:"link"`
}
type PostLinksResponse ¶
type PostLinksResponse struct {
Link Link `json:"link"`
}
Click to show internal directories.
Click to hide internal directories.