repos

package
v0.0.0-...-c63bb48 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheRepository

type CacheRepository struct {
	// contains filtered or unexported fields
}

func NewCacheRepository

func NewCacheRepository(c *cache.Cache) *CacheRepository

func (*CacheRepository) GetURL

func (c *CacheRepository) GetURL(hash string) *models.URL

func (*CacheRepository) SetURL

func (c *CacheRepository) SetURL(url *models.URL)

type URLRespository

type URLRespository struct {
	// contains filtered or unexported fields
}

func NewURLRepository

func NewURLRepository(s *gocql.Session, c models.URLCache) *URLRespository

func (*URLRespository) CreateURL

func (r *URLRespository) CreateURL(createURLDto *dtos.CreateURLDto, user *models.User) (*models.URL, error)

func (*URLRespository) GetAllURLs

func (r *URLRespository) GetAllURLs() ([]models.URL, error)

func (*URLRespository) GetURLByHash

func (r *URLRespository) GetURLByHash(hash string) (*models.URL, error)

func (*URLRespository) GetUserURLByHash

func (r *URLRespository) GetUserURLByHash(hash string, user *models.UserClaims) (*models.URL, error)

type UserRepository

type UserRepository struct {
	// contains filtered or unexported fields
}

func NewUserRepository

func NewUserRepository(s *gocql.Session) *UserRepository

func (*UserRepository) CreateUser

func (r *UserRepository) CreateUser(createUserDto *dtos.SignUpDto) (*models.User, error)

func (*UserRepository) ValidateUser

func (r *UserRepository) ValidateUser(credentials *dtos.SignInDto) (*models.User, error)

Jump to

Keyboard shortcuts

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