Documentation
¶
Index ¶
- type DBTX
- type FindServiceAccountActorParams
- type FindUserActorParams
- type InsertAuditEntryParams
- type ListAuditEntriesParams
- type ListAuditEntriesRow
- type Queries
- func (q *Queries) FindServiceAccountActor(ctx context.Context, arg FindServiceAccountActorParams) (int64, error)
- func (q *Queries) FindUserActor(ctx context.Context, arg FindUserActorParams) (int64, error)
- func (q *Queries) InsertAuditEntry(ctx context.Context, arg InsertAuditEntryParams) error
- func (q *Queries) ListAuditEntries(ctx context.Context, arg ListAuditEntriesParams) ([]ListAuditEntriesRow, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FindUserActorParams ¶
type InsertAuditEntryParams ¶
type InsertAuditEntryParams struct {
OrgID int64
PublicID string
At time.Time
ActorKind string
ActorUserID pgtype.Int8
ActorServiceAccountID pgtype.Int8
ActorName pgtype.Text
ApiTokenID pgtype.Int8
TokenName pgtype.Text
Transport string
Action string
ResourceType pgtype.Text
ResourcePublicID pgtype.Text
ResourceName pgtype.Text
Diff []byte
Details []byte
SourceAddress *netip.Addr
}
type ListAuditEntriesParams ¶
type ListAuditEntriesRow ¶
type ListAuditEntriesRow struct {
ID int64
PublicID string
At time.Time
ActorKind string
ActorName pgtype.Text
TokenName pgtype.Text
Transport string
Action string
ResourceType pgtype.Text
ResourcePublicID pgtype.Text
ResourceName pgtype.Text
ResourceUserName pgtype.Text
ResourceUserStatus pgtype.Text
ContactUserStatus pgtype.Text
Diff []byte
Details []byte
ActorUserPublicID pgtype.Text
ActorUserName pgtype.Text
ActorServiceAccountPublicID pgtype.Text
ActorServiceAccountName pgtype.Text
TokenPublicID pgtype.Text
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) FindServiceAccountActor ¶
func (*Queries) FindUserActor ¶
FindUserActor resolves the public_id of a user, and FindServiceAccountActor that of a Service account, to the internal id the entries store.
func (*Queries) InsertAuditEntry ¶
func (q *Queries) InsertAuditEntry(ctx context.Context, arg InsertAuditEntryParams) error
SPDX-License-Identifier: AGPL-3.0-only Copyright The Muster Authors
func (*Queries) ListAuditEntries ¶
func (q *Queries) ListAuditEntries(ctx context.Context, arg ListAuditEntriesParams) ([]ListAuditEntriesRow, error)
ListAuditEntries is a page of entries, newest first by time and id, after the cursor (before_at, before_id) when one is given, with the filters that are set. The actor, and a user as the resource, show their current name, so that a deleted user appears as deleted-user-<id> (C-03.FR-13); rows are never rewritten. The status of a user resource lets the reader mask what deleting the user erased, for the whole page at once, and so does the status of the User whose contact at a Notification gateway an entry is about, whom its details name (C-30.FR-3).