gen

package
v0.30.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account added in v0.20.0

type Account struct {
	ID                  string             `db:"id" json:"id"`
	Name                string             `db:"name" json:"name"`
	DisplayName         string             `db:"display_name" json:"display_name"`
	HostID              pgtype.Text        `db:"host_id" json:"host_id"`
	Metadata            []byte             `db:"metadata" json:"metadata"`
	Spec                []byte             `db:"spec" json:"spec"`
	CreatedAt           pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt           pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion     int64              `db:"resource_version" json:"resource_version"`
	Kind                string             `db:"kind" json:"kind"`
	ManagedKey          pgtype.Text        `db:"managed_key" json:"managed_key"`
	HolderUserID        pgtype.Text        `db:"holder_user_id" json:"holder_user_id"`
	HolderSaID          pgtype.Text        `db:"holder_sa_id" json:"holder_sa_id"`
	TeamID              pgtype.Text        `db:"team_id" json:"team_id"`
	ProjectID           pgtype.Text        `db:"project_id" json:"project_id"`
	Closed              bool               `db:"closed" json:"closed"`
	FollowsRoleBindings bool               `db:"follows_role_bindings" json:"follows_role_bindings"`
	SourceAccountID     pgtype.Text        `db:"source_account_id" json:"source_account_id"`
	ShareReceiver       pgtype.Text        `db:"share_receiver" json:"share_receiver"`
	ShareUserID         pgtype.Text        `db:"share_user_id" json:"share_user_id"`
	GroupedByRelay      bool               `db:"grouped_by_relay" json:"grouped_by_relay"`
}

type AuditEvent added in v0.10.0

type AuditEvent struct {
	ID            string             `db:"id" json:"id"`
	Ts            pgtype.Timestamptz `db:"ts" json:"ts"`
	ActorKind     string             `db:"actor_kind" json:"actor_kind"`
	ActorID       pgtype.Text        `db:"actor_id" json:"actor_id"`
	ActorName     pgtype.Text        `db:"actor_name" json:"actor_name"`
	SessionID     pgtype.Text        `db:"session_id" json:"session_id"`
	Ip            pgtype.Text        `db:"ip" json:"ip"`
	Action        string             `db:"action" json:"action"`
	ResourceKind  string             `db:"resource_kind" json:"resource_kind"`
	ResourceID    pgtype.Text        `db:"resource_id" json:"resource_id"`
	ResourceName  pgtype.Text        `db:"resource_name" json:"resource_name"`
	OwnerKind     pgtype.Text        `db:"owner_kind" json:"owner_kind"`
	OwnerID       pgtype.Text        `db:"owner_id" json:"owner_id"`
	Scope         []string           `db:"scope" json:"scope"`
	Status        string             `db:"status" json:"status"`
	Code          int32              `db:"code" json:"code"`
	RequestID     pgtype.Text        `db:"request_id" json:"request_id"`
	Method        pgtype.Text        `db:"method" json:"method"`
	Path          pgtype.Text        `db:"path" json:"path"`
	ChangedFields []string           `db:"changed_fields" json:"changed_fields"`
}

type Batch

type Batch struct {
	ID             string             `db:"id" json:"id"`
	RelayKeyHash   string             `db:"relay_key_hash" json:"relay_key_hash"`
	PolicyID       string             `db:"policy_id" json:"policy_id"`
	InboundShape   string             `db:"inbound_shape" json:"inbound_shape"`
	Status         string             `db:"status" json:"status"`
	TotalItems     int32              `db:"total_items" json:"total_items"`
	CreatedAt      pgtype.Timestamptz `db:"created_at" json:"created_at"`
	CompletedAt    pgtype.Timestamptz `db:"completed_at" json:"completed_at"`
	ProjectID      string             `db:"project_id" json:"project_id"`
	TeamID         string             `db:"team_id" json:"team_id"`
	PrincipalKind  string             `db:"principal_kind" json:"principal_kind"`
	PrincipalID    string             `db:"principal_id" json:"principal_id"`
	CredentialKind string             `db:"credential_kind" json:"credential_kind"`
	CredentialID   string             `db:"credential_id" json:"credential_id"`
}

type BatchItem

type BatchItem struct {
	BatchID string `db:"batch_id" json:"batch_id"`
	Idx     int32  `db:"idx" json:"idx"`
	JobID   string `db:"job_id" json:"job_id"`
}

type Budget added in v0.20.0

type Budget struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type CatalogIcon added in v0.30.1

type CatalogIcon struct {
	Name      string             `db:"name" json:"name"`
	Body      []byte             `db:"body" json:"body"`
	Sha256    string             `db:"sha256" json:"sha256"`
	UpdatedAt pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type CountSecretValuesByDataKeyRow added in v0.11.6

type CountSecretValuesByDataKeyRow struct {
	DekID pgtype.UUID `db:"dek_id" json:"dek_id"`
	Rows  int64       `db:"rows" json:"rows"`
}

type CreateBatchItemParams

type CreateBatchItemParams struct {
	BatchID string `db:"batch_id" json:"batch_id"`
	Idx     int32  `db:"idx" json:"idx"`
	JobID   string `db:"job_id" json:"job_id"`
}

type CreateBatchParams

type CreateBatchParams struct {
	ID             string `db:"id" json:"id"`
	RelayKeyHash   string `db:"relay_key_hash" json:"relay_key_hash"`
	PolicyID       string `db:"policy_id" json:"policy_id"`
	InboundShape   string `db:"inbound_shape" json:"inbound_shape"`
	Status         string `db:"status" json:"status"`
	TotalItems     int32  `db:"total_items" json:"total_items"`
	ProjectID      string `db:"project_id" json:"project_id"`
	TeamID         string `db:"team_id" json:"team_id"`
	PrincipalKind  string `db:"principal_kind" json:"principal_kind"`
	PrincipalID    string `db:"principal_id" json:"principal_id"`
	CredentialKind string `db:"credential_kind" json:"credential_kind"`
	CredentialID   string `db:"credential_id" json:"credential_id"`
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
	CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}

type DeleteHostAtVersionParams added in v0.21.0

type DeleteHostAtVersionParams struct {
	ID              string `db:"id" json:"id"`
	ResourceVersion int64  `db:"resource_version" json:"resource_version"`
}

type DeleteHostBindingAtVersionParams added in v0.21.0

type DeleteHostBindingAtVersionParams struct {
	ID              string `db:"id" json:"id"`
	ResourceVersion int64  `db:"resource_version" json:"resource_version"`
}

type DeleteModelAtVersionParams added in v0.21.0

type DeleteModelAtVersionParams struct {
	ID              string `db:"id" json:"id"`
	ResourceVersion int64  `db:"resource_version" json:"resource_version"`
}

type DeleteOverlayParams added in v0.3.0

type DeleteOverlayParams struct {
	Kind       string `db:"kind" json:"kind"`
	ResourceID string `db:"resource_id" json:"resource_id"`
}

type DeletePolicyAtVersionParams added in v0.21.0

type DeletePolicyAtVersionParams struct {
	ID              string `db:"id" json:"id"`
	ResourceVersion int64  `db:"resource_version" json:"resource_version"`
}

type DeletePricingAtVersionParams added in v0.21.0

type DeletePricingAtVersionParams struct {
	ID              string `db:"id" json:"id"`
	ResourceVersion int64  `db:"resource_version" json:"resource_version"`
}

type DeleteProviderAtVersionParams added in v0.21.0

type DeleteProviderAtVersionParams struct {
	ID              string `db:"id" json:"id"`
	ResourceVersion int64  `db:"resource_version" json:"resource_version"`
}

type DeleteRateLimitAtVersionParams added in v0.21.0

type DeleteRateLimitAtVersionParams struct {
	ID              string `db:"id" json:"id"`
	ResourceVersion int64  `db:"resource_version" json:"resource_version"`
}

type GetCatalogIconRow added in v0.30.1

type GetCatalogIconRow struct {
	Body   []byte `db:"body" json:"body"`
	Sha256 string `db:"sha256" json:"sha256"`
}

type GetModelRow

type GetModelRow struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type GetOverlayParams added in v0.3.0

type GetOverlayParams struct {
	Kind       string `db:"kind" json:"kind"`
	ResourceID string `db:"resource_id" json:"resource_id"`
}

type GetPolicyRow

type GetPolicyRow struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	Models          []byte             `db:"models" json:"models"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type GetPrimarySecretDataKeyRow added in v0.11.6

type GetPrimarySecretDataKeyRow struct {
	ID        pgtype.UUID        `db:"id" json:"id"`
	Scope     string             `db:"scope" json:"scope"`
	State     string             `db:"state" json:"state"`
	KekID     []byte             `db:"kek_id" json:"kek_id"`
	Wrapped   []byte             `db:"wrapped" json:"wrapped"`
	CreatedAt pgtype.Timestamptz `db:"created_at" json:"created_at"`
	DemotedAt pgtype.Timestamptz `db:"demoted_at" json:"demoted_at"`
}

type GetProviderRow

type GetProviderRow struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type GetRateLimitRow

type GetRateLimitRow struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type GetRelayKeyRow

type GetRelayKeyRow struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	KeyHash         string             `db:"key_hash" json:"key_hash"`
	PreviousKeyHash pgtype.Text        `db:"previous_key_hash" json:"previous_key_hash"`
	PrincipalSaID   pgtype.Text        `db:"principal_sa_id" json:"principal_sa_id"`
	PrincipalUserID pgtype.Text        `db:"principal_user_id" json:"principal_user_id"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
	AccountID       pgtype.Text        `db:"account_id" json:"account_id"`
	LastUsedAt      pgtype.Timestamptz `db:"last_used_at" json:"last_used_at"`
}

