Documentation ¶
Index ¶
Constants ¶
View Source
const SHortUrlCollection = "short_urls"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultKeyCreator ¶
type DefaultKeyCreator struct {
// contains filtered or unexported fields
}
func NewDefaultKeyCreator ¶
func NewDefaultKeyCreator() *DefaultKeyCreator
type KeyCreator ¶
type ShortUrl ¶
type ShortUrl struct { ddd.EntityBase[string] `bson:",inline"` Url string `bson:"url"` Key string `bson:"key"` }
type ShortUrlInput ¶
type ShortUrlInput struct {
Url string `json:"url" binding:"required"`
}
type ShortUrlOutput ¶
type ShortUrlOutput struct {
Key string `json:"key"`
}
type ShortUrlRepository ¶
type ShortUrlRepository interface { ddd.RepositoryBase[ShortUrl, string] GetUrl(ctx context.Context, key string) (*ShortUrl, error) }
func NewMongoRepository ¶
func NewMongoRepository() *ShortUrlRepository
Click to show internal directories.
Click to hide internal directories.