Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NewLinkOption ¶ added in v0.1.1
func WithShortURL ¶ added in v0.1.1
func WithShortURL(want string) NewLinkOption
func WithTTL ¶ added in v0.1.1
func WithTTL(ttl time.Duration) NewLinkOption
type Service ¶
type Service interface {
NewLink(string, ...NewLinkOption) (model.Link, error)
ShortURLToLink(string) (model.Link, error)
}
Service defines the interface exposed by this package.
type ServiceOption ¶ added in v0.1.1
type ServiceOption func(*svc) error
func WithBasicStorage ¶ added in v0.1.1
func WithBasicStorage() ServiceOption
func WithRedisStorage ¶ added in v0.1.1
func WithRedisStorage() ServiceOption
Click to show internal directories.
Click to hide internal directories.