cons

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApolloSK        = "APOLLO_SK"
	ApolloNamespace = "APOLLO_NAMESPACE"
	ApolloHost      = "APOLLO_HOST"
	ApolloCluster   = "APOLLO_CLUSTER"
)
View Source
const (
	ApolloValTypeString = "string"
	ApolloValTypeJson   = "json"
)
View Source
const (
	TraceIdKey = "x-trace-id"

	CtxKeyHeaders = "ctxKeyHeaders"
)
View Source
const (
	DbSchemeMySQL = "mysql"

	DsnInvalid                   = "dsn invalid"
	DsnInvalidNoSuitableResolver = "no suitable resolver"
)
View Source
const (
	ENV = "ENV"

	DEBUG = "DEBUG"

	KUBECONFIG = "KUBECONFIG"

	DATABASE_SALT = "DATABASE_SALT"

	JWT_SECRET = "JWT_SECRET"

	ELASTICSEARCH_PASSWORD = "ELASTICSEARCH_PASSWORD"
	ELASTICSEARCH_ENDPOINT = "ELASTICSEARCH_ENDPOINT"

	LOCAL_ELASTICSEARCH_ENDPOINT = "LOCAL_ELASTICSEARCH_ENDPOINT"

	REDIS_CLUSTER_DSN = "REDIS_CLUSTER_DSN"
	REDIS_DSN         = "REDIS_DSN"
	REDIS_AK          = "REDIS_AK"

	LOCAL_REDIS_CLUSTER_DSN = "LOCAL_REDIS_CLUSTER_DSN"
	LOCAL_REDIS_DSN         = "LOCAL_REDIS_DSN"
	LOCAL_REDIS_AK          = "LOCAL_REDIS_AK"

	MYSQL_ADMIN_DSN       = "MYSQL_ADMIN_DSN"
	LOCAL_MYSQL_ADMIN_DSN = "LOCAL_MYSQL_ADMIN_DSN"

	CloudflareAccountId    = "CLOUDFLARE_ACCOUNT_ID"
	CloudflareR2AccountKey = "CLOUDFLARE_R2_ACCOUNT_KEY"
	CloudflareR2AccountSK  = "CLOUDFLARE_R2_ACCOUNT_SK"

	KafkaUser     = "KAFKA_USER"
	KafkaPassword = "KAFKA_PASSWORD"

	RustFsEndpoint  = "RUST_FS_ENDPOINT"
	RustFsAccessKey = "RUST_FS_ACCESS_KEY"
	RustFsSecretKey = "RUST_FS_SECRET_KEY"

	MongoDSN = "MONGO_DSN"

	KookToken = "KOOK_TOKEN"

	Service = "SERVICE"
)
View Source
const (
	OssBucketCdn  = "cdn"
	OssBucketBlog = "blog"
)
View Source
const (
	PveDomain  = "https://pve.alomerry.com"
	PveApiPath = "/api2/json"
)
View Source
const (
	StepA      = "A"
	StepB      = "B"
	StepReason = "Reason"
	StepResult = "Result"
)
View Source
const (
	EmptyStr = ""
)
View Source
const (
	EnvLocal = "LOCAL"
)

Variables

View Source
var (
	Umami      = newDatabase(MySQL, "umami")
	WalineBlog = newDatabase(MySQL, "waline_blog")
)
View Source
var (
	MySQL = newDatabaseType("mysql")
)

Functions

This section is empty.

Types

type BaseDbInfo added in v0.0.7

type BaseDbInfo struct {
	User     string
	Password string
	Host     string
	Port     string
}

func ParseDbDsn added in v0.0.7

func ParseDbDsn(dsn string) (*BaseDbInfo, error)

type Database

type Database struct {
	Type DatabaseType
	Name string
}

type DatabaseType

type DatabaseType string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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