postgresrepository

package
v0.0.0-...-caf001f Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

func GetPostgresConnection

func GetPostgresConnection() *sql.DB

Types

type PostgresAccountRepository

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

func NewPostgresAccountRepository

func NewPostgresAccountRepository(db *gorm.DB) *PostgresAccountRepository

func (*PostgresAccountRepository) CheckAccountByEmail

func (repo *PostgresAccountRepository) CheckAccountByEmail(email string) bool

func (*PostgresAccountRepository) CheckAccountByUserName

func (repo *PostgresAccountRepository) CheckAccountByUserName(userName string) bool

func (*PostgresAccountRepository) DeleteAccountById

func (repo *PostgresAccountRepository) DeleteAccountById(accountId string) bool

func (*PostgresAccountRepository) ListAccounts

func (repo *PostgresAccountRepository) ListAccounts() []entities.Account

func (*PostgresAccountRepository) Save

func (repo *PostgresAccountRepository) Save(account *entities.Account) error

type PostgresBookRepository

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

func NewPostgresBookRepository

func NewPostgresBookRepository(db *gorm.DB) *PostgresBookRepository

func (*PostgresBookRepository) Add

func (repo *PostgresBookRepository) Add(newBook *entities.Book) (*entities.Book, error)

func (*PostgresBookRepository) Find

func (repo *PostgresBookRepository) Find(bookId string) (*entities.Book, error)

func (*PostgresBookRepository) Get

func (repo *PostgresBookRepository) Get(bookId string) (*entities.Book, error)

func (*PostgresBookRepository) List

func (repo *PostgresBookRepository) List() ([]*entities.Book, error)

func (*PostgresBookRepository) Remove

func (repo *PostgresBookRepository) Remove(bookId string) error

type PostgresUserRepository

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

func NewPostgresUserRepository

func NewPostgresUserRepository(db *gorm.DB) *PostgresUserRepository

func (*PostgresUserRepository) CheckByEmail

func (repo *PostgresUserRepository) CheckByEmail(email string) bool

func (*PostgresUserRepository) CheckById

func (repo *PostgresUserRepository) CheckById(userId string) bool

func (*PostgresUserRepository) CheckByUserName

func (repo *PostgresUserRepository) CheckByUserName(userName string) bool

func (*PostgresUserRepository) Delete

func (repo *PostgresUserRepository) Delete(userId string) error

func (*PostgresUserRepository) GetById

func (repo *PostgresUserRepository) GetById(userId string) (*entities.User, error)

func (*PostgresUserRepository) List

func (repo *PostgresUserRepository) List() []*entities.User

func (*PostgresUserRepository) Save

func (repo *PostgresUserRepository) Save(user *entities.User) error

Jump to

Keyboard shortcuts

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