data

package
v0.0.0-...-6a26343 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRepository

type AuthRepository interface {
	Login(*dto.Auth) (*dao.Auth, *dao.User, *errs.AppError)
	Authorize(*dto.Auth) (*dao.Auth, *errs.AppError)
	AuthorizeChat(string, string) *errs.AppError
}

type AuthRepositoryDB

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

func NewAuthRepositoryDB

func NewAuthRepositoryDB(store *bolthold.Store) AuthRepositoryDB

func (AuthRepositoryDB) Authorize

func (db AuthRepositoryDB) Authorize(authDTO *dto.Auth) (*dao.Auth, *errs.AppError)

func (AuthRepositoryDB) AuthorizeChat

func (db AuthRepositoryDB) AuthorizeChat(token string, userId string) *errs.AppError

func (AuthRepositoryDB) Login

func (db AuthRepositoryDB) Login(authDTO *dto.Auth) (*dao.Auth, *dao.User, *errs.AppError)

type CommentRepository

type CommentRepository interface {
	FindAllComments() ([]dao.Comment, *errs.AppError)
	CreateComment(dto.Comment) (*dao.Comment, *errs.AppError)
	DeleteComment(string) *errs.AppError
	FindCommentsAfter(string) ([]dao.Comment, *errs.AppError)
}

type CommentRepositoryDb

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

func NewCommentRepositoryDb

func NewCommentRepositoryDb(store *bolthold.Store) CommentRepositoryDb

func (CommentRepositoryDb) CreateComment

func (db CommentRepositoryDb) CreateComment(commentDTO dto.Comment) (*dao.Comment, *errs.AppError)

func (CommentRepositoryDb) DeleteComment

func (db CommentRepositoryDb) DeleteComment(uuid string) *errs.AppError

func (CommentRepositoryDb) FindAllComments

func (db CommentRepositoryDb) FindAllComments() ([]dao.Comment, *errs.AppError)

func (CommentRepositoryDb) FindCommentsAfter

func (db CommentRepositoryDb) FindCommentsAfter(commentId string) ([]dao.Comment, *errs.AppError)

type CountryRepository

type CountryRepository interface {
	FindAllCountries() (*[]dao.Country, *errs.AppError)
	FindOneCountry(string) (*dao.Country, *errs.AppError)
	UpdateCountry(dto.Country) (*dao.Country, *errs.AppError)
	FindParticipating() (*[]dao.Country, *errs.AppError)
}

type CountryRepositoryDb

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

func NewCountryRepositoryDb

func NewCountryRepositoryDb(store *bolthold.Store) CountryRepositoryDb

func (CountryRepositoryDb) FindAllCountries

func (db CountryRepositoryDb) FindAllCountries() (*[]dao.Country, *errs.AppError)

func (CountryRepositoryDb) FindOneCountry

func (db CountryRepositoryDb) FindOneCountry(slug string) (*dao.Country, *errs.AppError)

func (CountryRepositoryDb) FindParticipating

func (db CountryRepositoryDb) FindParticipating() (*[]dao.Country, *errs.AppError)

func (CountryRepositoryDb) UpdateCountry

func (db CountryRepositoryDb) UpdateCountry(countryDTO dto.Country) (*dao.Country, *errs.AppError)

type UserRepository

type UserRepository interface {
	CreateUser(dto.NewUser) (*dao.NewUser, *errs.AppError)
	FindAllUsers() ([]dao.User, *errs.AppError)
	FindOneUser(string) (*dao.User, *errs.AppError)
	DeleteUser(string) *errs.AppError
	FindRegisteredUsers() (*[]dao.NewUser, *errs.AppError)
	UpdateUser(dto.User) (*dao.User, *dto.Comment, *errs.AppError)
	UpdateUserImage(uuid.UUID) (*dao.User, *dto.Comment, *errs.AppError)
	VerifySlug(*dto.NewUser) error
}

type UserRepositoryDb

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

func NewUserRepositoryDb

func NewUserRepositoryDb(store *bolthold.Store) UserRepositoryDb

func (UserRepositoryDb) CreateUser

func (db UserRepositoryDb) CreateUser(userDTO dto.NewUser) (*dao.NewUser, *errs.AppError)

func (UserRepositoryDb) DeleteUser

func (db UserRepositoryDb) DeleteUser(slug string) *errs.AppError

func (UserRepositoryDb) FindAllUsers

func (db UserRepositoryDb) FindAllUsers() ([]dao.User, *errs.AppError)

func (UserRepositoryDb) FindOneUser

func (db UserRepositoryDb) FindOneUser(slug string) (*dao.User, *errs.AppError)

func (UserRepositoryDb) FindRegisteredUsers

func (db UserRepositoryDb) FindRegisteredUsers() (*[]dao.NewUser, *errs.AppError)

func (UserRepositoryDb) UpdateUser

func (db UserRepositoryDb) UpdateUser(userDTO dto.User) (*dao.User, *dto.Comment, *errs.AppError)

func (UserRepositoryDb) UpdateUserImage

func (db UserRepositoryDb) UpdateUserImage(id uuid.UUID) (*dao.User, *dto.Comment, *errs.AppError)

func (UserRepositoryDb) VerifySlug

func (db UserRepositoryDb) VerifySlug(userDTO *dto.NewUser) error

type VoteRepository

type VoteRepository interface {
	CreateVote(dto.Vote) (*dao.Vote, *errs.AppError)
	UpdateVote(dto.VoteSingle) (*dao.Vote, *errs.AppError)
	GetVoteByUserAndCountry(uuid.UUID, string) (*dao.Vote, *errs.AppError)
	GetResults() (*[]dao.Result, *errs.AppError)
	GetResultsByUser(userId uuid.UUID) (*[]dao.Result, *errs.AppError)
}

type VoteRepositoryDb

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

func NewVoteRepositoryDb

func NewVoteRepositoryDb(store *bolthold.Store) VoteRepositoryDb

func (VoteRepositoryDb) CreateVote

func (db VoteRepositoryDb) CreateVote(voteDTO dto.Vote) (*dao.Vote, *errs.AppError)

func (VoteRepositoryDb) GetResults

func (db VoteRepositoryDb) GetResults() (*[]dao.Result, *errs.AppError)

func (VoteRepositoryDb) GetResultsByUser

func (db VoteRepositoryDb) GetResultsByUser(userId uuid.UUID) (*[]dao.Result, *errs.AppError)

func (VoteRepositoryDb) GetVoteByUserAndCountry

func (db VoteRepositoryDb) GetVoteByUserAndCountry(userId uuid.UUID, countrySlug string) (*dao.Vote, *errs.AppError)

func (VoteRepositoryDb) UpdateVote

func (db VoteRepositoryDb) UpdateVote(voteDTO dto.VoteSingle) (*dao.Vote, *errs.AppError)

Jump to

Keyboard shortcuts

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