postgres

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func Open

func Open(ctx context.Context, dsn string) (*Store, error)

func (*Store) Close

func (s *Store) Close()

func (*Store) CountAuthKeys

func (s *Store) CountAuthKeys(ctx context.Context) (int64, error)

func (*Store) CountAuthKeysByRole

func (s *Store) CountAuthKeysByRole(ctx context.Context, role string) (int64, error)

func (*Store) CountCodex

func (s *Store) CountCodex(ctx context.Context) (int64, error)

func (*Store) CountCodexFiltered

func (s *Store) CountCodexFiltered(ctx context.Context, filter db.CredentialFilterParams) (int64, error)

func (*Store) CountEnabledCodex

func (s *Store) CountEnabledCodex(ctx context.Context) (int64, error)

func (*Store) CountEnabledGeminiCLI added in v0.7.0

func (s *Store) CountEnabledGeminiCLI(ctx context.Context) (int64, error)

func (*Store) CountGeminiCLI added in v0.7.0

func (s *Store) CountGeminiCLI(ctx context.Context) (int64, error)

func (*Store) CountGeminiCLIFiltered added in v0.7.0

func (s *Store) CountGeminiCLIFiltered(ctx context.Context, filter db.CredentialFilterParams) (int64, error)

func (*Store) CountModels

func (s *Store) CountModels(ctx context.Context) (int64, error)

func (*Store) CountModelsByHandler

func (s *Store) CountModelsByHandler(ctx context.Context, handler string) (int64, error)

func (*Store) CreateAuthKey

func (s *Store) CreateAuthKey(ctx context.Context, arg db.CreateAuthKeyParams) (db.AuthKey, error)

func (*Store) CreateCodex

func (s *Store) CreateCodex(ctx context.Context, arg db.CreateCodexParams) (db.Codex, error)

func (*Store) CreateInitialAuthKey

func (s *Store) CreateInitialAuthKey(ctx context.Context, arg db.CreateAuthKeyParams) (db.AuthKey, error)

func (*Store) CreateModel

func (s *Store) CreateModel(ctx context.Context, arg db.CreateModelParams) (db.ModelRow, error)

func (*Store) DeleteAuthKey

func (s *Store) DeleteAuthKey(ctx context.Context, key string) error

func (*Store) DeleteAuthKeyChecked

func (s *Store) DeleteAuthKeyChecked(ctx context.Context, key string) error

func (*Store) DeleteCodex

func (s *Store) DeleteCodex(ctx context.Context, id string) error

func (*Store) DeleteGeminiCLI added in v0.7.0

func (s *Store) DeleteGeminiCLI(ctx context.Context, id string) error

func (*Store) DeleteGeminiQuota added in v0.7.0

func (s *Store) DeleteGeminiQuota(ctx context.Context, credentialID string) error

func (*Store) DeleteModel

func (s *Store) DeleteModel(ctx context.Context, alias string) error

func (*Store) DeleteQuota

func (s *Store) DeleteQuota(ctx context.Context, credentialID string) error

func (*Store) GetAuthKey

func (s *Store) GetAuthKey(ctx context.Context, key string) (db.AuthKey, error)

func (*Store) GetCodex

func (s *Store) GetCodex(ctx context.Context, id string) (db.Codex, error)

func (*Store) GetGeminiCLI added in v0.7.0

func (s *Store) GetGeminiCLI(ctx context.Context, id string) (db.GeminiCredential, error)

func (*Store) ListAuthKeys

func (s *Store) ListAuthKeys(ctx context.Context) ([]db.AuthKey, error)

func (*Store) ListAvailableCodex

func (s *Store) ListAvailableCodex(ctx context.Context) ([]db.ListAvailableCodexRow, error)

func (*Store) ListAvailableGeminiCLI added in v0.7.0

func (s *Store) ListAvailableGeminiCLI(ctx context.Context) ([]db.ListAvailableGeminiCLIRow, error)

func (*Store) ListCodex

func (s *Store) ListCodex(ctx context.Context) ([]db.ListCodexRow, error)

func (*Store) ListCodexPaged

func (s *Store) ListCodexPaged(ctx context.Context, arg db.ListCredentialPagedParams) ([]db.ListCodexRow, error)

func (*Store) ListCodexPlanTypes added in v0.9.4

