Documentation
¶
Index ¶
- type AuditEvent
- type Batch
- type BatchItem
- type CreateBatchItemParams
- type CreateBatchParams
- type DBTX
- type DeleteOverlayParams
- type GetModelRow
- type GetOverlayParams
- type GetPolicyBindingSubjectsRow
- type GetPolicyRow
- type GetProviderRow
- type GetRateLimitRow
- type GetRelayKeyRow
- type GetRoleBindingSubjectsRow
- type GetSecretRow
- type GetSecretValueRow
- type Group
- type GroupMember
- type Host
- type HostBinding
- type InsertAuditEventParams
- type InsertGroupMemberParams
- type InsertPolicyBindingSubjectParams
- type InsertPolicyHostKeyParams
- type InsertPolicyModelParams
- type InsertPricingModelParams
- type InsertRoleBindingSubjectParams
- type InsertSecretEnvParams
- type InsertSecretEnvRow
- type InsertSecretStoredParams
- type InsertSecretStoredRefParams
- type InsertSecretStoredRefRow
- type InsertSecretStoredRow
- type ListAuditEventsParams
- type ListModelsRow
- type ListPoliciesRow
- type ListPoliciesWithRateLimitRow
- type ListPolicyBindingSubjectsRow
- type ListProvidersRow
- type ListRateLimitsRow
- type ListRelayKeysRow
- type ListRoleBindingSubjectsRow
- type ListSecretValuesForRotationRow
- type ListSecretsRow
- type ListStoredSecretsForRotationRow
- type ListUserTokenVersionsRow
- type Model
- type Overlay
- type Policy
- type PolicyBinding
- type PolicyBindingSubject
- type PolicyHostKey
- type PolicyModel
- type Pricing
- type PricingModel
- type Project
- type Provider
- type Queries
- func (q *Queries) BumpUserTokenVersion(ctx context.Context, id string) error
- func (q *Queries) CreateBatch(ctx context.Context, arg CreateBatchParams) error
- func (q *Queries) CreateBatchItem(ctx context.Context, arg CreateBatchItemParams) error
- func (q *Queries) DeleteGroup(ctx context.Context, id string) error
- func (q *Queries) DeleteGroupMembers(ctx context.Context, groupID string) error
- func (q *Queries) DeleteHost(ctx context.Context, id string) error
- func (q *Queries) DeleteHostBinding(ctx context.Context, id string) error
- func (q *Queries) DeleteModel(ctx context.Context, id string) error
- func (q *Queries) DeleteOverlay(ctx context.Context, arg DeleteOverlayParams) error
- func (q *Queries) DeletePolicy(ctx context.Context, id string) error
- func (q *Queries) DeletePolicyBinding(ctx context.Context, id string) error
- func (q *Queries) DeletePolicyBindingSubjects(ctx context.Context, bindingID string) error
- func (q *Queries) DeletePolicyHostKeys(ctx context.Context, policyID string) error
- func (q *Queries) DeletePolicyModels(ctx context.Context, policyID string) error
- func (q *Queries) DeletePricing(ctx context.Context, id string) error
- func (q *Queries) DeletePricingModels(ctx context.Context, pricingID string) error
- func (q *Queries) DeleteProject(ctx context.Context, id string) error
- func (q *Queries) DeleteProvider(ctx context.Context, id string) error
- func (q *Queries) DeleteRateLimit(ctx context.Context, id string) error
- func (q *Queries) DeleteRelayKey(ctx context.Context, id string) error
- func (q *Queries) DeleteRole(ctx context.Context, id string) error
- func (q *Queries) DeleteRoleBinding(ctx context.Context, id string) error
- func (q *Queries) DeleteRoleBindingSubjects(ctx context.Context, bindingID string) error
- func (q *Queries) DeleteSecret(ctx context.Context, id string) error
- func (q *Queries) DeleteSecretValue(ctx context.Context, id string) error
- func (q *Queries) DeleteServiceAccount(ctx context.Context, id string) error
- func (q *Queries) DeleteSetting(ctx context.Context, section string) error
- func (q *Queries) DeleteTeam(ctx context.Context, id string) error
- func (q *Queries) DeleteUser(ctx context.Context, id string) error
- func (q *Queries) GetBatch(ctx context.Context, id string) (Batch, error)
- func (q *Queries) GetGroup(ctx context.Context, id string) (Group, error)
- func (q *Queries) GetGroupMembers(ctx context.Context, groupID string) ([]GroupMember, error)
- func (q *Queries) GetHost(ctx context.Context, id string) (Host, error)
- func (q *Queries) GetHostBinding(ctx context.Context, id string) (HostBinding, error)
- func (q *Queries) GetModel(ctx context.Context, id string) (GetModelRow, error)
- func (q *Queries) GetOverlay(ctx context.Context, arg GetOverlayParams) (Overlay, error)
- func (q *Queries) GetPolicy(ctx context.Context, id string) (GetPolicyRow, error)
- func (q *Queries) GetPolicyBinding(ctx context.Context, id string) (PolicyBinding, error)
- func (q *Queries) GetPolicyBindingSubjects(ctx context.Context, bindingID string) ([]GetPolicyBindingSubjectsRow, error)
- func (q *Queries) GetPolicyHostKeys(ctx context.Context, policyID string) ([]PolicyHostKey, error)
- func (q *Queries) GetPolicyModels(ctx context.Context, policyID string) ([]PolicyModel, error)
- func (q *Queries) GetPricing(ctx context.Context, id string) (Pricing, error)
- func (q *Queries) GetPricingModels(ctx context.Context, pricingID string) ([]PricingModel, error)
- func (q *Queries) GetProject(ctx context.Context, id string) (Project, error)
- func (q *Queries) GetProvider(ctx context.Context, id string) (GetProviderRow, error)
- func (q *Queries) GetRateLimit(ctx context.Context, id string) (GetRateLimitRow, error)
- func (q *Queries) GetRelayKey(ctx context.Context, id string) (GetRelayKeyRow, error)
- func (q *Queries) GetRole(ctx context.Context, id string) (Role, error)
- func (q *Queries) GetRoleBinding(ctx context.Context, id string) (RoleBinding, error)
- func (q *Queries) GetRoleBindingSubjects(ctx context.Context, bindingID string) ([]GetRoleBindingSubjectsRow, error)
- func (q *Queries) GetSecret(ctx context.Context, id string) (GetSecretRow, error)
- func (q *Queries) GetSecretValue(ctx context.Context, id string) (GetSecretValueRow, error)
- func (q *Queries) GetServiceAccount(ctx context.Context, id string) (ServiceAccount, error)
- func (q *Queries) GetSetting(ctx context.Context, section string) (Setting, error)
- func (q *Queries) GetTeam(ctx context.Context, id string) (Team, error)
- func (q *Queries) GetUser(ctx context.Context, id string) (User, error)
- func (q *Queries) GetUserByOIDCSubject(ctx context.Context, oidcSubject pgtype.Text) (User, error)
- func (q *Queries) GetUserByUsername(ctx context.Context, username string) (User, error)
- func (q *Queries) InsertAuditEvent(ctx context.Context, arg []InsertAuditEventParams) (int64, error)
- func (q *Queries) InsertGroupMember(ctx context.Context, arg InsertGroupMemberParams) error
- func (q *Queries) InsertPolicyBindingSubject(ctx context.Context, arg InsertPolicyBindingSubjectParams) error
- func (q *Queries) InsertPolicyHostKey(ctx context.Context, arg InsertPolicyHostKeyParams) error
- func (q *Queries) InsertPolicyModel(ctx context.Context, arg InsertPolicyModelParams) error
- func (q *Queries) InsertPricingModel(ctx context.Context, arg InsertPricingModelParams) error
- func (q *Queries) InsertRoleBindingSubject(ctx context.Context, arg InsertRoleBindingSubjectParams) error
- func (q *Queries) InsertSecretEnv(ctx context.Context, arg InsertSecretEnvParams) (InsertSecretEnvRow, error)
- func (q *Queries) InsertSecretStored(ctx context.Context, arg InsertSecretStoredParams) (InsertSecretStoredRow, error)
- func (q *Queries) InsertSecretStoredRef(ctx context.Context, arg InsertSecretStoredRefParams) (InsertSecretStoredRefRow, error)
- func (q *Queries) ListAuditEvents(ctx context.Context, arg ListAuditEventsParams) ([]AuditEvent, error)
- func (q *Queries) ListBatchItems(ctx context.Context, batchID string) ([]BatchItem, error)
- func (q *Queries) ListBatchesByRelayKey(ctx context.Context, relayKeyHash string) ([]Batch, error)
- func (q *Queries) ListGroupMembers(ctx context.Context) ([]GroupMember, error)
- func (q *Queries) ListGroups(ctx context.Context) ([]Group, error)
- func (q *Queries) ListHostBindings(ctx context.Context) ([]HostBinding, error)
- func (q *Queries) ListHosts(ctx context.Context) ([]Host, error)
- func (q *Queries) ListModels(ctx context.Context) ([]ListModelsRow, error)
- func (q *Queries) ListOverlays(ctx context.Context) ([]Overlay, error)
- func (q *Queries) ListPolicies(ctx context.Context) ([]ListPoliciesRow, error)
- func (q *Queries) ListPoliciesWithRateLimit(ctx context.Context) ([]ListPoliciesWithRateLimitRow, error)
- func (q *Queries) ListPolicyBindingSubjects(ctx context.Context) ([]ListPolicyBindingSubjectsRow, error)
- func (q *Queries) ListPolicyBindings(ctx context.Context) ([]PolicyBinding, error)
- func (q *Queries) ListPolicyHostKeys(ctx context.Context) ([]PolicyHostKey, error)
- func (q *Queries) ListPolicyModels(ctx context.Context) ([]PolicyModel, error)
- func (q *Queries) ListPricingModels(ctx context.Context) ([]PricingModel, error)
- func (q *Queries) ListPricings(ctx context.Context) ([]Pricing, error)
- func (q *Queries) ListProjects(ctx context.Context) ([]Project, error)
- func (q *Queries) ListProviders(ctx context.Context) ([]ListProvidersRow, error)
- func (q *Queries) ListRateLimits(ctx context.Context) ([]ListRateLimitsRow, error)
- func (q *Queries) ListRelayKeys(ctx context.Context) ([]ListRelayKeysRow, error)
- func (q *Queries) ListRoleBindingSubjects(ctx context.Context) ([]ListRoleBindingSubjectsRow, error)
- func (q *Queries) ListRoleBindings(ctx context.Context) ([]RoleBinding, error)
- func (q *Queries) ListRoles(ctx context.Context) ([]Role, error)
- func (q *Queries) ListSecretValuesForRotation(ctx context.Context) ([]ListSecretValuesForRotationRow, error)
- func (q *Queries) ListSecrets(ctx context.Context) ([]ListSecretsRow, error)
- func (q *Queries) ListServiceAccounts(ctx context.Context) ([]ServiceAccount, error)
- func (q *Queries) ListSettings(ctx context.Context) ([]Setting, error)
- func (q *Queries) ListStoredSecretsForRotation(ctx context.Context) ([]ListStoredSecretsForRotationRow, error)
- func (q *Queries) ListTeams(ctx context.Context) ([]Team, error)
- func (q *Queries) ListUserIDsIn(ctx context.Context, dollar_1 []string) ([]string, error)
- func (q *Queries) ListUserTokenVersions(ctx context.Context) ([]ListUserTokenVersionsRow, error)
- func (q *Queries) ListUsers(ctx context.Context) ([]User, error)
- func (q *Queries) MaxSecretValueKeyVersion(ctx context.Context) (int32, error)
- func (q *Queries) PruneAuditEvents(ctx context.Context, ts pgtype.Timestamptz) (int64, error)
- func (q *Queries) RelayKeyHashTaken(ctx context.Context, arg RelayKeyHashTakenParams) (bool, error)
- func (q *Queries) RotateRelayKey(ctx context.Context, arg RotateRelayKeyParams) (int64, error)
- func (q *Queries) SetBatchCompleted(ctx context.Context, arg SetBatchCompletedParams) error
- func (q *Queries) SetBatchStatus(ctx context.Context, arg SetBatchStatusParams) error
- func (q *Queries) SetPolicyModels(ctx context.Context, arg SetPolicyModelsParams) error
- func (q *Queries) SetPolicyRateLimit(ctx context.Context, arg SetPolicyRateLimitParams) error
- func (q *Queries) UpdateSecretCiphertext(ctx context.Context, arg UpdateSecretCiphertextParams) error
- func (q *Queries) UpdateSecretEnv(ctx context.Context, arg UpdateSecretEnvParams) (UpdateSecretEnvRow, error)
- func (q *Queries) UpdateSecretStatus(ctx context.Context, arg UpdateSecretStatusParams) error
- func (q *Queries) UpdateSecretStored(ctx context.Context, arg UpdateSecretStoredParams) (UpdateSecretStoredRow, error)
- func (q *Queries) UpsertGroup(ctx context.Context, arg UpsertGroupParams) (int64, error)
- func (q *Queries) UpsertHost(ctx context.Context, arg UpsertHostParams) (int64, error)
- func (q *Queries) UpsertHostBinding(ctx context.Context, arg UpsertHostBindingParams) (int64, error)
- func (q *Queries) UpsertModel(ctx context.Context, arg UpsertModelParams) (int64, error)
- func (q *Queries) UpsertOverlay(ctx context.Context, arg UpsertOverlayParams) error
- func (q *Queries) UpsertPolicy(ctx context.Context, arg UpsertPolicyParams) (int64, error)
- func (q *Queries) UpsertPolicyBinding(ctx context.Context, arg UpsertPolicyBindingParams) (int64, error)
- func (q *Queries) UpsertPricing(ctx context.Context, arg UpsertPricingParams) (int64, error)
- func (q *Queries) UpsertProject(ctx context.Context, arg UpsertProjectParams) (int64, error)
- func (q *Queries) UpsertProvider(ctx context.Context, arg UpsertProviderParams) (int64, error)
- func (q *Queries) UpsertRateLimit(ctx context.Context, arg UpsertRateLimitParams) (int64, error)
- func (q *Queries) UpsertRelayKey(ctx context.Context, arg UpsertRelayKeyParams) (int64, error)
- func (q *Queries) UpsertRole(ctx context.Context, arg UpsertRoleParams) (int64, error)
- func (q *Queries) UpsertRoleBinding(ctx context.Context, arg UpsertRoleBindingParams) (int64, error)
- func (q *Queries) UpsertSecret(ctx context.Context, arg UpsertSecretParams) error
- func (q *Queries) UpsertSecretValue(ctx context.Context, arg UpsertSecretValueParams) error
- func (q *Queries) UpsertServiceAccount(ctx context.Context, arg UpsertServiceAccountParams) (int64, error)
- func (q *Queries) UpsertSetting(ctx context.Context, arg UpsertSettingParams) error
- func (q *Queries) UpsertTeam(ctx context.Context, arg UpsertTeamParams) (int64, error)
- func (q *Queries) UpsertUser(ctx context.Context, arg UpsertUserParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type RateLimit
- type RelayKey
- type RelayKeyHashTakenParams
- type Role
- type RoleBinding
- type RoleBindingSubject
- type RotateRelayKeyParams
- type Secret
- type SecretValue
- type ServiceAccount
- type SetBatchCompletedParams
- type SetBatchStatusParams
- type SetPolicyModelsParams
- type SetPolicyRateLimitParams
- type Setting
- type Team
- type UpdateSecretCiphertextParams
- type UpdateSecretEnvParams
- type UpdateSecretEnvRow
- type UpdateSecretStatusParams
- type UpdateSecretStoredParams
- type UpdateSecretStoredRow
- type UpsertGroupParams
- type UpsertHostBindingParams
- type UpsertHostParams
- type UpsertModelParams
- type UpsertOverlayParams
- type UpsertPolicyBindingParams
- type UpsertPolicyParams
- type UpsertPricingParams
- type UpsertProjectParams
- type UpsertProviderParams
- type UpsertRateLimitParams
- type UpsertRelayKeyParams
- type UpsertRoleBindingParams
- type UpsertRoleParams
- type UpsertSecretParams
- type UpsertSecretValueParams
- type UpsertServiceAccountParams
- type UpsertSettingParams
- type UpsertTeamParams
- type UpsertUserParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 CreateBatchItemParams ¶
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 DeleteOverlayParams ¶ added in v0.3.0
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 GetPolicyBindingSubjectsRow ¶ added in v0.10.0
type GetPolicyBindingSubjectsRow 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"`
Position int32 `db:"position" json:"position"`
}
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"`
ResourceVersion int64 `db:"resource_version" json:"resource_version"`
}
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"`
}
type GetRoleBindingSubjectsRow ¶ added in v0.10.0
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"`
}
type GetSecretValueRow ¶
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 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 InsertGroupMemberParams ¶ added in v0.10.0
type InsertPolicyBindingSubjectParams ¶ added in v0.10.0
type InsertPolicyBindingSubjectParams 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 InsertPolicyModelParams ¶
type InsertRoleBindingSubjectParams ¶ added in v0.10.0
type InsertRoleBindingSubjectParams 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 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"`
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 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"`
ResourceVersion int64 `db:"resource_version" json:"resource_version"`
}
type ListPolicyBindingSubjectsRow ¶ added in v0.10.0
type ListPolicyBindingSubjectsRow 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"`
Position int32 `db:"position" json:"position"`
}
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"`
}
type ListRoleBindingSubjectsRow ¶ added in v0.10.0
type ListRoleBindingSubjectsRow 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"`
Position int32 `db:"position" json:"position"`
}
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"`
}
type ListUserTokenVersionsRow ¶ added in v0.10.0
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"`
RateLimitID pgtype.Text `db:"rate_limit_id" json:"rate_limit_id"`
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 string `db:"project_id" json:"project_id"`
PolicyID string `db:"policy_id" json:"policy_id"`
Priority int32 `db:"priority" json:"priority"`
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 PolicyBindingSubject ¶ added in v0.10.0
type PolicyBindingSubject 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 PolicyHostKey ¶
type PolicyModel ¶
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 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 (*Queries) BumpUserTokenVersion ¶ added in v0.10.0
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) DeleteGroup ¶ added in v0.10.0
func (*Queries) DeleteGroupMembers ¶ added in v0.10.0
func (*Queries) DeleteHostBinding ¶
func (*Queries) DeleteOverlay ¶ added in v0.3.0
func (q *Queries) DeleteOverlay(ctx context.Context, arg DeleteOverlayParams) error
func (*Queries) DeletePolicyBinding ¶ added in v0.10.0
func (*Queries) DeletePolicyBindingSubjects ¶ added in v0.10.0
func (*Queries) DeletePolicyHostKeys ¶
func (*Queries) DeletePolicyModels ¶
func (*Queries) DeletePricing ¶
func (*Queries) DeletePricingModels ¶
func (*Queries) DeleteProject ¶ added in v0.10.0
func (*Queries) DeleteProvider ¶
func (*Queries) DeleteRateLimit ¶
func (*Queries) DeleteRelayKey ¶
func (*Queries) DeleteRole ¶ added in v0.10.0
func (*Queries) DeleteRoleBinding ¶ added in v0.10.0
func (*Queries) DeleteRoleBindingSubjects ¶ added in v0.10.0
func (*Queries) DeleteSecretValue ¶
func (*Queries) DeleteServiceAccount ¶ added in v0.10.0
func (*Queries) DeleteSetting ¶
func (*Queries) DeleteTeam ¶ added in v0.10.0
func (*Queries) DeleteUser ¶ added in v0.7.0
func (*Queries) GetGroupMembers ¶ added in v0.10.0
func (*Queries) GetHostBinding ¶
func (*Queries) GetOverlay ¶ added in v0.3.0
func (*Queries) GetPolicyBinding ¶ added in v0.10.0
func (*Queries) GetPolicyBindingSubjects ¶ added in v0.10.0
func (*Queries) GetPolicyHostKeys ¶
func (*Queries) GetPolicyModels ¶
func (*Queries) GetPricing ¶
func (*Queries) GetPricingModels ¶
func (*Queries) GetProject ¶ added in v0.10.0
func (*Queries) GetProvider ¶
func (*Queries) GetRateLimit ¶
func (*Queries) GetRelayKey ¶
func (*Queries) GetRoleBinding ¶ added in v0.10.0
func (*Queries) GetRoleBindingSubjects ¶ added in v0.10.0
func (*Queries) GetSecretValue ¶
secret_values: generic stored-secret value store (pkg/secret "stored").
func (*Queries) GetServiceAccount ¶ added in v0.10.0
func (*Queries) GetSetting ¶
func (*Queries) GetUserByOIDCSubject ¶ added in v0.7.0
func (*Queries) GetUserByUsername ¶ added in v0.7.0
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) InsertGroupMember ¶ added in v0.10.0
func (q *Queries) InsertGroupMember(ctx context.Context, arg InsertGroupMemberParams) error
func (*Queries) InsertPolicyBindingSubject ¶ added in v0.10.0
func (q *Queries) InsertPolicyBindingSubject(ctx context.Context, arg InsertPolicyBindingSubjectParams) 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) InsertRoleBindingSubject ¶ added in v0.10.0
func (q *Queries) InsertRoleBindingSubject(ctx context.Context, arg InsertRoleBindingSubjectParams) 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) ListAuditEvents ¶ added in v0.10.0
func (q *Queries) ListAuditEvents(ctx context.Context, arg ListAuditEventsParams) ([]AuditEvent, error)
func (*Queries) ListBatchItems ¶
func (*Queries) ListBatchesByRelayKey ¶
func (*Queries) ListGroupMembers ¶ added in v0.10.0
func (q *Queries) ListGroupMembers(ctx context.Context) ([]GroupMember, error)
func (*Queries) ListGroups ¶ added in v0.10.0
func (*Queries) ListHostBindings ¶
func (q *Queries) ListHostBindings(ctx context.Context) ([]HostBinding, error)
── host_bindings (migration 0020) ───────────────────────────────────────────
func (*Queries) ListHosts ¶
── 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 (*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) ListPolicyBindingSubjects ¶ added in v0.10.0
func (q *Queries) ListPolicyBindingSubjects(ctx context.Context) ([]ListPolicyBindingSubjectsRow, error)
func (*Queries) ListPolicyBindings ¶ added in v0.10.0
func (q *Queries) ListPolicyBindings(ctx context.Context) ([]PolicyBinding, 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 ¶
── pricing (migration 0010) ─────────────────────────────────────────────────
func (*Queries) ListProjects ¶ added in v0.10.0
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) ListRoleBindingSubjects ¶ added in v0.10.0
func (q *Queries) ListRoleBindingSubjects(ctx context.Context) ([]ListRoleBindingSubjectsRow, error)
func (*Queries) ListRoleBindings ¶ added in v0.10.0
func (q *Queries) ListRoleBindings(ctx context.Context) ([]RoleBinding, error)
func (*Queries) ListRoles ¶ added in v0.10.0
── roles + bindings (migration 0027) ────────────────────────────────────────
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) ListServiceAccounts ¶ added in v0.10.0
func (q *Queries) ListServiceAccounts(ctx context.Context) ([]ServiceAccount, error)
── service accounts + groups (migration 0026) ───────────────────────────────
func (*Queries) ListSettings ¶
func (*Queries) ListStoredSecretsForRotation ¶
func (q *Queries) ListStoredSecretsForRotation(ctx context.Context) ([]ListStoredSecretsForRotationRow, error)
func (*Queries) ListTeams ¶ added in v0.10.0
── teams + projects (migration 0025) ────────────────────────────────────────
func (*Queries) ListUserIDsIn ¶ added in v0.10.0
Membership check for a whole id list in one round trip.
func (*Queries) ListUserTokenVersions ¶ added in v0.10.0
func (q *Queries) ListUserTokenVersions(ctx context.Context) ([]ListUserTokenVersionsRow, error)
Disabled accounts are omitted: a missing id fails the version check on the data plane, so disabling a user stops their tokens.
func (*Queries) MaxSecretValueKeyVersion ¶
func (*Queries) PruneAuditEvents ¶ added in v0.10.0
func (*Queries) RelayKeyHashTaken ¶ added in v0.10.0
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) RotateRelayKey ¶ added in v0.10.0
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) 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) 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) UpsertGroup ¶ added in v0.10.0
func (*Queries) UpsertHost ¶
func (*Queries) UpsertHostBinding ¶
func (*Queries) UpsertModel ¶
func (*Queries) UpsertOverlay ¶ added in v0.3.0
func (q *Queries) UpsertOverlay(ctx context.Context, arg UpsertOverlayParams) error
func (*Queries) UpsertPolicy ¶
func (*Queries) UpsertPolicyBinding ¶ added in v0.10.0
func (*Queries) UpsertPricing ¶
func (*Queries) UpsertProject ¶ added in v0.10.0
func (*Queries) UpsertProvider ¶
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 (*Queries) UpsertRelayKey ¶
func (*Queries) UpsertRole ¶ added in v0.10.0
func (*Queries) UpsertRoleBinding ¶ added in v0.10.0
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) UpsertServiceAccount ¶ added in v0.10.0
func (*Queries) UpsertSetting ¶
func (q *Queries) UpsertSetting(ctx context.Context, arg UpsertSettingParams) error
func (*Queries) UpsertTeam ¶ added in v0.10.0
func (*Queries) UpsertUser ¶ added in v0.7.0
func (q *Queries) UpsertUser(ctx context.Context, arg UpsertUserParams) error
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"`
}
type RelayKeyHashTakenParams ¶ added in v0.10.0
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"`
}
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 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 SetBatchCompletedParams ¶
type SetBatchStatusParams ¶
type SetPolicyModelsParams ¶
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 UpdateSecretEnvParams ¶
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 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 UpsertGroupParams ¶ added in v0.10.0
type UpsertGroupParams 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 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 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 string `db:"project_id" json:"project_id"`
PolicyID string `db:"policy_id" json:"policy_id"`
Priority int32 `db:"priority" json:"priority"`
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 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 UpsertProjectParams ¶ added in v0.10.0
type UpsertProjectParams 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"`
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"`
Metadata []byte `db:"metadata" json:"metadata"`
Spec []byte `db:"spec" json:"spec"`
ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}
type UpsertRoleBindingParams ¶ added in v0.10.0
type UpsertRoleBindingParams 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"`
ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}
type UpsertRoleParams ¶ added in v0.10.0
type UpsertRoleParams 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 UpsertSecretParams ¶
type UpsertSecretValueParams ¶
type UpsertServiceAccountParams ¶ added in v0.10.0
type UpsertServiceAccountParams 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"`
ExpectedVersion pgtype.Int8 `db:"expected_version" json:"expected_version"`
}
type UpsertSettingParams ¶
type UpsertTeamParams ¶ added in v0.10.0
type UpsertTeamParams 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 UpsertUserParams ¶ added in v0.7.0
type UpsertUserParams 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"`
}
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"`
}