Documentation
¶
Overview ¶
Package postgres contains the database implementation of clients repository layer.
Index ¶
- func PageQuery(pm clients.Page) (string, error)
- func ToClient(c DBClient) (clients.Client, error)
- func ToDBClientsPage(pm clients.Page) (dbClientsPage, error)
- type DBClient
- type Repository
- func (repo *Repository) ChangeStatus(ctx context.Context, client clients.Client) (clients.Client, error)
- func (repo *Repository) Delete(ctx context.Context, id string) error
- func (repo *Repository) RetrieveAll(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)
- func (repo *Repository) RetrieveAllBasicInfo(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)
- func (repo *Repository) RetrieveAllByIDs(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)
- func (repo *Repository) RetrieveByID(ctx context.Context, id string) (clients.Client, error)
- func (repo *Repository) RetrieveByIdentity(ctx context.Context, identity string) (clients.Client, error)
- func (repo *Repository) Update(ctx context.Context, client clients.Client) (clients.Client, error)
- func (repo *Repository) UpdateIdentity(ctx context.Context, client clients.Client) (clients.Client, error)
- func (repo *Repository) UpdateRole(ctx context.Context, client clients.Client) (clients.Client, error)
- func (repo *Repository) UpdateSecret(ctx context.Context, client clients.Client) (clients.Client, error)
- func (repo *Repository) UpdateTags(ctx context.Context, client clients.Client) (clients.Client, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToDBClientsPage ¶
Types ¶
type DBClient ¶
type DBClient struct { ID string `db:"id"` Name string `db:"name,omitempty"` Tags pgtype.TextArray `db:"tags,omitempty"` Identity string `db:"identity"` Domain string `db:"domain_id"` Secret string `db:"secret"` Metadata []byte `db:"metadata,omitempty"` 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 clients.Status `db:"status,omitempty"` Role *clients.Role `db:"role,omitempty"` }
type Repository ¶
func (*Repository) ChangeStatus ¶
func (*Repository) Delete ¶ added in v1.0.1
func (repo *Repository) Delete(ctx context.Context, id string) error
func (*Repository) RetrieveAll ¶
func (repo *Repository) RetrieveAll(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)
func (*Repository) RetrieveAllBasicInfo ¶
func (repo *Repository) RetrieveAllBasicInfo(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)
func (*Repository) RetrieveAllByIDs ¶
func (repo *Repository) RetrieveAllByIDs(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)
func (*Repository) RetrieveByID ¶
func (*Repository) RetrieveByIdentity ¶
func (*Repository) UpdateIdentity ¶
func (*Repository) UpdateRole ¶
func (*Repository) UpdateSecret ¶
func (*Repository) UpdateTags ¶
Click to show internal directories.
Click to hide internal directories.