func (s *Store) ListCodexPlanTypes(ctx context.Context, filter db.CredentialFilterParams) ([]string, error)

func (*Store) ListGeminiCLI added in v0.7.0

func (s *Store) ListGeminiCLI(ctx context.Context) ([]db.ListGeminiCLIRow, error)

func (*Store) ListGeminiCLIPaged added in v0.7.0

func (s *Store) ListGeminiCLIPaged(ctx context.Context, arg db.ListCredentialPagedParams) ([]db.ListGeminiCLIRow, error)

func (*Store) ListGeminiCLIPlanTypes added in v0.9.4

func (s *Store) ListGeminiCLIPlanTypes(ctx context.Context, filter db.CredentialFilterParams) ([]string, error)

func (*Store) ListModels

func (s *Store) ListModels(ctx context.Context) ([]db.ModelRow, error)

func (*Store) ListSettings

func (s *Store) ListSettings(ctx context.Context) ([]db.Setting, error)

func (*Store) RestoreExpiredThrottledCodex added in v0.8.16

func (s *Store) RestoreExpiredThrottledCodex(ctx context.Context) error

func (*Store) RestoreExpiredThrottledGeminiCLI added in v0.8.16

func (s *Store) RestoreExpiredThrottledGeminiCLI(ctx context.Context) error

func (*Store) ReverseInfoFromModel

func (s *Store) ReverseInfoFromModel(ctx context.Context, alias string) (db.ReverseInfoFromModelRow, error)

func (*Store) SaveSettings

func (s *Store) SaveSettings(ctx context.Context, settings []db.UpsertSettingParams) error

func (*Store) SetGeminiQuotaThrottled added in v0.7.0

func (s *Store) SetGeminiQuotaThrottled(ctx context.Context, credentialID string, modelTier string, throttledUntil time.Time) error

func (*Store) SetQuotaThrottled

func (s *Store) SetQuotaThrottled(ctx context.Context, credentialID string, modelTier string, throttledUntil time.Time) error

func (*Store) UpdateAuthKey

func (s *Store) UpdateAuthKey(ctx context.Context, key string, role string, note string) (db.AuthKey, error)

func (*Store) UpdateAuthKeyChecked

func (s *Store) UpdateAuthKeyChecked(ctx context.Context, key string, role string, note string) (db.AuthKey, error)

func (*Store) UpdateCodexPlanType added in v0.8.18

func (s *Store) UpdateCodexPlanType(ctx context.Context, id string, planType string) (db.Codex, error)

func (*Store) UpdateCodexStatus

func (s *Store) UpdateCodexStatus(ctx context.Context, id string, status string, reason string) (db.Codex, error)

func (*Store) UpdateCodexTokens

func (s *Store) UpdateCodexTokens(ctx context.Context, arg db.UpdateCodexTokensParams) (db.Codex, error)

func (*Store) UpdateGeminiCLIStatus added in v0.7.0

func (s *Store) UpdateGeminiCLIStatus(ctx context.Context, id string, status string, reason string) (db.GeminiCredential, error)

func (*Store) UpdateGeminiPlanType added in v0.8.14

func (s *Store) UpdateGeminiPlanType(ctx context.Context, id string, planType string) (db.GeminiCredential, error)

func (*Store) UpdateGeminiTokens added in v0.7.0

func (s *Store) UpdateGeminiTokens(ctx context.Context, arg db.UpdateGeminiTokensParams) (db.GeminiCredential, error)

func (*Store) UpdateModel

func (s *Store) UpdateModel(ctx context.Context, arg db.UpdateModelParams) (db.ModelRow, error)

func (*Store) UpsertGeminiCLI added in v0.7.0

func (s *Store) UpsertGeminiCLI(ctx context.Context, arg db.UpsertGeminiCLIParams) (db.GeminiCredential, error)

func (*Store) UpsertGeminiQuota added in v0.7.0

func (s *Store) UpsertGeminiQuota(ctx context.Context, arg db.UpsertGeminiQuotaParams) error

func (*Store) UpsertQuota

func (s *Store) UpsertQuota(ctx context.Context, arg db.UpsertQuotaParams) error

func (*Store) UpsertSetting

func (s *Store) UpsertSetting(ctx context.Context, arg db.UpsertSettingParams) (db.Setting, error)

Jump to

Keyboard shortcuts

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