repository

package
v0.0.0-...-84f7265 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandRepository

type CommandRepository interface {
	UpdateRank(user *models.Command) error
	Add(user *models.Command) error
	FetchAll() ([]*models.Command, error)
}

func NewCommandRepository

func NewCommandRepository(db *storages.Database) CommandRepository

type Repositories

type Repositories struct {
	Command CommandRepository
	User    UserRepository
	Sync    SyncRepository
}

func NewRepositories

func NewRepositories(db *storages.Database) *Repositories

type SyncRepository

type SyncRepository interface {
	SaveHistory(message models.Message) error
	RandomMessage(username string) (string, error)
	FetchUserStatistic(username string) (int, error)
	GetUserQuote(username string) (string, error)
}

func NewSyncRepository

func NewSyncRepository(db *storages.Database) SyncRepository

type UserRepository

type UserRepository interface {
	SaveNewUser(user models.User) error
	UpdateUserRank(user models.UpdatedUser) error
}

func NewUserRepository

func NewUserRepository(db *storages.Database) UserRepository

Jump to

Keyboard shortcuts

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