store

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkRepository

type LinkRepository interface {
	Create(context.Context, int, string, string) (*models.Link, error)
	GetByUID(context.Context, int) ([]*models.Link, error)
	GetByOriginLink(context.Context, string) (*models.Link, error)
	GetByShortLink(context.Context, string) (*models.Link, error)
	ShortLinkExist(context.Context, string) (bool, error)
	Delete(context.Context, string) error
	ReActivate(context.Context, string) error
}

type Store

type Store interface {
	User() UserRepository
	Link() LinkRepository
}

type UserRepository

type UserRepository interface {
	Create(context.Context) (*models.User, error)
	GetByUID(context.Context, int) (*models.User, error)
	GetByRole(context.Context, string, int, int) ([]models.User, error)
	GetByToken(context.Context, string) (*models.User, error)
	CheckByToken(context.Context, string) (bool, error)
	// TODO: add user deletion by any uniq parameter: Users have a unique uid and token.
	Delete(context.Context, interface{}) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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