type GetSecretDataKeyRow added in v0.11.6

type GetSecretDataKeyRow struct {
	ID        pgtype.UUID        `db:"id" json:"id"`
	Scope     string             `db:"scope" json:"scope"`
	State     string             `db:"state" json:"state"`
	KekID     []byte             `db:"kek_id" json:"kek_id"`
	Wrapped   []byte             `db:"wrapped" json:"wrapped"`
	CreatedAt pgtype.Timestamptz `db:"created_at" json:"created_at"`
	DemotedAt pgtype.Timestamptz `db:"demoted_at" json:"demoted_at"`
}

type GetSecretRow

type GetSecretRow struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	Status          []byte             `db:"status" json:"status"`
	ValueKind       string             `db:"value_kind" json:"value_kind"`
	ValueFromEnv    pgtype.Text        `db:"value_from_env" json:"value_from_env"`
	ValueCiphertext []byte             `db:"value_ciphertext" json:"value_ciphertext"`
	ValueNonce      []byte             `db:"value_nonce" json:"value_nonce"`
	ValueKeyVersion pgtype.Int4        `db:"value_key_version" json:"value_key_version"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
	LastUsedAt      pgtype.Timestamptz `db:"last_used_at" json:"last_used_at"`
}

type GetSecretValueRow

type GetSecretValueRow struct {
	Ciphertext []byte      `db:"ciphertext" json:"ciphertext"`
	Nonce      []byte      `db:"nonce" json:"nonce"`
	Scope      pgtype.Text `db:"scope" json:"scope"`
	DekID      pgtype.UUID `db:"dek_id" json:"dek_id"`
}

type Group added in v0.10.0

type Group struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type GroupMember added in v0.10.0

type GroupMember struct {
	GroupID  string `db:"group_id" json:"group_id"`
	UserID   string `db:"user_id" json:"user_id"`
	Position int32  `db:"position" json:"position"`
}

type Host

type Host struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type HostBinding

type HostBinding struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	ModelID         string             `db:"model_id" json:"model_id"`
	HostID          string             `db:"host_id" json:"host_id"`
	PricingID       pgtype.Text        `db:"pricing_id" json:"pricing_id"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type InsertAuditEventParams added in v0.10.0

type InsertAuditEventParams struct {
	ID            string             `db:"id" json:"id"`
	Ts            pgtype.Timestamptz `db:"ts" json:"ts"`
	ActorKind     string             `db:"actor_kind" json:"actor_kind"`
	ActorID       pgtype.Text        `db:"actor_id" json:"actor_id"`
	ActorName     pgtype.Text        `db:"actor_name" json:"actor_name"`
	SessionID     pgtype.Text        `db:"session_id" json:"session_id"`
	Ip            pgtype.Text        `db:"ip" json:"ip"`
	Action        string             `db:"action" json:"action"`
	ResourceKind  string             `db:"resource_kind" json:"resource_kind"`
	ResourceID    pgtype.Text        `db:"resource_id" json:"resource_id"`
	ResourceName  pgtype.Text        `db:"resource_name" json:"resource_name"`
	OwnerKind     pgtype.Text        `db:"owner_kind" json:"owner_kind"`
	OwnerID       pgtype.Text        `db:"owner_id" json:"owner_id"`
	Scope         []string           `db:"scope" json:"scope"`
	Status        string             `db:"status" json:"status"`
	Code          int32              `db:"code" json:"code"`
	RequestID     pgtype.Text        `db:"request_id" json:"request_id"`
	Method        pgtype.Text        `db:"method" json:"method"`
	Path          pgtype.Text        `db:"path" json:"path"`
	ChangedFields []string           `db:"changed_fields" json:"changed_fields"`
}

type InsertManagedAccountParams added in v0.20.0

type InsertManagedAccountParams struct {
	ID                  string      `db:"id" json:"id"`
	Name                string      `db:"name" json:"name"`
	DisplayName         string      `db:"display_name" json:"display_name"`
	Metadata            []byte      `db:"metadata" json:"metadata"`
	Spec                []byte      `db:"spec" json:"spec"`
	Kind                string      `db:"kind" json:"kind"`
	ManagedKey          pgtype.Text `db:"managed_key" json:"managed_key"`
	HolderUserID        pgtype.Text `db:"holder_user_id" json:"holder_user_id"`
	HolderSaID          pgtype.Text `db:"holder_sa_id" json:"holder_sa_id"`
	TeamID              pgtype.Text `db:"team_id" json:"team_id"`
	ProjectID           pgtype.Text `db:"project_id" json:"project_id"`
	FollowsRoleBindings bool        `db:"follows_role_bindings" json:"follows_role_bindings"`
}

type InsertPolicyBindingAccountParams added in v0.20.0

type InsertPolicyBindingAccountParams struct {
	BindingID string `db:"binding_id" json:"binding_id"`
	AccountID string `db:"account_id" json:"account_id"`
	Position  int32  `db:"position" json:"position"`
}

type InsertPolicyBudgetParams added in v0.20.0

type InsertPolicyBudgetParams struct {
	PolicyID string `db:"policy_id" json:"policy_id"`
	BudgetID string `db:"budget_id" json:"budget_id"`
	Position int32  `db:"position" json:"position"`
	Shared   bool   `db:"shared" json:"shared"`
}

type InsertPolicyPoolParams added in v0.20.0

type InsertPolicyPoolParams struct {
	PolicyID string `db:"policy_id" json:"policy_id"`
	PoolID   string `db:"pool_id" json:"pool_id"`
	Position int32  `db:"position" json:"position"`
}

type InsertPolicyRateLimitParams added in v0.20.0

type InsertPolicyRateLimitParams struct {
	PolicyID    string `db:"policy_id" json:"policy_id"`
	RateLimitID string `db:"rate_limit_id" json:"rate_limit_id"`
	Models      []byte `db:"models" json:"models"`
	Position    int32  `db:"position" json:"position"`
	Shared      bool   `db:"shared" json:"shared"`
}

type InsertPoolAccountParams added in v0.20.0

type InsertPoolAccountParams struct {
	PoolID    string `db:"pool_id" json:"pool_id"`
	AccountID string `db:"account_id" json:"account_id"`
	Position  int32  `db:"position" json:"position"`
}

type InsertPoolCredentialParams added in v0.20.0

type InsertPoolCredentialParams struct {
	PoolID    string `db:"pool_id" json:"pool_id"`
	HostKeyID string `db:"host_key_id" json:"host_key_id"`
	Position  int32  `db:"position" json:"position"`
}

type InsertPricingModelParams

type InsertPricingModelParams struct {
	PricingID string `db:"pricing_id" json:"pricing_id"`
	ModelID   string `db:"model_id" json:"model_id"`
	Position  int32  `db:"position" json:"position"`
}

type InsertSecretDataKeyParams added in v0.11.6

type InsertSecretDataKeyParams struct {
	ID      pgtype.UUID `db:"id" json:"id"`
	Scope   string      `db:"scope" json:"scope"`
	KekID   []byte      `db:"kek_id" json:"kek_id"`
	Wrapped []byte      `db:"wrapped" json:"wrapped"`
}

type InsertSecretEnvParams

type InsertSecretEnvParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	ValueFromEnv    pgtype.Text `db:"value_from_env" json:"value_from_env"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
	ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type InsertSecretEnvRow

type InsertSecretEnvRow struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	ValueKind       string      `db:"value_kind" json:"value_kind"`
	ValueFromEnv    pgtype.Text `db:"value_from_env" json:"value_from_env"`
	ValueCiphertext []byte      `db:"value_ciphertext" json:"value_ciphertext"`
	ValueNonce      []byte      `db:"value_nonce" json:"value_nonce"`
	ValueKeyVersion pgtype.Int4 `db:"value_key_version" json:"value_key_version"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
}

type InsertSecretStoredParams

type InsertSecretStoredParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	ValueCiphertext []byte      `db:"value_ciphertext" json:"value_ciphertext"`
	ValueNonce      []byte      `db:"value_nonce" json:"value_nonce"`
	ValueKeyVersion pgtype.Int4 `db:"value_key_version" json:"value_key_version"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
}

type InsertSecretStoredRefParams

type InsertSecretStoredRefParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
	ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type InsertSecretStoredRefRow

type InsertSecretStoredRefRow struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	ValueKind       string      `db:"value_kind" json:"value_kind"`
	ValueFromEnv    pgtype.Text `db:"value_from_env" json:"value_from_env"`
	ValueCiphertext []byte      `db:"value_ciphertext" json:"value_ciphertext"`
	ValueNonce      []byte      `db:"value_nonce" json:"value_nonce"`
	ValueKeyVersion pgtype.Int4 `db:"value_key_version" json:"value_key_version"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
}

