Documentation ¶
Index ¶
- type BDKeeper
- func (bdk *BDKeeper) AddData(ctx context.Context, table string, user_id int, entry_id string, ...) error
- func (bdk *BDKeeper) AddUser(ctx context.Context, username string, hashedPassword string) error
- func (bdk *BDKeeper) Close() bool
- func (bdk *BDKeeper) DeleteData(ctx context.Context, table string, user_id int, entry_id string) error
- func (bdk *BDKeeper) GetAllData(ctx context.Context, table string, userID int, lastSync time.Time, ...) ([]map[string]string, error)
- func (bdk *BDKeeper) GetPassword(ctx context.Context, username string) (string, error)
- func (bdk *BDKeeper) GetUserID(ctx context.Context, username string) (int, error)
- func (bdk *BDKeeper) Ping() bool
- func (bdk *BDKeeper) UpdateData(ctx context.Context, table string, user_id int, entry_id string, ...) error
- func (bdk *BDKeeper) UserExists(ctx context.Context, username string) (bool, error)
- type Log
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BDKeeper ¶
type BDKeeper struct {
// contains filtered or unexported fields
}
BDKeeper represents a database keeper.
func NewBDKeeper ¶
NewBDKeeper creates a new BDKeeper instance.
func (*BDKeeper) AddData ¶
func (bdk *BDKeeper) AddData(ctx context.Context, table string, user_id int, entry_id string, data map[string]string) error
AddData adds data to a table in the database.
func (*BDKeeper) Close ¶
Close closes the connection to the PostgreSQL database and returns true if successful, otherwise false.
func (*BDKeeper) DeleteData ¶
func (bdk *BDKeeper) DeleteData(ctx context.Context, table string, user_id int, entry_id string) error
DeleteData marks data as deleted in a table in the database and updates the 'updated_at' field.
func (*BDKeeper) GetAllData ¶
func (bdk *BDKeeper) GetAllData(ctx context.Context, table string, userID int, lastSync time.Time, inclDel bool) ([]map[string]string, error)
GetAllData retrieves all data from a table in the database.
func (*BDKeeper) GetPassword ¶
GetPassword retrieves the hashed password of a user from the database.
func (*BDKeeper) Ping ¶
Ping checks the connectivity to the PostgreSQL database and returns true if successful, otherwise false.
Click to show internal directories.
Click to hide internal directories.