postgres

package
v0.9.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthKey

type AuthKey struct {
	Key       string             `json:"key"`
	Role      string             `json:"role"`
	Note      string             `json:"note"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
}

type Codex

type Codex struct {
	ID           string             `json:"id"`
	Status       string             `json:"status"`
	AccessToken  string             `json:"access_token"`
	Expired      pgtype.Timestamptz `json:"expired"`
	RefreshToken string             `json:"refresh_token"`
	PlanType     string             `json:"plan_type"`
	Reason       string             `json:"reason"`
}

type CodexQuotum

type CodexQuotum struct {
	CredentialID        string             `json:"credential_id"`
	Quota5h             float64            `json:"quota_5h"`
	Quota7d             float64            `json:"quota_7d"`
	QuotaSpark5h        float64            `json:"quota_spark_5h"`
	QuotaSpark7d        float64            `json:"quota_spark_7d"`
	Reset5h             pgtype.Timestamptz `json:"reset_5h"`
	Reset7d             pgtype.Timestamptz `json:"reset_7d"`
	ResetSpark5h        pgtype.Timestamptz `json:"reset_spark_5h"`
	ResetSpark7d        pgtype.Timestamptz `json:"reset_spark_7d"`
	ThrottledUntil      pgtype.Timestamptz `json:"throttled_until"`
	ThrottledUntilSpark pgtype.Timestamptz `json:"throttled_until_spark"`
	SyncedAt            pgtype.Timestamptz `json:"synced_at"`
}

type CountCodexFilteredParams

type CountCodexFilteredParams struct {
	Search       interface{} `json:"search"`
	Status       interface{} `json:"status"`
	PlanType     interface{} `json:"plan_type"`
	UnsyncedOnly bool        `json:"unsynced_only"`
}

type CountGeminiCLIFilteredParams

type CountGeminiCLIFilteredParams struct {
	Search       interface{} `json:"search"`
	Status       interface{} `json:"status"`
	PlanType     interface{} `json:"plan_type"`
	UnsyncedOnly interface{} `json:"unsynced_only"`
}

type CreateAuthKeyParams

type CreateAuthKeyParams struct {
	Key  string `json:"key"`
	Role string `json:"role"`
	Note string `json:"note"`
}

type CreateCodexParams

type CreateCodexParams struct {
	ID           string             `json:"id"`
	Status       string             `json:"status"`
	AccessToken  string             `json:"access_token"`
	Expired      pgtype.Timestamptz `json:"expired"`
	RefreshToken string             `json:"refresh_token"`
	PlanType     string             `json:"plan_type"`
}

type CreateModelParams

type CreateModelParams struct {
	Alias     string          `json:"alias"`
	Origin    string          `json:"origin"`
	Handler   string          `json:"handler"`
	PlanTypes string          `json:"plan_types"`
	Extra     json.RawMessage `json:"extra"`
}

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 Gemini

type Gemini struct {
	ID           string             `json:"id"`
	Status       string             `json:"status"`
	AccessToken  string             `json:"access_token"`
	RefreshToken string             `json:"refresh_token"`
	Expired      pgtype.Timestamptz `json:"expired"`
	Email        string             `json:"email"`
	ProjectID    string             `json:"project_id"`
	PlanType     string             `json:"plan_type"`
	Reason       string             `json:"reason"`
	SyncedAt     pgtype.Timestamptz `json:"synced_at"`
}

type GeminiQuotum

type GeminiQuotum struct {
	CredentialID            string             `json:"credential_id"`
	QuotaPro                float64            `json:"quota_pro"`
	ResetPro                pgtype.Timestamptz `json:"reset_pro"`
	QuotaFlash              float64            `json:"quota_flash"`
	ResetFlash              pgtype.Timestamptz `json:"reset_flash"`
	QuotaFlashlite          float64            `json:"quota_flashlite"`
	ResetFlashlite          pgtype.Timestamptz `json:"reset_flashlite"`
	ThrottledUntilPro       pgtype.Timestamptz `json:"throttled_until_pro"`
	ThrottledUntilFlash     pgtype.Timestamptz `json:"throttled_until_flash"`
	ThrottledUntilFlashlite pgtype.Timestamptz `json:"throttled_until_flashlite"`
	SyncedAt                pgtype.Timestamptz `json:"synced_at"`
}

type ListAvailableCodexRow

type ListAvailableCodexRow struct {
	ID                  string             `json:"id"`
	PlanType            string             `json:"plan_type"`
	Quota5h             float64            `json:"quota_5h"`
	Quota7d             float64            `json:"quota_7d"`
	QuotaSpark5h        float64            `json:"quota_spark_5h"`
	QuotaSpark7d        float64            `json:"quota_spark_7d"`
	Reset5h             pgtype.Timestamptz `json:"reset_5h"`
	Reset7d             pgtype.Timestamptz `json:"reset_7d"`
	ResetSpark5h        pgtype.Timestamptz `json:"reset_spark_5h"`
	ResetSpark7d        pgtype.Timestamptz `json:"reset_spark_7d"`
	ThrottledUntil      pgtype.Timestamptz `json:"throttled_until"`
	ThrottledUntilSpark pgtype.Timestamptz `json:"throttled_until_spark"`
	SyncedAt            pgtype.Timestamptz `json:"synced_at"`
}

type ListAvailableGeminiCLIRow

type ListAvailableGeminiCLIRow struct {
	ID                      string             `json:"id"`
	Email                   string             `json:"email"`
	ProjectID               string             `json:"project_id"`
	PlanType                string             `json:"plan_type"`
	QuotaPro                float64            `json:"quota_pro"`
	ResetPro                pgtype.Timestamptz `json:"reset_pro"`
	QuotaFlash              float64            `json:"quota_flash"`
	ResetFlash              pgtype.Timestamptz `json:"reset_flash"`
	QuotaFlashlite          float64            `json:"quota_flashlite"`
	ResetFlashlite          pgtype.Timestamptz `json:"reset_flashlite"`
	ThrottledUntilPro       pgtype.Timestamptz `json:"throttled_until_pro"`
	ThrottledUntilFlash     pgtype.Timestamptz `json:"throttled_until_flash"`
	ThrottledUntilFlashlite pgtype.Timestamptz `json:"throttled_until_flashlite"`
	ThrottledUntil          pgtype.Timestamptz `json:"throttled_until"`
	SyncedAt                pgtype.Timestamptz `json:"synced_at"`
}

type ListCodexPagedParams

type ListCodexPagedParams struct {
	Search       interface{} `json:"search"`
	Status       interface{} `json:"status"`
	PlanType     interface{} `json:"plan_type"`
	UnsyncedOnly bool        `json:"unsynced_only"`
	PageOffset   int32       `json:"page_offset"`
	PageLimit    int32       `json:"page_limit"`
}

type ListCodexPagedRow

type ListCodexPagedRow struct {
	ID             string             `json:"id"`
	Status         string             `json:"status"`
	AccessToken    string             `json:"access_token"`
	Expired        pgtype.Timestamptz `json:"expired"`
	RefreshToken   string             `json:"refresh_token"`
	PlanType       string             `json:"plan_type"`
	Reason         string             `json:"reason"`
	Quota5h        float64            `json:"quota_5h"`
	Quota7d        float64            `json:"quota_7d"`
	QuotaSpark5h   float64            `json:"quota_spark_5h"`
	QuotaSpark7d   float64            `json:"quota_spark_7d"`
	Reset5h        pgtype.Timestamptz `json:"reset_5h"`
	Reset7d        pgtype.Timestamptz `json:"reset_7d"`
	ResetSpark5h   pgtype.Timestamptz `json:"reset_spark_5h"`
	ResetSpark7d   pgtype.Timestamptz `json:"reset_spark_7d"`
	ThrottledUntil pgtype.Timestamptz `json:"throttled_until"`
	SyncedAt       pgtype.Timestamptz `json:"synced_at"`
}

type ListCodexPlanTypesParams added in v0.9.4

type ListCodexPlanTypesParams struct {
	Search       interface{} `json:"search"`
	Status       interface{} `json:"status"`
	UnsyncedOnly bool        `json:"unsynced_only"`
}

type ListCodexRow

type ListCodexRow struct {
	ID             string             `json:"id"`
	Status         string             `json:"status"`
	AccessToken    string             `json:"access_token"`
	Expired        pgtype.Timestamptz `json:"expired"`
	RefreshToken   string             `json:"refresh_token"`
	PlanType       string             `json:"plan_type"`
	Reason         string             `json:"reason"`
	Quota5h        float64            `json:"quota_5h"`
	Quota7d        float64            `json:"quota_7d"`
	QuotaSpark5h   float64            `json:"quota_spark_5h"`
	QuotaSpark7d   float64            `json:"quota_spark_7d"`
	Reset5h        pgtype.Timestamptz `json:"reset_5h"`
	Reset7d        pgtype.Timestamptz `json:"reset_7d"`
	ResetSpark5h   pgtype.Timestamptz `json:"reset_spark_5h"`
	ResetSpark7d   pgtype.Timestamptz `json:"reset_spark_7d"`
	ThrottledUntil pgtype.Timestamptz `json:"throttled_until"`
	SyncedAt       pgtype.Timestamptz `json:"synced_at"`
}

type ListGeminiCLIPagedParams

type ListGeminiCLIPagedParams struct {
	Search       interface{} `json:"search"`
	Status       interface{} `json:"status"`
	PlanType     interface{} `json:"plan_type"`
	UnsyncedOnly interface{} `json:"unsynced_only"`
	PageOffset   int32       `json:"page_offset"`
	PageLimit    int32       `json:"page_limit"`
}

type ListGeminiCLIPagedRow

type ListGeminiCLIPagedRow struct {
	ID             string             `json:"id"`
	Status         string             `json:"status"`
	AccessToken    string             `json:"access_token"`
	RefreshToken   string             `json:"refresh_token"`
	Expired        pgtype.Timestamptz `json:"expired"`
	Email          string             `json:"email"`
	ProjectID      string             `json:"project_id"`
	PlanType       string             `json:"plan_type"`
	Reason         string             `json:"reason"`
	QuotaPro       float64            `json:"quota_pro"`
	ResetPro       pgtype.Timestamptz `json:"reset_pro"`
	QuotaFlash     float64            `json:"quota_flash"`
	ResetFlash     pgtype.Timestamptz `json:"reset_flash"`
	QuotaFlashlite float64            `json:"quota_flashlite"`
	ResetFlashlite pgtype.Timestamptz `json:"reset_flashlite"`
	ThrottledUntil pgtype.Timestamptz `json:"throttled_until"`
	SyncedAt       pgtype.Timestamptz `json:"synced_at"`
}

type ListGeminiCLIPlanTypesParams added in v0.9.4

type ListGeminiCLIPlanTypesParams struct {
	Search       interface{} `json:"search"`
	Status       interface{} `json:"status"`
	UnsyncedOnly interface{} `json:"unsynced_only"`
}

type ListGeminiCLIRow

type ListGeminiCLIRow struct {
	ID             string             `json:"id"`
	Status         string             `json:"status"`
	AccessToken    string             `json:"access_token"`
	RefreshToken   string             `json:"refresh_token"`
	Expired        pgtype.Timestamptz `json:"expired"`
	Email          string             `json:"email"`
	ProjectID      string             `json:"project_id"`
	PlanType       string             `json:"plan_type"`
	Reason         string             `json:"reason"`
	QuotaPro       float64            `json:"quota_pro"`
	ResetPro       pgtype.Timestamptz `json:"reset_pro"`
	QuotaFlash     float64            `json:"quota_flash"`
	ResetFlash     pgtype.Timestamptz `json:"reset_flash"`
	QuotaFlashlite float64            `json:"quota_flashlite"`
	ResetFlashlite pgtype.Timestamptz `json:"reset_flashlite"`
	ThrottledUntil pgtype.Timestamptz `json:"throttled_until"`
	SyncedAt       pgtype.Timestamptz `json:"synced_at"`
}

type Model

type Model struct {
	Alias     string          `json:"alias"`
	Origin    string          `json:"origin"`
	Handler   string          `json:"handler"`
	PlanTypes string          `json:"plan_types"`
	Extra     json.RawMessage `json:"extra"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) ClearGeminiQuotaThrottle added in v0.8.17

