Documentation ¶
Index ¶
- func Connect(config models.Config) (*pgxpool.Pool, string, error)
- func DeleteMachine(config models.Config, machine_id string, user_id string, owner_type string) error
- func DoesUserExists(config models.Config, email string) bool
- func GetAMachine(config models.Config, machine_id string, user_id string, owner_type string, ...) (models.Machine, error)
- func GetAMachineBasicInfo(config models.Config, machine_id string, user_id string, owner_type string) (models.FilterMachine, error)
- func GetMachines(config models.Config, user_id string, owner_type string) ([]models.Machine, error)
- func GetMachinesBasicInfo(config models.Config, user_id string, owner_type string) ([]models.FilterMachine, error)
- func GetUsername(config models.Config, email string) (string, error)
- func Migrate(config models.Config) error
- func SaveMachine(config models.Config, machine models.MachineRequest, username string) error
- func SaveUser(config models.Config, email string, name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
ConnectDB() is used to connect to the database using the configuration values. It initializes the package-level variable DB with the database connection pool. It returns the error as output.
func DeleteMachine ¶
func GetAMachine ¶
func GetAMachineBasicInfo ¶
func GetMachines ¶
func GetMachinesBasicInfo ¶
func SaveMachine ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.