consts

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CHANGE_CHANNEL_USER    = "admin:change:channel:user"
	CHANGE_CHANNEL_APP     = "admin:change:channel:app"
	CHANGE_CHANNEL_APP_KEY = "admin:change:channel:app:key"
)
View Source
const (
	CHANGE_CHANNEL_MODEL = "admin:change:channel:model"
	CHANGE_CHANNEL_KEY   = "admin:change:channel:key"
	CHANGE_CHANNEL_AGENT = "admin:change:channel:agent"
)
View Source
const (
	ACTION_CREATE = "create"
	ACTION_UPDATE = "update"
	ACTION_DELETE = "delete"
	ACTION_STATUS = "status"
	ACTION_MODELS = "models"
)
View Source
const (
	USER_ID_KEY            = "user_id"
	APP_ID_KEY             = "app_id"
	SECRET_KEY             = "sk"
	APP_IS_LIMIT_QUOTA_KEY = "app_is_limit_quota"
	KEY_IS_LIMIT_QUOTA_KEY = "key_is_limit_quota"
)
View Source
const (
	LOCK_USER_KEY = "api:lock:user:%d"
	LOCK_APP_KEY  = "api:lock:app:%d"
	LOCK_SK_KEY   = "api:lock:sk:%s"
)
View Source
const (
	API_USAGE_KEY = "api:%d:usage"

	USER_STATUS_FIELD       = "user.status"
	USER_USAGE_COUNT_FIELD  = "user.usage_count"
	USER_USED_TOKENS_FIELD  = "user.used_tokens"
	USER_TOTAL_TOKENS_FIELD = "user.total_tokens"

	APP_STATUS_FIELD         = "app.%d.status"
	APP_USAGE_COUNT_FIELD    = "app.%d.usage_count"
	APP_USED_TOKENS_FIELD    = "app.%d.used_tokens"
	APP_TOTAL_TOKENS_FIELD   = "app.%d.total_tokens"
	APP_IS_LIMIT_QUOTA_FIELD = "app.%d.is_limit_quota"

	KEY_STATUS_FIELD         = "key.%d.%s.status"
	KEY_USAGE_COUNT_FIELD    = "key.%d.%s.usage_count"
	KEY_USED_TOKENS_FIELD    = "key.%d.%s.used_tokens"
	KEY_TOTAL_TOKENS_FIELD   = "key.%d.%s.total_tokens"
	KEY_IS_LIMIT_QUOTA_FIELD = "key.%d.%s.is_limit_quota"

	MODEL_STATUS_FIELD = "model.%s.status"

	MODEL_AGENT_STATUS_FIELD     = "model:agent.%s.status"
	MODEL_AGENT_KEY_STATUS_FIELD = "model:agent.key.%s.status"
)
View Source
const (
	API_USER_KEY        = "api:user:%d"
	API_APP_KEY         = "api:app:%d"
	API_APP_KEY_KEY     = "api:app:key:%s"
	API_MODEL_KEY       = "api:model:%s"
	API_MODEL_AGENT_KEY = "api:model:agent:%s"
)
View Source
const (
	API_USERS_KEY            = "api:users"
	API_APPS_KEY             = "api:apps"
	API_MODELS_KEY           = "api:models"
	API_MODEL_KEYS_KEY       = "api:model:keys:%s"
	API_MODEL_AGENTS_KEY     = "api:model_agents"
	API_MODEL_AGENT_KEYS_KEY = "api:model_agent:keys:%s"
)
View Source
const (
	SESSION_USER = "session_user"
	SESSION_APP  = "session_app"
	SESSION_KEY  = "session_key"
)
View Source
const (
	ERROR_MODEL_KEY       = "api:error:model:key:%s"
	ERROR_MODEL_AGENT     = "api:error:model:agent:%s"
	ERROR_MODEL_AGENT_KEY = "api:error:model:agent:key:%s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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