Documentation ¶
Index ¶
- func CreateRecord(bucketName string, record interface{}) error
- func DeleteRecord(bucketName, id string) error
- func GetAllItemTitles(bucketName string, records interface{}) error
- func GetAllRecords(bucketName string, records interface{}) error
- func GetItemByField(field string, value string) (models.Item, error)
- func GetItemByTitle(title string) (models.Item, error)
- func GetRecordByID(bucketName, id string, record interface{}) error
- func GetUserByField(field string, value string) (models.User, error)
- func GetUserByUsername(username string) (models.User, error)
- func GetUserByWallet(wallet string) (models.User, error)
- func Initialize(c config.Server) error
- func NextID(bucketName string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRecord ¶
CreateRecord creates a record in the database for the given item/user after encrypting the content.
func DeleteRecord ¶
func GetAllItemTitles ¶
GetAllRecords retrieves all records from the specified bucket and unmarshals them into the provided slice.
func GetAllRecords ¶
GetAllRecords retrieves all records from the specified bucket and unmarshals them into the provided slice.
func GetItemByField ¶
getUserByField retrieves a user by a specific field (e.g., username or wallet) from the database
func GetRecordByID ¶
GetRecordByID retrieves a record from the specified bucket by ID and unmarshals it into the provided model.
func GetUserByField ¶
getUserByField retrieves a user by a specific field (e.g., username or wallet) from the database
func GetUserByUsername ¶
GetUserByUsername retrieves a user by username from the database
func GetUserByWallet ¶
GetUserByWallet retrieves a user by wallet address from the database
func Initialize ¶
Types ¶
This section is empty.