gen

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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"`
}

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 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"`
}

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
}

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 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"`
}

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"`
	RateLimitID pgtype.Text        `db:"rate_limit_id" json:"rate_limit_id"`
	Models      []byte             `db:"models" json:"models"`
	CreatedAt   pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt   pgtype.Timestamptz `db:"updated_at" json:"updated_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"`
}

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"`
}

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"`
	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"`
}

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"`
	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"`
}

type GetSecretValueRow

type GetSecretValueRow struct {
	Ciphertext []byte `db:"ciphertext" json:"ciphertext"`
	Nonce      []byte `db:"nonce" json:"nonce"`
	KeyVersion int32  `db:"key_version" json:"key_version"`
}

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"`
}

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"`
}

type InsertPolicyHostKeyParams

type InsertPolicyHostKeyParams struct {
	PolicyID  string `db:"policy_id" json:"policy_id"`
	HostKeyID string `db:"host_key_id" json:"host_key_id"`
	Position  int32  `db:"position" json:"position"`
}

type InsertPolicyModelParams

type InsertPolicyModelParams struct {
	PolicyID string `db:"policy_id" json:"policy_id"`
	ModelID  string `db:"model_id" json:"model_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 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"`
}

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"`
}

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 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"`
}

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"`
	CreatedAt   pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt   pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type ListPoliciesWithRateLimitRow

type ListPoliciesWithRateLimitRow 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"`
	RateLimitID pgtype.Text        `db:"rate_limit_id" json:"rate_limit_id"`
	Models      []byte             `db:"models" json:"models"`
	CreatedAt   pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt   pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

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"`
}

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"`
}

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"`
	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"`
}

type ListSecretValuesForRotationRow

type ListSecretValuesForRotationRow 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"`
}

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"`
	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"`
}

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 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"`
}

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"`
	RateLimitID pgtype.Text        `db:"rate_limit_id" json:"rate_limit_id"`
	Models      []byte             `db:"models" json:"models"`
}

type PolicyHostKey

type PolicyHostKey struct {
	PolicyID  string `db:"policy_id" json:"policy_id"`
	HostKeyID string `db:"host_key_id" json:"host_key_id"`
	Position  int32  `db:"position" json:"position"`
}

type PolicyModel

type PolicyModel struct {
	PolicyID string `db:"policy_id" json:"policy_id"`
	ModelID  string `db:"model_id" json:"model_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"`
}

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 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"`
}

type Queries

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

func New

func New(db DBTX) *Queries

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) DeleteHost

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

func (*Queries) DeleteHostBinding

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

func (*Queries) DeleteModel

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

func (*Queries) DeleteOverlay added in v0.3.0

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

func (*Queries) DeletePolicy

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

func (*Queries) DeletePolicyHostKeys

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

func (*Queries) DeletePolicyModels

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

func (*Queries) DeletePricing

func (q *Queries) DeletePricing(ctx context.Context, id string) 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) DeleteRateLimit

func (q *Queries) DeleteRateLimit(ctx context.Context, id string) 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) GetBatch

func (q *Queries) GetBatch(ctx context.Context, id string) (Batch, 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) 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) GetPolicyHostKeys

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

func (*Queries) GetPolicyModels

func (q *Queries) GetPolicyModels(ctx context.Context, policyID string) ([]PolicyModel, 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) 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) GetSecretValue

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

secret_values: generic stored-secret value store (pkg/secret "stored").

func (*Queries) GetSetting

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

func (*Queries) InsertPolicyHostKey

func (q *Queries) InsertPolicyHostKey(ctx context.Context, arg InsertPolicyHostKeyParams) error

func (*Queries) InsertPolicyModel

func (q *Queries) InsertPolicyModel(ctx context.Context, arg InsertPolicyModelParams) error

func (*Queries) InsertPricingModel

func (q *Queries) InsertPricingModel(ctx context.Context, arg InsertPricingModelParams) 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) 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) 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) ListPoliciesWithRateLimit

func (q *Queries) ListPoliciesWithRateLimit(ctx context.Context) ([]ListPoliciesWithRateLimitRow, error)

func (*Queries) ListPolicyHostKeys

func (q *Queries) ListPolicyHostKeys(ctx context.Context) ([]PolicyHostKey, error)

func (*Queries) ListPolicyModels

func (q *Queries) ListPolicyModels(ctx context.Context) ([]PolicyModel, 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) ListSecretValuesForRotation

func (q *Queries) ListSecretValuesForRotation(ctx context.Context) ([]ListSecretValuesForRotationRow, 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) ListStoredSecretsForRotation

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

func (*Queries) MaxSecretValueKeyVersion

func (q *Queries) MaxSecretValueKeyVersion(ctx context.Context) (int32, error)

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) SetPolicyRateLimit

func (q *Queries) SetPolicyRateLimit(ctx context.Context, arg SetPolicyRateLimitParams) error

func (*Queries) UpdateSecretCiphertext

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

func (*Queries) UpdateSecretEnv

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

func (*Queries) UpdateSecretStored

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

func (*Queries) UpsertHost

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

func (*Queries) UpsertHostBinding

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

func (*Queries) UpsertModel

func (q *Queries) UpsertModel(ctx context.Context, arg UpsertModelParams) 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) error

func (*Queries) UpsertPricing

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

func (*Queries) UpsertProvider

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

func (*Queries) UpsertRateLimit

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

func (*Queries) UpsertRelayKey

func (q *Queries) UpsertRelayKey(ctx context.Context, arg UpsertRelayKeyParams) 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) UpsertSecretValue

func (q *Queries) UpsertSecretValue(ctx context.Context, arg UpsertSecretValueParams) error

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"`
}

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"`
}

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"`
}

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"`
}

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 SetPolicyRateLimitParams

type SetPolicyRateLimitParams struct {
	ID          string      `db:"id" json:"id"`
	RateLimitID pgtype.Text `db:"rate_limit_id" json:"rate_limit_id"`
}

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 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 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 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 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"`
}

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"`
}

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"`
}

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 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"`
}

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"`
}

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"`
}

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"`
}

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"`
	Metadata    []byte `db:"metadata" json:"metadata"`
	Spec        []byte `db:"spec" json:"spec"`
}

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 UpsertSecretValueParams

type UpsertSecretValueParams 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"`
}

type UpsertSettingParams

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

Jump to

Keyboard shortcuts

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