Documentation ¶ Index ¶ Variables type Usecase func New(storage adapters.IStorage, cache adapters.ICache) *Usecase func (u *Usecase) Auth(ctx context.Context, username, password string) error func (u *Usecase) GetOriginalLink(ctx context.Context, shortURL string) (string, error) func (u *Usecase) PutLink(ctx context.Context, username, originalURL string) (string, error) Constants ¶ This section is empty. Variables ¶ View Source var ( ErrNotFound = errors.New("not found") ErrInvalidCredentials = errors.New("invalid credentials") ) Functions ¶ This section is empty. Types ¶ type Usecase ¶ type Usecase struct { Storage adapters.IStorage Cache adapters.ICache } func New ¶ func New(storage adapters.IStorage, cache adapters.ICache) *Usecase func (*Usecase) Auth ¶ func (u *Usecase) Auth(ctx context.Context, username, password string) error func (*Usecase) GetOriginalLink ¶ func (u *Usecase) GetOriginalLink(ctx context.Context, shortURL string) (string, error) func (*Usecase) PutLink ¶ func (u *Usecase) PutLink(ctx context.Context, username, originalURL string) (string, error) Source Files ¶ View all Source files errors.go usecase.go Directories ¶ Show internal Expand all Path Synopsis adapters mock Code generated by MockGen. Code generated by MockGen. Click to show internal directories. Click to hide internal directories.