usecase

package
v0.0.0-...-8edc08b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 (u *Usecase) GetOriginalLink(ctx context.Context, shortURL string) (string, error)
func (u *Usecase) PutLink(ctx context.Context, username, originalURL string) (string, error)

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL