postgres

package
v0.0.0-...-03ce398 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(config PostgresConfig) (*sqlx.DB, error)

func NewRepository

func NewRepository(config PostgresConfig) (*repository.Repository, error)

Types

type GetCount

type GetCount struct {
	Count int `db:"count"`
}

type JokeRepository

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

func NewJokeRepository

func NewJokeRepository(db *sqlx.DB) *JokeRepository

func (*JokeRepository) Add

func (rep *JokeRepository) Add(query interface{}) (uuid.UUID, error)

func (*JokeRepository) Count

func (rep *JokeRepository) Count(interface{}) (int, error)

func (*JokeRepository) Edit

func (rep *JokeRepository) Edit(interface{})

func (*JokeRepository) GetList

func (rep *JokeRepository) GetList(interface{})

func (*JokeRepository) GetOne

func (*JokeRepository) Remove

func (rep *JokeRepository) Remove(interface{})

func (*JokeRepository) UpdateContext

func (rep *JokeRepository) UpdateContext(id uuid.UUID, context string) error

type PostgresConfig

type PostgresConfig struct {
	Dbname   string
	Host     string
	Port     int
	User     string
	Password string
}

type StateRepository

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

func NewStateRepository

func NewStateRepository(db *sqlx.DB) *StateRepository

func (*StateRepository) Add

func (*StateRepository) Edit

func (rep *StateRepository) Edit(interface{})

func (*StateRepository) GetList

func (rep *StateRepository) GetList(interface{})

func (*StateRepository) Remove

func (rep *StateRepository) Remove(interface{})

type UserRepository

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

func NewUserRepository

func NewUserRepository(db *sqlx.DB) *UserRepository

func (*UserRepository) Add

func (*UserRepository) Edit

func (rep *UserRepository) Edit(interface{})

func (*UserRepository) GetList

func (*UserRepository) GetOne

func (*UserRepository) Remove

func (rep *UserRepository) Remove(interface{})

func (*UserRepository) SetNewStateUUID

func (rep *UserRepository) SetNewStateUUID(userUUID uuid.UUID, stateUUID uuid.UUID) error

Jump to

Keyboard shortcuts

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