type InsertSecretStoredRow

type InsertSecretStoredRow struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	ValueKind       string      `db:"value_kind" json:"value_kind"`
	ValueFromEnv    pgtype.Text `db:"value_from_env" json:"value_from_env"`
	ValueCiphertext []byte      `db:"value_ciphertext" json:"value_ciphertext"`
	ValueNonce      []byte      `db:"value_nonce" json:"value_nonce"`
	ValueKeyVersion pgtype.Int4 `db:"value_key_version" json:"value_key_version"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
}

type ListAuditEventsParams added in v0.10.0

type ListAuditEventsParams struct {
	ActorID       pgtype.Text        `db:"actor_id" json:"actor_id"`
	ActorName     pgtype.Text        `db:"actor_name" json:"actor_name"`
	Actions       []string           `db:"actions" json:"actions"`
	ResourceKinds []string           `db:"resource_kinds" json:"resource_kinds"`
	ResourceID    pgtype.Text        `db:"resource_id" json:"resource_id"`
	Scopes        []string           `db:"scopes" json:"scopes"`
	Status        pgtype.Text        `db:"status" json:"status"`
	FromTs        pgtype.Timestamptz `db:"from_ts" json:"from_ts"`
	ToTs          pgtype.Timestamptz `db:"to_ts" json:"to_ts"`
	CursorTs      pgtype.Timestamptz `db:"cursor_ts" json:"cursor_ts"`
	CursorID      string             `db:"cursor_id" json:"cursor_id"`
	RowLimit      int32              `db:"row_limit" json:"row_limit"`
}

type ListModelsRow

type ListModelsRow struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type ListPoliciesRow

type ListPoliciesRow struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	Models          []byte             `db:"models" json:"models"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type ListProvidersRow

type ListProvidersRow struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type ListRateLimitsRow

type ListRateLimitsRow struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type ListRelayKeysRow

type ListRelayKeysRow struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	KeyHash         string             `db:"key_hash" json:"key_hash"`
	PreviousKeyHash pgtype.Text        `db:"previous_key_hash" json:"previous_key_hash"`
	PrincipalSaID   pgtype.Text        `db:"principal_sa_id" json:"principal_sa_id"`
	PrincipalUserID pgtype.Text        `db:"principal_user_id" json:"principal_user_id"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
	AccountID       pgtype.Text        `db:"account_id" json:"account_id"`
	LastUsedAt      pgtype.Timestamptz `db:"last_used_at" json:"last_used_at"`
}

type ListSealedSecretValuesParams added in v0.11.6

type ListSealedSecretValuesParams struct {
	After   string `db:"after" json:"after"`
	MaxRows int32  `db:"max_rows" json:"max_rows"`
}

type ListSealedSecretValuesRow added in v0.11.6

type ListSealedSecretValuesRow struct {
	ID         string      `db:"id" json:"id"`
	Ciphertext []byte      `db:"ciphertext" json:"ciphertext"`
	Scope      pgtype.Text `db:"scope" json:"scope"`
}

type ListSecretDataKeysRow added in v0.11.6

type ListSecretDataKeysRow struct {
	ID        pgtype.UUID        `db:"id" json:"id"`
	Scope     string             `db:"scope" json:"scope"`
	State     string             `db:"state" json:"state"`
	KekID     []byte             `db:"kek_id" json:"kek_id"`
	Wrapped   []byte             `db:"wrapped" json:"wrapped"`
	CreatedAt pgtype.Timestamptz `db:"created_at" json:"created_at"`
	DemotedAt pgtype.Timestamptz `db:"demoted_at" json:"demoted_at"`
}

type ListSecretValuesParams added in v0.11.6

type ListSecretValuesParams struct {
	After   string `db:"after" json:"after"`
	MaxRows int32  `db:"max_rows" json:"max_rows"`
}

type ListSecretValuesRow added in v0.11.6

type ListSecretValuesRow struct {
	ID         string      `db:"id" json:"id"`
	Ciphertext []byte      `db:"ciphertext" json:"ciphertext"`
	Nonce      []byte      `db:"nonce" json:"nonce"`
	DekID      pgtype.UUID `db:"dek_id" json:"dek_id"`
}

type ListSecretsRow

type ListSecretsRow struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	Status          []byte             `db:"status" json:"status"`
	ValueKind       string             `db:"value_kind" json:"value_kind"`
	ValueFromEnv    pgtype.Text        `db:"value_from_env" json:"value_from_env"`
	ValueCiphertext []byte             `db:"value_ciphertext" json:"value_ciphertext"`
	ValueNonce      []byte             `db:"value_nonce" json:"value_nonce"`
	ValueKeyVersion pgtype.Int4        `db:"value_key_version" json:"value_key_version"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
	LastUsedAt      pgtype.Timestamptz `db:"last_used_at" json:"last_used_at"`
}

type ListStaleSecretValuesParams added in v0.11.6

type ListStaleSecretValuesParams struct {
	After   string `db:"after" json:"after"`
	MaxRows int32  `db:"max_rows" json:"max_rows"`
}

type ListStaleSecretValuesRow added in v0.11.6

type ListStaleSecretValuesRow struct {
	ID         string `db:"id" json:"id"`
	Ciphertext []byte `db:"ciphertext" json:"ciphertext"`
}

type ListStoredSecretsForRotationRow

type ListStoredSecretsForRotationRow struct {
	ID              string      `db:"id" json:"id"`
	ValueCiphertext []byte      `db:"value_ciphertext" json:"value_ciphertext"`
	ValueNonce      []byte      `db:"value_nonce" json:"value_nonce"`
	ValueKeyVersion pgtype.Int4 `db:"value_key_version" json:"value_key_version"`
}

type ListUserTokenVersionsAndDisabledRow added in v0.11.0

type ListUserTokenVersionsAndDisabledRow struct {
	ID           string `db:"id" json:"id"`
	TokenVersion int32  `db:"token_version" json:"token_version"`
	Disabled     bool   `db:"disabled" json:"disabled"`
}

type ListUsernamesInRow added in v0.11.1

type ListUsernamesInRow struct {
	ID       string `db:"id" json:"id"`
	Username string `db:"username" json:"username"`
}

type LockSecretDataKeyForDestroyParams added in v0.11.6

type LockSecretDataKeyForDestroyParams struct {
	ID            pgtype.UUID `db:"id" json:"id"`
	MinAgeSeconds float64     `db:"min_age_seconds" json:"min_age_seconds"`
}

type LockSecretDataKeyForDestroyRow added in v0.11.6

type LockSecretDataKeyForDestroyRow struct {
	State     string `db:"state" json:"state"`
	OldEnough bool   `db:"old_enough" json:"old_enough"`
}

type LockSecretOwnerRow added in v0.11.6

type LockSecretOwnerRow struct {
	OwnerKind string `db:"owner_kind" json:"owner_kind"`
	OwnerID   string `db:"owner_id" json:"owner_id"`
}

type LockSecretValueRow added in v0.11.6

type LockSecretValueRow struct {
	Ciphertext []byte      `db:"ciphertext" json:"ciphertext"`
	Nonce      []byte      `db:"nonce" json:"nonce"`
	Scope      pgtype.Text `db:"scope" json:"scope"`
	DekID      pgtype.UUID `db:"dek_id" json:"dek_id"`
}

type Model