func (q *Queries) ClearGeminiQuotaThrottle(ctx context.Context, credentialID string) error

Clears all tier throttles for a Gemini credential by moving them to now.

func (*Queries) ClearQuotaThrottle added in v0.8.17

func (q *Queries) ClearQuotaThrottle(ctx context.Context, credentialID string) error

Clears all tier throttles for a credential by moving them to now.

func (*Queries) CountAuthKeys

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

func (*Queries) CountAuthKeysByRole

func (q *Queries) CountAuthKeysByRole(ctx context.Context, role string) (int64, error)

func (*Queries) CountCodex

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

func (*Queries) CountCodexFiltered

func (q *Queries) CountCodexFiltered(ctx context.Context, arg CountCodexFilteredParams) (int64, error)

func (*Queries) CountEnabledCodex

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

func (*Queries) CountEnabledGeminiCLI

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

func (*Queries) CountGeminiCLI

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

func (*Queries) CountGeminiCLIFiltered

func (q *Queries) CountGeminiCLIFiltered(ctx context.Context, arg CountGeminiCLIFilteredParams) (int64, error)

func (*Queries) CountModels

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

func (*Queries) CountModelsByHandler

func (q *Queries) CountModelsByHandler(ctx context.Context, handler string) (int64, error)

func (*Queries) CreateAuthKey

