Documentation ¶
Overview ¶
Package postgres contains the database implementation of users repository layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRepository ¶
func NewRepository(db postgres.Database) users.Repository
Types ¶
type DBUser ¶
type DBUser struct { ID string `db:"id"` Domain string `db:"domain_id"` Secret string `db:"secret"` Metadata []byte `db:"metadata,omitempty"` Tags pgtype.TextArray `db:"tags,omitempty"` // Tags CreatedAt time.Time `db:"created_at,omitempty"` UpdatedAt sql.NullTime `db:"updated_at,omitempty"` UpdatedBy *string `db:"updated_by,omitempty"` Groups []groups.Group `db:"groups,omitempty"` Status users.Status `db:"status,omitempty"` Role *users.Role `db:"role,omitempty"` Username sql.NullString `db:"username, omitempty"` FirstName sql.NullString `db:"first_name, omitempty"` LastName sql.NullString `db:"last_name, omitempty"` ProfilePicture sql.NullString `db:"profile_picture, omitempty"` Email string `db:"email,omitempty"` }
type DBUsersPage ¶
type DBUsersPage struct { Total uint64 `db:"total"` Limit uint64 `db:"limit"` Offset uint64 `db:"offset"` FirstName string `db:"first_name"` LastName string `db:"last_name"` Username string `db:"username"` Id string `db:"id"` Email string `db:"email"` Metadata []byte `db:"metadata"` Tag string `db:"tag"` GroupID string `db:"group_id"` Role users.Role `db:"role"` Status users.Status `db:"status"` }
func ToDBUsersPage ¶
func ToDBUsersPage(pm users.Page) (DBUsersPage, error)
Click to show internal directories.
Click to hide internal directories.