type Model struct {
	Name            string             `db:"name" json:"name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ID              string             `db:"id" json:"id"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type Overlay added in v0.3.0

type Overlay struct {
	Kind       string             `db:"kind" json:"kind"`
	ResourceID string             `db:"resource_id" json:"resource_id"`
	Patch      []byte             `db:"patch" json:"patch"`
	UpdatedAt  pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type Policy

type Policy struct {
	Name            string             `db:"name" json:"name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ID              string             `db:"id" json:"id"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Models          []byte             `db:"models" json:"models"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type PolicyBinding added in v0.10.0

type PolicyBinding struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	ProjectID       pgtype.Text        `db:"project_id" json:"project_id"`
	PolicyID        string             `db:"policy_id" json:"policy_id"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
	TeamID          pgtype.Text        `db:"team_id" json:"team_id"`
	UserID          pgtype.Text        `db:"user_id" json:"user_id"`
}

type PolicyBindingAccount added in v0.20.0

type PolicyBindingAccount struct {
	BindingID string `db:"binding_id" json:"binding_id"`
	AccountID string `db:"account_id" json:"account_id"`
	Position  int32  `db:"position" json:"position"`
}

type PolicyBudget added in v0.20.0

type PolicyBudget struct {
	PolicyID string `db:"policy_id" json:"policy_id"`
	BudgetID string `db:"budget_id" json:"budget_id"`
	Position int32  `db:"position" json:"position"`
	Shared   bool   `db:"shared" json:"shared"`
}

type PolicyPool added in v0.20.0

type PolicyPool struct {
	PolicyID string `db:"policy_id" json:"policy_id"`
	PoolID   string `db:"pool_id" json:"pool_id"`
	Position int32  `db:"position" json:"position"`
}

type PolicyRateLimit added in v0.20.0

type PolicyRateLimit struct {
	PolicyID    string `db:"policy_id" json:"policy_id"`
	RateLimitID string `db:"rate_limit_id" json:"rate_limit_id"`
	Models      []byte `db:"models" json:"models"`
	Position    int32  `db:"position" json:"position"`
	Shared      bool   `db:"shared" json:"shared"`
}

type Pool added in v0.20.0

type Pool struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	HostID          string             `db:"host_id" json:"host_id"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type PoolAccount added in v0.20.0

type PoolAccount struct {
	PoolID    string `db:"pool_id" json:"pool_id"`
	AccountID string `db:"account_id" json:"account_id"`
	Position  int32  `db:"position" json:"position"`
}

type PoolCredential added in v0.20.0

type PoolCredential struct {
	PoolID    string `db:"pool_id" json:"pool_id"`
	HostKeyID string `db:"host_key_id" json:"host_key_id"`
	Position  int32  `db:"position" json:"position"`
}

type Pricing

type Pricing struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	HostID          string             `db:"host_id" json:"host_id"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type PricingModel

type PricingModel struct {
	PricingID string `db:"pricing_id" json:"pricing_id"`
	ModelID   string `db:"model_id" json:"model_id"`
	Position  int32  `db:"position" json:"position"`
}

type Project added in v0.10.0

type Project struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	TeamID          string             `db:"team_id" json:"team_id"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type Provider

type Provider struct {
	Name            string             `db:"name" json:"name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ID              string             `db:"id" json:"id"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) AccountNameTaken added in v0.20.0

func (q *Queries) AccountNameTaken(ctx context.Context, name string) (bool, error)

func (*Queries) AllowLegacySecretWrite added in v0.11.6

func (q *Queries) AllowLegacySecretWrite(ctx context.Context) error

AllowLegacySecretWrite lets the current transaction write legacy-shape rows past the secret_values trigger; only the downgrade path calls it.

func (*Queries) AnyCatalogDetached added in v0.21.0

func (q *Queries) AnyCatalogDetached(ctx context.Context) (pgtype.Bool, error)

Whether a catalog release left any row detached; the follower asks on every poll before it runs a prune.

func (*Queries) CountLegacySecretValues added in v0.11.6

func (q *Queries) CountLegacySecretValues(ctx context.Context) (int64, error)

func (*Queries) CountScopedSecretValues added in v0.30.0

func (q *Queries) CountScopedSecretValues(ctx context.Context, scope pgtype.Text) (int64, error)

CountScopedSecretValues counts the rows sealed under one scope's data keys; migration 45's down refuses the organization's.

func (*Queries) CountSealedSecretValues added in v0.11.6

func (q *Queries) CountSealedSecretValues(ctx context.Context) (int64, error)

CountSealedSecretValues counts the rows migration 34's down refuses: sealed, or without the nonce a legacy row needs.

func (*Queries) CountSecretValuesByDataKey added in v0.11.6

func (q *Queries) CountSecretValuesByDataKey(ctx context.Context) ([]CountSecretValuesByDataKeyRow, error)

func (*Queries) CountSecretValuesUsingDataKey added in v0.11.6

func (q *Queries) CountSecretValuesUsingDataKey(ctx context.Context, dekID pgtype.UUID) (int64, error)

func (*Queries) CreateBatch

func (q *Queries) CreateBatch(ctx context.Context, arg CreateBatchParams) error

===== batches =====

func (*Queries) CreateBatchItem

func (q *Queries) CreateBatchItem(ctx context.Context, arg CreateBatchItemParams) error

func (*Queries) DeleteAccount added in v0.20.0

func (q *Queries) DeleteAccount(ctx context.Context, id string) error

func (*Queries) DeleteBudget added in v0.20.0

func (q *Queries) DeleteBudget(ctx context.Context, id string) error

func (*Queries) DeleteCatalogIconsExcept added in v0.30.1

func (q *Queries) DeleteCatalogIconsExcept(ctx context.Context, names []string) error

func (*Queries) DeleteHost

func (q *Queries) DeleteHost(ctx context.Context, id string) error

func (*Queries) DeleteHostAtVersion added in v0.21.0

func (q *Queries) DeleteHostAtVersion(ctx context.Context, arg DeleteHostAtVersionParams) (int64, error)

func (*Queries) DeleteHostBinding

func (q *Queries) DeleteHostBinding(ctx context.Context, id string) error

func (*Queries) DeleteHostBindingAtVersion added in v0.21.0

func (q *Queries) DeleteHostBindingAtVersion(ctx context.Context, arg DeleteHostBindingAtVersionParams) (int64, error)

func (*Queries) DeleteModel

func (q *Queries) DeleteModel(ctx context.Context, id string) error

func (*Queries) DeleteModelAtVersion added in v0.21.0

func (q *Queries) DeleteModelAtVersion(ctx context.Context, arg DeleteModelAtVersionParams) (int64, error)

func (*Queries) DeleteOverlay added in v0.3.0

func (q *Queries) DeleteOverlay(ctx context.Context, arg DeleteOverlayParams) (int64, error)

func (*Queries) DeletePolicy

func (q *Queries) DeletePolicy(ctx context.Context, id string) error

func (*Queries) DeletePolicyAtVersion added in v0.21.0

func (q *Queries) DeletePolicyAtVersion(ctx context.Context, arg DeletePolicyAtVersionParams) (int64, error)

func (*Queries) DeletePolicyBinding added in v0.10.0

func (q *Queries) DeletePolicyBinding(ctx context.Context, id string) error

func (*Queries) DeletePolicyBindingAccounts added in v0.20.0

func (q *Queries) DeletePolicyBindingAccounts(ctx context.Context, bindingID string) error

func (*Queries) DeletePolicyBudgets added in v0.20.0

func (q *Queries) DeletePolicyBudgets(ctx context.Context, policyID string) error

func (*Queries) DeletePolicyPools added in v0.20.0

func (q *Queries) DeletePolicyPools(ctx context.Context, policyID string) error

func (*Queries) DeletePolicyRateLimits added in v0.20.0

func (q *Queries) DeletePolicyRateLimits(ctx context.Context, policyID string) error

func (*Queries) DeletePool added in v0.20.0

func (q *Queries) DeletePool(ctx context.Context, id string) error

func (*Queries) DeletePoolAccounts added in v0.20.0

func (q *Queries) DeletePoolAccounts(ctx context.Context, poolID string) error

func (*Queries) DeletePoolCredentials added in v0.20.0

func (q *Queries) DeletePoolCredentials(ctx context.Context, poolID string) error

func (*Queries) DeletePricing

func (q *Queries) DeletePricing(ctx context.Context, id string) error

func (*Queries) DeletePricingAtVersion added in v0.21.0

func (q *Queries) DeletePricingAtVersion(ctx context.Context, arg DeletePricingAtVersionParams) (int64, error)

func (*Queries) DeletePricingModels

func (q *Queries) DeletePricingModels(ctx context.Context, pricingID string) error

func (*Queries) DeleteProvider

func (q *Queries) DeleteProvider(ctx context.Context, id string) error

func (*Queries) DeleteProviderAtVersion added in v0.21.0

func (q *Queries) DeleteProviderAtVersion(ctx context.Context, arg DeleteProviderAtVersionParams) (int64, error)

func (*Queries) DeleteRateLimit

func (q *Queries) DeleteRateLimit(ctx context.Context, id string) error

func (*Queries) DeleteRateLimitAtVersion added in v0.21.0

func (q *Queries) DeleteRateLimitAtVersion(ctx context.Context, arg DeleteRateLimitAtVersionParams) (int64, error)

func (*Queries) DeleteRelayKey

func (q *Queries) DeleteRelayKey(ctx context.Context, id string) error

func (*Queries) DeleteSecret

func (q *Queries) DeleteSecret(ctx context.Context, id string) error

func (*Queries) DeleteSecretValue

func (q *Queries) DeleteSecretValue(ctx context.Context, id string) error

func (*Queries) DeleteSetting

func (q *Queries) DeleteSetting(ctx context.Context, section string) error

func (*Queries) DeleteUserPersonalAccount added in v0.20.0

func (q *Queries) DeleteUserPersonalAccount(ctx context.Context, userID string) error

func (*Queries) DemoteSecretDataKey added in v0.11.6

func (q *Queries) DemoteSecretDataKey(ctx context.Context, id pgtype.UUID) error

func (*Queries) DestroySecretDataKey added in v0.11.6

func (q *Queries) DestroySecretDataKey(ctx context.Context, id pgtype.UUID) error

func (*Queries) GetAccount added in v0.20.0

func (q *Queries) GetAccount(ctx context.Context, id string) (Account, error)

func (*Queries) GetBatch

func (q *Queries) GetBatch(ctx context.Context, id string) (Batch, error)

func (*Queries) GetBudget added in v0.20.0

func (q *Queries) GetBudget(ctx context.Context, id string) (Budget, error)

func (*Queries) GetCatalogIcon added in v0.30.1

func (q *Queries) GetCatalogIcon(ctx context.Context, name string) (GetCatalogIconRow, error)

func (*Queries) GetHost

func (q *Queries) GetHost(ctx context.Context, id string) (Host, error)

func (*Queries) GetHostBinding

func (q *Queries) GetHostBinding(ctx context.Context, id string) (HostBinding, error)

func (*Queries) GetManagedAccountID added in v0.20.0

func (q *Queries) GetManagedAccountID(ctx context.Context, managedKey pgtype.Text) (string, error)

func (*Queries) GetModel

func (q *Queries) GetModel(ctx context.Context, id string) (GetModelRow, error)

func (*Queries) GetOverlay added in v0.3.0

func (q *Queries) GetOverlay(ctx context.Context, arg GetOverlayParams) (Overlay, error)

func (*Queries) GetPolicy

func (q *Queries) GetPolicy(ctx context.Context, id string) (GetPolicyRow, error)

func (*Queries) GetPolicyBinding added in v0.10.0

func (q *Queries) GetPolicyBinding(ctx context.Context, id string) (PolicyBinding, error)

func (*Queries) GetPolicyBindingAccounts added in v0.20.0

func (q *Queries) GetPolicyBindingAccounts(ctx context.Context, bindingID string) ([]PolicyBindingAccount, error)

func (*Queries) GetPolicyBindingIDForAccount added in v0.20.0

func (q *Queries) GetPolicyBindingIDForAccount(ctx context.Context, accountID string) (string, error)

func (*Queries) GetPolicyBudgets added in v0.20.0

func (q *Queries) GetPolicyBudgets(ctx context.Context, policyID string) ([]PolicyBudget, error)

func (*Queries) GetPolicyPools added in v0.20.0

func (q *Queries) GetPolicyPools(ctx context.Context, policyID string) ([]PolicyPool, error)

func (*Queries) GetPolicyRateLimits added in v0.20.0

func (q *Queries) GetPolicyRateLimits(ctx context.Context, policyID string) ([]PolicyRateLimit, error)

func (*Queries) GetPool added in v0.20.0

func (q *Queries) GetPool(ctx context.Context, id string) (Pool, error)

func (*Queries) GetPoolAccounts added in v0.20.0

func (q *Queries) GetPoolAccounts(ctx context.Context, poolID string) ([]PoolAccount, error)

func (*Queries) GetPoolCredentials added in v0.20.0

func (q *Queries) GetPoolCredentials(ctx context.Context, poolID string) ([]PoolCredential, error)

func (*Queries) GetPricing

func (q *Queries) GetPricing(ctx context.Context, id string) (Pricing, error)

func (*Queries) GetPricingModels

func (q *Queries) GetPricingModels(ctx context.Context, pricingID string) ([]PricingModel, error)

func (*Queries) GetPrimarySecretDataKey added in v0.11.6

func (q *Queries) GetPrimarySecretDataKey(ctx context.Context, scope string) (GetPrimarySecretDataKeyRow, error)

func (*Queries) GetProvider

func (q *Queries) GetProvider(ctx context.Context, id string) (GetProviderRow, error)

func (*Queries) GetRateLimit

func (q *Queries) GetRateLimit(ctx context.Context, id string) (GetRateLimitRow, error)

func (*Queries) GetRelayKey

func (q *Queries) GetRelayKey(ctx context.Context, id string) (GetRelayKeyRow, error)

func (*Queries) GetSecret

func (q *Queries) GetSecret(ctx context.Context, id string) (GetSecretRow, error)

func (*Queries) GetSecretAccountID added in v0.20.0

func (q *Queries) GetSecretAccountID(ctx context.Context, id string) (string, error)

func (*Queries) GetSecretDataKey added in v0.11.6

func (q *Queries) GetSecretDataKey(ctx context.Context, id pgtype.UUID) (GetSecretDataKeyRow, error)

func (*Queries) GetSecretKeyringTarget added in v0.11.6

func (q *Queries) GetSecretKeyringTarget(ctx context.Context) ([]byte, error)

func (*Queries) GetSecretValue

func (q *Queries) GetSecretValue(ctx context.Context, id string) (GetSecretValueRow, error)

secret_values: generic stored-secret value store (app/secret). A sealed row carries its scope and the data key that sealed it; a legacy row (dek_id NULL) is AES-GCM under the master key with a separate nonce.

func (*Queries) GetSetting

func (q *Queries) GetSetting(ctx context.Context, section string) (Setting, error)

func (*Queries) GetUserPersonalAccount added in v0.20.0

func (q *Queries) GetUserPersonalAccount(ctx context.Context, userID string) (string, error)

func (*Queries) InsertAuditEvent added in v0.10.0

func (q *Queries) InsertAuditEvent(ctx context.Context, arg []InsertAuditEventParams) (int64, error)

── audit events (migration 0028) ────────────────────────────────────────────

func (*Queries) InsertManagedAccount added in v0.20.0

func (q *Queries) InsertManagedAccount(ctx context.Context, arg InsertManagedAccountParams) (int64, error)

A concurrent writer may create the same managed account, or take the name; either conflict inserts nothing and the caller looks again.

func (*Queries) InsertPolicyBindingAccount added in v0.20.0

func (q *Queries) InsertPolicyBindingAccount(ctx context.Context, arg InsertPolicyBindingAccountParams) error

func (*Queries) InsertPolicyBudget added in v0.20.0

func (q *Queries) InsertPolicyBudget(ctx context.Context, arg InsertPolicyBudgetParams) error

func (*Queries) InsertPolicyPool added in v0.20.0

func (q *Queries) InsertPolicyPool(ctx context.Context, arg InsertPolicyPoolParams) error

func (*Queries) InsertPolicyRateLimit added in v0.20.0

func (q *Queries) InsertPolicyRateLimit(ctx context.Context, arg InsertPolicyRateLimitParams) error

func (*Queries) InsertPoolAccount added in v0.20.0

func (q *Queries) InsertPoolAccount(ctx context.Context, arg InsertPoolAccountParams) error

func (*Queries) InsertPoolCredential added in v0.20.0

func (q *Queries) InsertPoolCredential(ctx context.Context, arg InsertPoolCredentialParams) error

func (*Queries) InsertPricingModel

func (q *Queries) InsertPricingModel(ctx context.Context, arg InsertPricingModelParams) error

func (*Queries) InsertSecretDataKey added in v0.11.6

func (q *Queries) InsertSecretDataKey(ctx context.Context, arg InsertSecretDataKeyParams) error

func (*Queries) InsertSecretEnv

func (q *Queries) InsertSecretEnv(ctx context.Context, arg InsertSecretEnvParams) (InsertSecretEnvRow, error)

func (*Queries) InsertSecretStored

func (q *Queries) InsertSecretStored(ctx context.Context, arg InsertSecretStoredParams) (InsertSecretStoredRow, error)

func (*Queries) InsertSecretStoredRef

func (q *Queries) InsertSecretStoredRef(ctx context.Context, arg InsertSecretStoredRefParams) (InsertSecretStoredRefRow, error)

InsertSecretStoredRef upserts a stored-mode HostKey row WITHOUT inline ciphertext — the encrypted value lives in secret_values (pkg/secret), keyed by this row's id. Replaces InsertSecretStored on the new path.

func (*Queries) ListAccounts added in v0.20.0

func (q *Queries) ListAccounts(ctx context.Context) ([]Account, error)

── accounts, pools, budgets (migration 0035) ────────────────────────────────

func (*Queries) ListAuditEvents added in v0.10.0

func (q *Queries) ListAuditEvents(ctx context.Context, arg ListAuditEventsParams) ([]AuditEvent, error)

func (*Queries) ListBatchItems

func (q *Queries) ListBatchItems(ctx context.Context, batchID string) ([]BatchItem, error)

func (*Queries) ListBatchesByRelayKey

func (q *Queries) ListBatchesByRelayKey(ctx context.Context, relayKeyHash string) ([]Batch, error)

func (*Queries) ListBudgets added in v0.20.0

func (q *Queries) ListBudgets(ctx context.Context) ([]Budget, error)

func (*Queries) ListHostBindings

func (q *Queries) ListHostBindings(ctx context.Context) ([]HostBinding, error)

── host_bindings (migration 0020) ───────────────────────────────────────────

func (*Queries) ListHosts

func (q *Queries) ListHosts(ctx context.Context) ([]Host, error)

── app/ arch (migration 0009) ───────────────────────────────────────────────

func (*Queries) ListModels

func (q *Queries) ListModels(ctx context.Context) ([]ListModelsRow, error)

func (*Queries) ListOverlays added in v0.3.0

func (q *Queries) ListOverlays(ctx context.Context) ([]Overlay, error)

func (*Queries) ListPolicies

func (q *Queries) ListPolicies(ctx context.Context) ([]ListPoliciesRow, error)

func (*Queries) ListPolicyBindingAccounts added in v0.20.0

func (q *Queries) ListPolicyBindingAccounts(ctx context.Context) ([]PolicyBindingAccount, error)

func (*Queries) ListPolicyBindings added in v0.10.0

func (q *Queries) ListPolicyBindings(ctx context.Context) ([]PolicyBinding, error)

── policy bindings (migration 0027) ─────────────────────────────────────────

func (*Queries) ListPolicyBudgets added in v0.20.0

func (q *Queries) ListPolicyBudgets(ctx context.Context) ([]PolicyBudget, error)

func (*Queries) ListPolicyPools added in v0.20.0

func (q *Queries) ListPolicyPools(ctx context.Context) ([]PolicyPool, error)

func (*Queries) ListPolicyRateLimits added in v0.20.0

func (q *Queries) ListPolicyRateLimits(ctx context.Context) ([]PolicyRateLimit, error)

func (*Queries) ListPoolAccounts added in v0.20.0

func (q *Queries) ListPoolAccounts(ctx context.Context) ([]PoolAccount, error)

func (*Queries) ListPoolCredentials added in v0.20.0

func (q *Queries) ListPoolCredentials(ctx context.Context) ([]PoolCredential, error)

func (*Queries) ListPools added in v0.20.0

func (q *Queries) ListPools(ctx context.Context) ([]Pool, error)

func (*Queries) ListPricingModels

func (q *Queries) ListPricingModels(ctx context.Context) ([]PricingModel, error)

func (*Queries) ListPricings

func (q *Queries) ListPricings(ctx context.Context) ([]Pricing, error)

── pricing (migration 0010) ─────────────────────────────────────────────────

func (*Queries) ListProviders

func (q *Queries) ListProviders(ctx context.Context) ([]ListProvidersRow, error)

func (*Queries) ListRateLimits

func (q *Queries) ListRateLimits(ctx context.Context) ([]ListRateLimitsRow, error)

func (*Queries) ListRelayKeys

func (q *Queries) ListRelayKeys(ctx context.Context) ([]ListRelayKeysRow, error)

func (*Queries) ListSealedSecretValues added in v0.11.6

func (q *Queries) ListSealedSecretValues(ctx context.Context, arg ListSealedSecretValuesParams) ([]ListSealedSecretValuesRow, error)

func (*Queries) ListSecretDataKeys added in v0.11.6

func (q *Queries) ListSecretDataKeys(ctx context.Context) ([]ListSecretDataKeysRow, error)

secret_data_keys / secret_keyring: the data keys and target KEK behind app/secret's key ring.

func (*Queries) ListSecretValues added in v0.11.6

func (q *Queries) ListSecretValues(ctx context.Context, arg ListSecretValuesParams) ([]ListSecretValuesRow, error)

func (*Queries) ListSecrets

func (q *Queries) ListSecrets(ctx context.Context) ([]ListSecretsRow, error)

func (*Queries) ListSettings

func (q *Queries) ListSettings(ctx context.Context) ([]Setting, error)

func (*Queries) ListStaleSecretValues added in v0.11.6

func (q *Queries) ListStaleSecretValues(ctx context.Context, arg ListStaleSecretValuesParams) ([]ListStaleSecretValuesRow, error)

ListStaleSecretValues pages through rows the rewriter should move: legacy rows and rows under a data key that is no longer Primary.

func (*Queries) ListStoredSecretsForRotation

func (q *Queries) ListStoredSecretsForRotation(ctx context.Context) ([]ListStoredSecretsForRotationRow, error)

func (*Queries) ListUserIDsIn added in v0.10.0

func (q *Queries) ListUserIDsIn(ctx context.Context, dollar_1 []string) ([]string, error)

Membership check for a whole id list in one round trip.

func (*Queries) ListUserPersonalAccounts added in v0.20.0

func (q *Queries) ListUserPersonalAccounts(ctx context.Context) ([]UserPersonalAccount, error)

func (*Queries) ListUserTokenVersionsAndDisabled added in v0.11.0

func (q *Queries) ListUserTokenVersionsAndDisabled(ctx context.Context) ([]ListUserTokenVersionsAndDisabledRow, error)

One read feeds both snapshot views of users: enabled accounts' token versions and the ids of disabled ones.

func (*Queries) ListUsernamesIn added in v0.11.1

func (q *Queries) ListUsernamesIn(ctx context.Context, dollar_1 []string) ([]ListUsernamesInRow, error)

Names a whole id list in one round trip, for labelling usage rows by user.

func (*Queries) LockPrimarySecretDataKey added in v0.11.6

func (q *Queries) LockPrimarySecretDataKey(ctx context.Context, scope string) (pgtype.UUID, error)

func (*Queries) LockSecretDataKeyForDestroy added in v0.11.6

LockSecretDataKeyForDestroy reads a key's state under a row lock and whether it was demoted at least min_age_seconds ago by the database clock.

func (*Queries) LockSecretOwner added in v0.11.6

func (q *Queries) LockSecretOwner(ctx context.Context, id string) (LockSecretOwnerRow, error)

LockSecretOwner reads the owner of the host key with this id, which decides the scope of a legacy row, and holds the row until the transaction ends so an owner change waits for a write that used the old owner. Take it before the secret_values row: host key writes lock secrets first.

func (*Queries) LockSecretValue added in v0.11.6

func (q *Queries) LockSecretValue(ctx context.Context, id string) (LockSecretValueRow, error)

func (*Queries) PruneAuditEvents added in v0.10.0

func (q *Queries) PruneAuditEvents(ctx context.Context, ts pgtype.Timestamptz) (int64, error)

func (*Queries) RelayKeyHashTaken added in v0.10.0

func (q *Queries) RelayKeyHashTaken(ctx context.Context, arg RelayKeyHashTakenParams) (bool, error)

Either hash of another row shadows this one on the hash index, so both columns are checked against both of the row's hashes.

func (*Queries) ReplaceSecretValueLegacy added in v0.11.6

func (q *Queries) ReplaceSecretValueLegacy(ctx context.Context, arg ReplaceSecretValueLegacyParams) (int64, error)

func (*Queries) RotateRelayKey added in v0.10.0

func (q *Queries) RotateRelayKey(ctx context.Context, arg RotateRelayKeyParams) (int64, error)

Conditional on the hash AND the row version the caller read, so neither a concurrent rotation nor a concurrent update is overwritten by a rotation computed against the older row.

func (*Queries) SetAccountMembership added in v0.20.0

func (q *Queries) SetAccountMembership(ctx context.Context, arg SetAccountMembershipParams) (int64, error)

A writer working from an older read of the row changes nothing: the row moved on since, and the next plan lists it again.

func (*Queries) SetBatchCompleted

func (q *Queries) SetBatchCompleted(ctx context.Context, arg SetBatchCompletedParams) error

func (*Queries) SetBatchStatus

func (q *Queries) SetBatchStatus(ctx context.Context, arg SetBatchStatusParams) error

func (*Queries) SetPolicyModels

func (q *Queries) SetPolicyModels(ctx context.Context, arg SetPolicyModelsParams) error

func (*Queries) SetSecretKeyringTarget added in v0.11.6

func (q *Queries) SetSecretKeyringTarget(ctx context.Context, arg SetSecretKeyringTargetParams) (int64, error)

func (*Queries) SetUserPersonalAccount added in v0.20.0

func (q *Queries) SetUserPersonalAccount(ctx context.Context, arg SetUserPersonalAccountParams) error

func (*Queries) TouchHostKeysLastUsed added in v0.21.0

func (q *Queries) TouchHostKeysLastUsed(ctx context.Context, arg TouchHostKeysLastUsedParams) error

func (*Queries) TouchRelayKeysLastUsed added in v0.21.0

func (q *Queries) TouchRelayKeysLastUsed(ctx context.Context, arg TouchRelayKeysLastUsedParams) error

Ids deleted since they were used match no row. Times only move forward, so pods flushing at once keep the later one; a row already as late is skipped and writes no tuple. The triggers ignore a change to last_used_at alone.

func (*Queries) UpdateSecretCiphertext

func (q *Queries) UpdateSecretCiphertext(ctx context.Context, arg UpdateSecretCiphertextParams) error

func (*Queries) UpdateSecretDataKeyWrapped added in v0.11.6

func (q *Queries) UpdateSecretDataKeyWrapped(ctx context.Context, arg UpdateSecretDataKeyWrappedParams) (int64, error)

func (*Queries) UpdateSecretEnv

func (q *Queries) UpdateSecretEnv(ctx context.Context, arg UpdateSecretEnvParams) (UpdateSecretEnvRow, error)

func (*Queries) UpdateSecretStatus added in v0.9.10

func (q *Queries) UpdateSecretStatus(ctx context.Context, arg UpdateSecretStatusParams) error

func (*Queries) UpdateSecretStored

func (q *Queries) UpdateSecretStored(ctx context.Context, arg UpdateSecretStoredParams) (UpdateSecretStoredRow, error)

func (*Queries) UpsertAccount added in v0.20.0

func (q *Queries) UpsertAccount(ctx context.Context, arg UpsertAccountParams) (int64, error)

grouped_by_relay is never written: a new row starts without it, and an update keeps it until the row names its org.

func (*Queries) UpsertBudget added in v0.20.0

func (q *Queries) UpsertBudget(ctx context.Context, arg UpsertBudgetParams) (int64, error)

func (*Queries) UpsertCatalogIcon added in v0.30.1

func (q *Queries) UpsertCatalogIcon(ctx context.Context, arg UpsertCatalogIconParams) error

func (*Queries) UpsertHost

func (q *Queries) UpsertHost(ctx context.Context, arg UpsertHostParams) (int64, error)

func (*Queries) UpsertHostBinding

func (q *Queries) UpsertHostBinding(ctx context.Context, arg UpsertHostBindingParams) (int64, error)

func (*Queries) UpsertModel

func (q *Queries) UpsertModel(ctx context.Context, arg UpsertModelParams) (int64, error)

func (*Queries) UpsertOverlay added in v0.3.0

func (q *Queries) UpsertOverlay(ctx context.Context, arg UpsertOverlayParams) error

func (*Queries) UpsertPolicy

func (q *Queries) UpsertPolicy(ctx context.Context, arg UpsertPolicyParams) (int64, error)

func (*Queries) UpsertPolicyBinding added in v0.10.0

func (q *Queries) UpsertPolicyBinding(ctx context.Context, arg UpsertPolicyBindingParams) (int64, error)

func (*Queries) UpsertPool added in v0.20.0

func (q *Queries) UpsertPool(ctx context.Context, arg UpsertPoolParams) (int64, error)

func (*Queries) UpsertPricing

func (q *Queries) UpsertPricing(ctx context.Context, arg UpsertPricingParams) (int64, error)

func (*Queries) UpsertProvider

func (q *Queries) UpsertProvider(ctx context.Context, arg UpsertProviderParams) (int64, error)

Every catalog upsert takes an optional expected_version: when set, an existing row is only updated while its resource_version still matches, and zero affected rows means the caller's copy is stale.

func (*Queries) UpsertRateLimit

func (q *Queries) UpsertRateLimit(ctx context.Context, arg UpsertRateLimitParams) (int64, error)

func (*Queries) UpsertRelayKey

func (q *Queries) UpsertRelayKey(ctx context.Context, arg UpsertRelayKeyParams) (int64, error)

func (*Queries) UpsertSealedSecretValue added in v0.11.6

func (q *Queries) UpsertSealedSecretValue(ctx context.Context, arg UpsertSealedSecretValueParams) error

func (*Queries) UpsertSecret

func (q *Queries) UpsertSecret(ctx context.Context, arg UpsertSecretParams) error

UpsertSecret is kept for the seed CLI (YAML-import path). Deprecated for new code; use InsertSecretEnv / InsertSecretStored.

func (*Queries) UpsertSetting

func (q *Queries) UpsertSetting(ctx context.Context, arg UpsertSettingParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type RateLimit

type RateLimit struct {
	Name            string             `db:"name" json:"name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ID              string             `db:"id" json:"id"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type RelayKey

type RelayKey struct {
	Name            string             `db:"name" json:"name"`
	KeyHash         string             `db:"key_hash" json:"key_hash"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ID              string             `db:"id" json:"id"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	PrincipalSaID   pgtype.Text        `db:"principal_sa_id" json:"principal_sa_id"`
	PrincipalUserID pgtype.Text        `db:"principal_user_id" json:"principal_user_id"`
	PreviousKeyHash pgtype.Text        `db:"previous_key_hash" json:"previous_key_hash"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
	AccountID       pgtype.Text        `db:"account_id" json:"account_id"`
	LastUsedAt      pgtype.Timestamptz `db:"last_used_at" json:"last_used_at"`
}

type RelayKeyHashTakenParams added in v0.10.0

type RelayKeyHashTakenParams struct {
	KeyHash   string `db:"key_hash" json:"key_hash"`
	KeyHash_2 string `db:"key_hash_2" json:"key_hash_2"`
	ID        string `db:"id" json:"id"`
}

type ReplaceSecretValueLegacyParams added in v0.11.6

type ReplaceSecretValueLegacyParams struct {
	ID         string `db:"id" json:"id"`
	Ciphertext []byte `db:"ciphertext" json:"ciphertext"`
	Nonce      []byte `db:"nonce" json:"nonce"`
	Previous   []byte `db:"previous" json:"previous"`
}

type Role added in v0.10.0

type Role struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type RoleBinding added in v0.10.0

type RoleBinding struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	RoleID          string             `db:"role_id" json:"role_id"`
	ScopeKind       string             `db:"scope_kind" json:"scope_kind"`
	ScopeID         pgtype.Text        `db:"scope_id" json:"scope_id"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type RoleBindingSubject added in v0.10.0

type RoleBindingSubject struct {
	BindingID     string      `db:"binding_id" json:"binding_id"`
	Kind          string      `db:"kind" json:"kind"`
	SubjectID     pgtype.Text `db:"subject_id" json:"subject_id"`
	SubjectName   pgtype.Text `db:"subject_name" json:"subject_name"`
	SubjectUserID pgtype.Text `db:"subject_user_id" json:"subject_user_id"`
	SubjectSaID   pgtype.Text `db:"subject_sa_id" json:"subject_sa_id"`
	Position      int32       `db:"position" json:"position"`
}

type RotateRelayKeyParams added in v0.10.0

type RotateRelayKeyParams struct {
	ID              string             `db:"id" json:"id"`
	KeyHash         string             `db:"key_hash" json:"key_hash"`
	PreviousKeyHash pgtype.Text        `db:"previous_key_hash" json:"previous_key_hash"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	KeyHash_2       string             `db:"key_hash_2" json:"key_hash_2"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type Secret

type Secret struct {
	Name            string             `db:"name" json:"name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ValueKind       string             `db:"value_kind" json:"value_kind"`
	ValueFromEnv    pgtype.Text        `db:"value_from_env" json:"value_from_env"`
	ValueCiphertext []byte             `db:"value_ciphertext" json:"value_ciphertext"`
	ValueNonce      []byte             `db:"value_nonce" json:"value_nonce"`
	ID              string             `db:"id" json:"id"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	ValueKeyVersion pgtype.Int4        `db:"value_key_version" json:"value_key_version"`
	Status          []byte             `db:"status" json:"status"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
	LastUsedAt      pgtype.Timestamptz `db:"last_used_at" json:"last_used_at"`
}

type SecretDataKey added in v0.11.6

type SecretDataKey struct {
	ID        pgtype.UUID        `db:"id" json:"id"`
	Scope     string             `db:"scope" json:"scope"`
	State     string             `db:"state" json:"state"`
	KekID     []byte             `db:"kek_id" json:"kek_id"`
	Wrapped   []byte             `db:"wrapped" json:"wrapped"`
	CreatedAt pgtype.Timestamptz `db:"created_at" json:"created_at"`
	DemotedAt pgtype.Timestamptz `db:"demoted_at" json:"demoted_at"`
	UpdatedAt pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type SecretKeyring added in v0.11.6

type SecretKeyring struct {
	Singleton   bool   `db:"singleton" json:"singleton"`
	TargetKekID []byte `db:"target_kek_id" json:"target_kek_id"`
}

type SecretValue

type SecretValue struct {
	ID         string             `db:"id" json:"id"`
	Ciphertext []byte             `db:"ciphertext" json:"ciphertext"`
	Nonce      []byte             `db:"nonce" json:"nonce"`
	KeyVersion int32              `db:"key_version" json:"key_version"`
	CreatedAt  pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt  pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	Scope      pgtype.Text        `db:"scope" json:"scope"`
	DekID      pgtype.UUID        `db:"dek_id" json:"dek_id"`
}

type SecretValuesLegacy added in v0.11.6

type SecretValuesLegacy struct {
	ID         string             `db:"id" json:"id"`
	Ciphertext []byte             `db:"ciphertext" json:"ciphertext"`
	Nonce      []byte             `db:"nonce" json:"nonce"`
	KeyVersion int32              `db:"key_version" json:"key_version"`
	CreatedAt  pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt  pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type ServiceAccount added in v0.10.0

type ServiceAccount struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	ProjectID       string             `db:"project_id" json:"project_id"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type SetAccountMembershipParams added in v0.20.0

type SetAccountMembershipParams struct {
	ID                  string `db:"id" json:"id"`
	Closed              bool   `db:"closed" json:"closed"`
	FollowsRoleBindings bool   `db:"follows_role_bindings" json:"follows_role_bindings"`
	ResourceVersion     int64  `db:"resource_version" json:"resource_version"`
}

type SetBatchCompletedParams

type SetBatchCompletedParams struct {
	ID     string `db:"id" json:"id"`
	Status string `db:"status" json:"status"`
}

type SetBatchStatusParams

type SetBatchStatusParams struct {
	ID     string `db:"id" json:"id"`
	Status string `db:"status" json:"status"`
}

type SetPolicyModelsParams

type SetPolicyModelsParams struct {
	ID     string `db:"id" json:"id"`
	Models []byte `db:"models" json:"models"`
}

type SetSecretKeyringTargetParams added in v0.11.6

type SetSecretKeyringTargetParams struct {
	Target   []byte `db:"target" json:"target"`
	Expected []byte `db:"expected" json:"expected"`
}

type SetUserPersonalAccountParams added in v0.20.0

type SetUserPersonalAccountParams struct {
	UserID string `db:"user_id" json:"user_id"`
	Value  string `db:"value" json:"value"`
}

type Setting

type Setting struct {
	Section   string             `db:"section" json:"section"`
	Value     []byte             `db:"value" json:"value"`
	UpdatedAt pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type Team added in v0.10.0

type Team struct {
	ID              string             `db:"id" json:"id"`
	Name            string             `db:"name" json:"name"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	Metadata        []byte             `db:"metadata" json:"metadata"`
	Spec            []byte             `db:"spec" json:"spec"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	ResourceVersion int64              `db:"resource_version" json:"resource_version"`
}

type TouchHostKeysLastUsedParams added in v0.21.0

type TouchHostKeysLastUsedParams struct {
	Ids    []string             `db:"ids" json:"ids"`
	UsedAt []pgtype.Timestamptz `db:"used_at" json:"used_at"`
}

type TouchRelayKeysLastUsedParams added in v0.21.0

type TouchRelayKeysLastUsedParams struct {
	Ids    []string             `db:"ids" json:"ids"`
	UsedAt []pgtype.Timestamptz `db:"used_at" json:"used_at"`
}

type UpdateSecretCiphertextParams

type UpdateSecretCiphertextParams struct {
	ID              string      `db:"id" json:"id"`
	ValueCiphertext []byte      `db:"value_ciphertext" json:"value_ciphertext"`
	ValueNonce      []byte      `db:"value_nonce" json:"value_nonce"`
	ValueKeyVersion pgtype.Int4 `db:"value_key_version" json:"value_key_version"`
}

type UpdateSecretDataKeyWrappedParams added in v0.11.6

type UpdateSecretDataKeyWrappedParams struct {
	ID      pgtype.UUID `db:"id" json:"id"`
	Wrapped []byte      `db:"wrapped" json:"wrapped"`
	ToKek   []byte      `db:"to_kek" json:"to_kek"`
	FromKek []byte      `db:"from_kek" json:"from_kek"`
}

type UpdateSecretEnvParams

type UpdateSecretEnvParams struct {
	ID           string      `db:"id" json:"id"`
	ValueFromEnv pgtype.Text `db:"value_from_env" json:"value_from_env"`
}

type UpdateSecretEnvRow

type UpdateSecretEnvRow struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	ValueKind       string      `db:"value_kind" json:"value_kind"`
	ValueFromEnv    pgtype.Text `db:"value_from_env" json:"value_from_env"`
	ValueCiphertext []byte      `db:"value_ciphertext" json:"value_ciphertext"`
	ValueNonce      []byte      `db:"value_nonce" json:"value_nonce"`
	ValueKeyVersion pgtype.Int4 `db:"value_key_version" json:"value_key_version"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
}

type UpdateSecretStatusParams added in v0.9.10

type UpdateSecretStatusParams struct {
	ID     string `db:"id" json:"id"`
	Status []byte `db:"status" json:"status"`
}

type UpdateSecretStoredParams

type UpdateSecretStoredParams struct {
	ID              string      `db:"id" json:"id"`
	ValueCiphertext []byte      `db:"value_ciphertext" json:"value_ciphertext"`
	ValueNonce      []byte      `db:"value_nonce" json:"value_nonce"`
	ValueKeyVersion pgtype.Int4 `db:"value_key_version" json:"value_key_version"`
}

type UpdateSecretStoredRow

type UpdateSecretStoredRow struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	ValueKind       string      `db:"value_kind" json:"value_kind"`
	ValueFromEnv    pgtype.Text `db:"value_from_env" json:"value_from_env"`
	ValueCiphertext []byte      `db:"value_ciphertext" json:"value_ciphertext"`
	ValueNonce      []byte      `db:"value_nonce" json:"value_nonce"`
	ValueKeyVersion pgtype.Int4 `db:"value_key_version" json:"value_key_version"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
}

type UpsertAccountParams added in v0.20.0

type UpsertAccountParams struct {
	ID                  string      `db:"id" json:"id"`
	Name                string      `db:"name" json:"name"`
	DisplayName         string      `db:"display_name" json:"display_name"`
	HostID              pgtype.Text `db:"host_id" json:"host_id"`
	Metadata            []byte      `db:"metadata" json:"metadata"`
	Spec                []byte      `db:"spec" json:"spec"`
	Kind                string      `db:"kind" json:"kind"`
	ManagedKey          pgtype.Text `db:"managed_key" json:"managed_key"`
	HolderUserID        pgtype.Text `db:"holder_user_id" json:"holder_user_id"`
	HolderSaID          pgtype.Text `db:"holder_sa_id" json:"holder_sa_id"`
	TeamID              pgtype.Text `db:"team_id" json:"team_id"`
	ProjectID           pgtype.Text `db:"project_id" json:"project_id"`
	Closed              bool        `db:"closed" json:"closed"`
	FollowsRoleBindings bool        `db:"follows_role_bindings" json:"follows_role_bindings"`
	SourceAccountID     pgtype.Text `db:"source_account_id" json:"source_account_id"`
	ShareReceiver       pgtype.Text `db:"share_receiver" json:"share_receiver"`
	ShareUserID         pgtype.Text `db:"share_user_id" json:"share_user_id"`
	ExpectedVersion     pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type UpsertBudgetParams added in v0.20.0

type UpsertBudgetParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
	ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type UpsertCatalogIconParams added in v0.30.1

type UpsertCatalogIconParams struct {
	Name   string `db:"name" json:"name"`
	Body   []byte `db:"body" json:"body"`
	Sha256 string `db:"sha256" json:"sha256"`
}

type UpsertHostBindingParams

type UpsertHostBindingParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	ModelID         string      `db:"model_id" json:"model_id"`
	HostID          string      `db:"host_id" json:"host_id"`
	PricingID       pgtype.Text `db:"pricing_id" json:"pricing_id"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
	ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type UpsertHostParams

type UpsertHostParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
	ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type UpsertModelParams

type UpsertModelParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
	ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type UpsertOverlayParams added in v0.3.0

type UpsertOverlayParams struct {
	Kind       string `db:"kind" json:"kind"`
	ResourceID string `db:"resource_id" json:"resource_id"`
	Patch      []byte `db:"patch" json:"patch"`
}

type UpsertPolicyBindingParams added in v0.10.0

type UpsertPolicyBindingParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	ProjectID       pgtype.Text `db:"project_id" json:"project_id"`
	TeamID          pgtype.Text `db:"team_id" json:"team_id"`
	UserID          pgtype.Text `db:"user_id" json:"user_id"`
	PolicyID        string      `db:"policy_id" json:"policy_id"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
	ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type UpsertPolicyParams

type UpsertPolicyParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
	Models          []byte      `db:"models" json:"models"`
	ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type UpsertPoolParams added in v0.20.0

type UpsertPoolParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	HostID          string      `db:"host_id" json:"host_id"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
	ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type UpsertPricingParams

type UpsertPricingParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	HostID          string      `db:"host_id" json:"host_id"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
	ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type UpsertProviderParams

type UpsertProviderParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
	ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type UpsertRateLimitParams

type UpsertRateLimitParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
	ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type UpsertRelayKeyParams

type UpsertRelayKeyParams struct {
	ID              string      `db:"id" json:"id"`
	Name            string      `db:"name" json:"name"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	KeyHash         string      `db:"key_hash" json:"key_hash"`
	PreviousKeyHash pgtype.Text `db:"previous_key_hash" json:"previous_key_hash"`
	PrincipalSaID   pgtype.Text `db:"principal_sa_id" json:"principal_sa_id"`
	PrincipalUserID pgtype.Text `db:"principal_user_id" json:"principal_user_id"`
	AccountID       pgtype.Text `db:"account_id" json:"account_id"`
	Metadata        []byte      `db:"metadata" json:"metadata"`
	Spec            []byte      `db:"spec" json:"spec"`
	ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}

type UpsertSealedSecretValueParams added in v0.11.6

type UpsertSealedSecretValueParams struct {
	ID         string      `db:"id" json:"id"`
	Ciphertext []byte      `db:"ciphertext" json:"ciphertext"`
	Scope      pgtype.Text `db:"scope" json:"scope"`
	DekID      pgtype.UUID `db:"dek_id" json:"dek_id"`
}

type UpsertSecretParams

type UpsertSecretParams struct {
	ID          string `db:"id" json:"id"`
	Name        string `db:"name" json:"name"`
	DisplayName string `db:"display_name" json:"display_name"`
	Metadata    []byte `db:"metadata" json:"metadata"`
	Spec        []byte `db:"spec" json:"spec"`
}

type UpsertSettingParams

type UpsertSettingParams struct {
	Section string `db:"section" json:"section"`
	Value   []byte `db:"value" json:"value"`
}

type User added in v0.7.0

type User struct {
	ID           string             `db:"id" json:"id"`
	Username     string             `db:"username" json:"username"`
	Email        pgtype.Text        `db:"email" json:"email"`
	PasswordHash pgtype.Text        `db:"password_hash" json:"password_hash"`
	OidcSubject  pgtype.Text        `db:"oidc_subject" json:"oidc_subject"`
	Roles        []string           `db:"roles" json:"roles"`
	Disabled     bool               `db:"disabled" json:"disabled"`
	CreatedAt    pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt    pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	TokenVersion int32              `db:"token_version" json:"token_version"`
}

type UserPersonalAccount added in v0.20.0

type UserPersonalAccount struct {
	UserID string `db:"user_id" json:"user_id"`
	Value  string `db:"value" json:"value"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL