Documentation ¶
Overview ¶
Package postgresql witholds database specific utilities (postgres)
Index ¶
- Variables
- func CreateTablesOrMigrateSchemas(db *gorm.DB, zapLogger *zap.Logger)
- func Init(zapLogger *zap.Logger) (*gorm.DB, error)
- type Database
- func (db *Database) CreateGroup(group table.GroupORM) error
- func (db *Database) CreateTeam(team table.TeamORM) error
- func (db *Database) CreateUser(user table.UserORM) error
- func (db *Database) DeleteGroup(group table.GroupORM) error
- func (db *Database) DeleteTeam(team table.TeamORM) error
- func (db *Database) DeleteUser(user table.UserORM) error
- func (db *Database) GetAllGroups(limit int) (error, []*table.GroupORM)
- func (db *Database) GetAllTeams(limit int) (error, []*table.TeamORM)
- func (db *Database) GetAllUsers(limit int) (error, []*table.UserORM)
- func (db *Database) GetGroupById(id int32) (error, *table.GroupORM)
- func (db *Database) GetGroupByName(groupname string) (error, *table.GroupORM)
- func (db *Database) GetTeamById(id int32) (error, *table.TeamORM)
- func (db *Database) GetTeamByName(teamName string) (error, *table.TeamORM)
- func (db Database) GetUserBasedOnParam(param string, query string) (table.UserORM, error)
- func (db *Database) GetUserByEmail(email string) (error, *table.UserORM)
- func (db *Database) GetUserById(id int32) (error, *table.UserORM)
- func (db *Database) GetUserByUsername(username string) (error, *table.UserORM)
- func (db *Database) UpdateGroup(group table.GroupORM) error
- func (db *Database) UpdateTeam(team table.TeamORM) error
- func (db *Database) UpdateUser(user table.UserORM) error
- type IDatabase
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UsersTableName = "users_table" TeamsTableName = "teams_table" GroupsTableName = "groups_table" )
Functions ¶
func CreateTablesOrMigrateSchemas ¶
CreateTablesOrMigrateSchemas creates a given set of tables based on a schema if it does not exist or migrates the table schemas to the latest version
Types ¶
type Database ¶
func (*Database) GetAllGroups ¶
func (*Database) GetGroupByName ¶
func (*Database) GetTeamByName ¶
func (Database) GetUserBasedOnParam ¶
func (*Database) GetUserByEmail ¶
func (*Database) GetUserByUsername ¶
type IDatabase ¶
type IDatabase interface { CreateUser(User table.UserORM) error UpdateUser(User table.UserORM) error DeleteUser(User table.UserORM) error GetUserById(id int32) (error, *table.UserORM) GetUserByUsername(username string) (error, *table.UserORM) GetUserByEmail(email string) (error, *table.UserORM) GetAllUsers(limit int) (error, []*table.UserORM) CreateGroup(group table.GroupORM) error UpdateGroup(group table.GroupORM) error DeleteGroup(group table.GroupORM) error GetGroupById(id int32) (error, *table.GroupORM) GetGroupByName(name string) (error, *table.GroupORM) GetAllGroups(limit int) (error, []*table.GroupORM) CreateTeam(group table.TeamORM) error UpdateTeam(group table.TeamORM) error DeleteTeam(group table.TeamORM) error GetTeamById(id int32) (error, *table.TeamORM) GetTeamByName(name string) (error, *table.TeamORM) GetAllTeams(limit int) (error, []*table.TeamORM) }
Click to show internal directories.
Click to hide internal directories.