Documentation ¶
Index ¶
- func CheckError(err error)
- func GetPostgresConnection() *sql.DB
- type PostgresAccountRepository
- func (repo *PostgresAccountRepository) CheckAccountByEmail(email string) bool
- func (repo *PostgresAccountRepository) CheckAccountByUserName(userName string) bool
- func (repo *PostgresAccountRepository) DeleteAccountById(accountId string) bool
- func (repo *PostgresAccountRepository) ListAccounts() []entities.Account
- func (repo *PostgresAccountRepository) Save(account *entities.Account) error
- type PostgresBookRepository
- func (repo *PostgresBookRepository) Add(newBook *entities.Book) (*entities.Book, error)
- func (repo *PostgresBookRepository) Find(bookId string) (*entities.Book, error)
- func (repo *PostgresBookRepository) Get(bookId string) (*entities.Book, error)
- func (repo *PostgresBookRepository) List() ([]*entities.Book, error)
- func (repo *PostgresBookRepository) Remove(bookId string) error
- type PostgresUserRepository
- func (repo *PostgresUserRepository) CheckByEmail(email string) bool
- func (repo *PostgresUserRepository) CheckById(userId string) bool
- func (repo *PostgresUserRepository) CheckByUserName(userName string) bool
- func (repo *PostgresUserRepository) Delete(userId string) error
- func (repo *PostgresUserRepository) GetById(userId string) (*entities.User, error)
- func (repo *PostgresUserRepository) List() []*entities.User
- func (repo *PostgresUserRepository) Save(user *entities.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
func CheckError(err error)
func GetPostgresConnection ¶
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
type PostgresBookRepository ¶
type PostgresBookRepository struct {
// contains filtered or unexported fields
}
func NewPostgresBookRepository ¶
func NewPostgresBookRepository(db *gorm.DB) *PostgresBookRepository
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
Click to show internal directories.
Click to hide internal directories.