func (q *Queries) CreateAuthKey(ctx context.Context, arg CreateAuthKeyParams) (AuthKey, error)

func (*Queries) CreateCodex

func (q *Queries) CreateCodex(ctx context.Context, arg CreateCodexParams) (Codex, error)

func (*Queries) CreateModel

func (q *Queries) CreateModel(ctx context.Context, arg CreateModelParams) (Model, error)

func (*Queries) DeleteAuthKey

func (q *Queries) DeleteAuthKey(ctx context.Context, key string) (int64, error)

func (*Queries) DeleteCodex

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

func (*Queries) DeleteGeminiCLI

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

func (*Queries) DeleteGeminiQuota

func (q *Queries) DeleteGeminiQuota(ctx context.Context, credentialID string) (int64, error)

Deletes the gemini_quota record for a credential.

func (*Queries) DeleteModel

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

func (*Queries) DeleteQuota

func (q *Queries) DeleteQuota(ctx context.Context, credentialID string) (int64, error)

Deletes the quota record for a credential.

func (*Queries) GetAuthKey

func (q *Queries) GetAuthKey(ctx context.Context, key string) (AuthKey, error)

func (*Queries) GetCodex

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

func (*Queries) GetGeminiCLI

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

func (*Queries) GetGeminiQuota

func (q *Queries) GetGeminiQuota(ctx context.Context, credentialID string) (GeminiQuotum, error)

func (*Queries) GetQuota

func (q *Queries) GetQuota(ctx context.Context, credentialID string) (CodexQuotum, error)

func (*Queries) ListAuthKeys

func (q *Queries) ListAuthKeys(ctx context.Context) ([]AuthKey, error)

func (*Queries) ListAvailableCodex

func (q *Queries) ListAvailableCodex(ctx context.Context) ([]ListAvailableCodexRow, error)

Returns enabled, non-throttled, non-expired credentials ordered by highest remaining quota ratio first.

func (*Queries) ListAvailableGeminiCLI

func (q *Queries) ListAvailableGeminiCLI(ctx context.Context) ([]ListAvailableGeminiCLIRow, error)

Returns enabled, non-throttled Gemini credentials with quota info

func (*Queries) ListCodex

func (q *Queries) ListCodex(ctx context.Context) ([]ListCodexRow, error)

func (*Queries) ListCodexPaged

func (q *Queries) ListCodexPaged(ctx context.Context, arg ListCodexPagedParams) ([]ListCodexPagedRow, error)

func (*Queries) ListCodexPlanTypes added in v0.9.4

func (q *Queries) ListCodexPlanTypes(ctx context.Context, arg ListCodexPlanTypesParams) ([]string, error)

func (*Queries) ListGeminiCLI

func (q *Queries) ListGeminiCLI(ctx context.Context) ([]ListGeminiCLIRow, error)

func (*Queries) ListGeminiCLIPaged

func (q *Queries) ListGeminiCLIPaged(ctx context.Context, arg ListGeminiCLIPagedParams) ([]ListGeminiCLIPagedRow, error)

func (*Queries) ListGeminiCLIPlanTypes added in v0.9.4

func (q *Queries) ListGeminiCLIPlanTypes(ctx context.Context, arg ListGeminiCLIPlanTypesParams) ([]string, error)

func (*Queries) ListModels

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

func (*Queries) ListSettings

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

func (*Queries) RestoreExpiredThrottledCodex added in v0.8.16

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

func (*Queries) RestoreExpiredThrottledGeminiCLI added in v0.8.16

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

func (*Queries) ReverseInfoFromModel

func (q *Queries) ReverseInfoFromModel(ctx context.Context, alias string) (ReverseInfoFromModelRow, error)

func (*Queries) SetGeminiQuotaThrottledAll

func (q *Queries) SetGeminiQuotaThrottledAll(ctx context.Context, arg SetGeminiQuotaThrottledAllParams) error

Sets all tier throttles for a Gemini credential.

func (*Queries) SetGeminiQuotaThrottledFlash

func (q *Queries) SetGeminiQuotaThrottledFlash(ctx context.Context, arg SetGeminiQuotaThrottledFlashParams) error

Sets the Flash tier throttle for a Gemini credential.

func (*Queries) SetGeminiQuotaThrottledFlashLite

func (q *Queries) SetGeminiQuotaThrottledFlashLite(ctx context.Context, arg SetGeminiQuotaThrottledFlashLiteParams) error

Sets the Flash Lite tier throttle for a Gemini credential.

func (*Queries) SetGeminiQuotaThrottledPro

func (q *Queries) SetGeminiQuotaThrottledPro(ctx context.Context, arg SetGeminiQuotaThrottledProParams) error

Sets the Pro tier throttle for a Gemini credential.

func (*Queries) SetQuotaThrottled

func (q *Queries) SetQuotaThrottled(ctx context.Context, arg SetQuotaThrottledParams) error

Sets the default tier throttle for a credential.

func (*Queries) SetQuotaThrottledAll

func (q *Queries) SetQuotaThrottledAll(ctx context.Context, arg SetQuotaThrottledAllParams) error

Sets all tier throttles for a credential (non-tier-specific backoff).

func (*Queries) SetQuotaThrottledSpark

func (q *Queries) SetQuotaThrottledSpark(ctx context.Context, arg SetQuotaThrottledSparkParams) error

Sets the spark tier throttle for a credential.

func (*Queries) UpdateAuthKey

func (q *Queries) UpdateAuthKey(ctx context.Context, arg UpdateAuthKeyParams) (AuthKey, error)

func (*Queries) UpdateCodexPlanType added in v0.8.18

func (q *Queries) UpdateCodexPlanType(ctx context.Context, arg UpdateCodexPlanTypeParams) (Codex, error)

func (*Queries) UpdateCodexStatus

func (q *Queries) UpdateCodexStatus(ctx context.Context, arg UpdateCodexStatusParams) (Codex, error)

func (*Queries) UpdateCodexTokens

func (q *Queries) UpdateCodexTokens(ctx context.Context, arg UpdateCodexTokensParams) (Codex, error)

func (*Queries) UpdateGeminiCLIStatus

func (q *Queries) UpdateGeminiCLIStatus(ctx context.Context, arg UpdateGeminiCLIStatusParams) (Gemini, error)

func (*Queries) UpdateGeminiPlanType added in v0.8.14

func (q *Queries) UpdateGeminiPlanType(ctx context.Context, arg UpdateGeminiPlanTypeParams) (Gemini, error)

func (*Queries) UpdateGeminiTokens

func (q *Queries) UpdateGeminiTokens(ctx context.Context, arg UpdateGeminiTokensParams) (Gemini, error)

func (*Queries) UpdateModel

func (q *Queries) UpdateModel(ctx context.Context, arg UpdateModelParams) (Model, error)

func (*Queries) UpsertGeminiCLI

func (q *Queries) UpsertGeminiCLI(ctx context.Context, arg UpsertGeminiCLIParams) (Gemini, error)

func (*Queries) UpsertGeminiQuota

func (q *Queries) UpsertGeminiQuota(ctx context.Context, arg UpsertGeminiQuotaParams) (GeminiQuotum, error)

Syncs per-tier quota ratios and reset timestamps for Gemini credentials.

func (*Queries) UpsertQuota

func (q *Queries) UpsertQuota(ctx context.Context, arg UpsertQuotaParams) (CodexQuotum, error)

Syncs remaining quota ratios and reset timestamps from upstream.

func (*Queries) UpsertSetting

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

func (*Queries) WithTx

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

type ReverseInfoFromModelRow

type ReverseInfoFromModelRow struct {
	Origin    string          `json:"origin"`
	Handler   string          `json:"handler"`
	PlanTypes string          `json:"plan_types"`
	Extra     json.RawMessage `json:"extra"`
}

type SetGeminiQuotaThrottledAllParams

type SetGeminiQuotaThrottledAllParams struct {
	CredentialID      string             `json:"credential_id"`
	ThrottledUntilPro pgtype.Timestamptz `json:"throttled_until_pro"`
}

type SetGeminiQuotaThrottledFlashLiteParams

type SetGeminiQuotaThrottledFlashLiteParams struct {
	CredentialID            string             `json:"credential_id"`
	ThrottledUntilFlashlite pgtype.Timestamptz `json:"throttled_until_flashlite"`
}

type SetGeminiQuotaThrottledFlashParams

type SetGeminiQuotaThrottledFlashParams struct {
	CredentialID        string             `json:"credential_id"`
	ThrottledUntilFlash pgtype.Timestamptz `json:"throttled_until_flash"`
}

type SetGeminiQuotaThrottledProParams

type SetGeminiQuotaThrottledProParams struct {
	CredentialID      string             `json:"credential_id"`
	ThrottledUntilPro pgtype.Timestamptz `json:"throttled_until_pro"`
}

type SetQuotaThrottledAllParams

type SetQuotaThrottledAllParams struct {
	CredentialID   string             `json:"credential_id"`
	ThrottledUntil pgtype.Timestamptz `json:"throttled_until"`
}

type SetQuotaThrottledParams

type SetQuotaThrottledParams struct {
	CredentialID   string             `json:"credential_id"`
	ThrottledUntil pgtype.Timestamptz `json:"throttled_until"`
}

type SetQuotaThrottledSparkParams

type SetQuotaThrottledSparkParams struct {
	CredentialID        string             `json:"credential_id"`
	ThrottledUntilSpark pgtype.Timestamptz `json:"throttled_until_spark"`
}

type Setting

type Setting struct {
	Key       string             `json:"key"`
	Value     string             `json:"value"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type UpdateAuthKeyParams

type UpdateAuthKeyParams struct {
	Key  string `json:"key"`
	Role string `json:"role"`
	Note string `json:"note"`
}

type UpdateCodexPlanTypeParams added in v0.8.18

type UpdateCodexPlanTypeParams struct {
	PlanType string `json:"plan_type"`
	ID       string `json:"id"`
}

type UpdateCodexStatusParams

type UpdateCodexStatusParams struct {
	ID     string `json:"id"`
	Status string `json:"status"`
	Reason string `json:"reason"`
}

type UpdateCodexTokensParams

type UpdateCodexTokensParams struct {
	ID           string             `json:"id"`
	Status       string             `json:"status"`
	AccessToken  string             `json:"access_token"`
	Expired      pgtype.Timestamptz `json:"expired"`
	RefreshToken string             `json:"refresh_token"`
	PlanType     string             `json:"plan_type"`
}

type UpdateGeminiCLIStatusParams

type UpdateGeminiCLIStatusParams struct {
	Status string `json:"status"`
	Reason string `json:"reason"`
	ID     string `json:"id"`
}

type UpdateGeminiPlanTypeParams added in v0.8.14

type UpdateGeminiPlanTypeParams struct {
	PlanType string `json:"plan_type"`
	ID       string `json:"id"`
}

type UpdateGeminiTokensParams

type UpdateGeminiTokensParams struct {
	Status       string             `json:"status"`
	AccessToken  string             `json:"access_token"`
	RefreshToken string             `json:"refresh_token"`
	Expired      pgtype.Timestamptz `json:"expired"`
	Email        string             `json:"email"`
	ProjectID    string             `json:"project_id"`
	PlanType     string             `json:"plan_type"`
	ID           string             `json:"id"`
}

type UpdateModelParams

type UpdateModelParams struct {
	Alias     string          `json:"alias"`
	Origin    string          `json:"origin"`
	Handler   string          `json:"handler"`
	PlanTypes string          `json:"plan_types"`
	Extra     json.RawMessage `json:"extra"`
}

type UpsertGeminiCLIParams

type UpsertGeminiCLIParams struct {
	ID           string             `json:"id"`
	Status       string             `json:"status"`
	AccessToken  string             `json:"access_token"`
	RefreshToken string             `json:"refresh_token"`
	Expired      pgtype.Timestamptz `json:"expired"`
	Email        string             `json:"email"`
	ProjectID    string             `json:"project_id"`
	PlanType     string             `json:"plan_type"`
	Reason       string             `json:"reason"`
}

type UpsertGeminiQuotaParams

type UpsertGeminiQuotaParams struct {
	CredentialID   string             `json:"credential_id"`
	QuotaPro       float64            `json:"quota_pro"`
	ResetPro       pgtype.Timestamptz `json:"reset_pro"`
	QuotaFlash     float64            `json:"quota_flash"`
	ResetFlash     pgtype.Timestamptz `json:"reset_flash"`
	QuotaFlashlite float64            `json:"quota_flashlite"`
	ResetFlashlite pgtype.Timestamptz `json:"reset_flashlite"`
}

type UpsertQuotaParams

type UpsertQuotaParams struct {
	CredentialID string             `json:"credential_id"`
	Quota5h      float64            `json:"quota_5h"`
	Quota7d      float64            `json:"quota_7d"`
	QuotaSpark5h float64            `json:"quota_spark_5h"`
	QuotaSpark7d float64            `json:"quota_spark_7d"`
	Reset5h      pgtype.Timestamptz `json:"reset_5h"`
	Reset7d      pgtype.Timestamptz `json:"reset_7d"`
	ResetSpark5h pgtype.Timestamptz `json:"reset_spark_5h"`
	ResetSpark7d pgtype.Timestamptz `json:"reset_spark_7d"`
}

type UpsertSettingParams

type UpsertSettingParams struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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