config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextKeyContext    string = "context"
	ContextKeyApp        string = "app"
	ContextKeyDao        string = "dao"
	ContextKeyAuthRecord string = "authRecord"
	ContextKeyApiKey     string = "api_key"
	ContextKeyUserId     string = "user_id"
	ContextKeyRequestId  string = "X-Request-ID"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSConfig added in v0.1.0

type AWSConfig struct {
	Region          string
	AccessKeyId     string
	SecretAccessKey string
}

type Admin

type Admin struct {
	Email    string
	Password string
}

type Axiom

type Axiom struct {
	Token   string
	Dataset string
}

type Config

type Config struct {
	Service  ServiceConfig
	Admins   []Admin
	LLMs     []LLMConfig
	Axiom    Axiom
	Telegram struct {
		Token string `yaml:"token"`
	}
	ClaudeWeb struct {
		Token string `yaml:"token"`
	}
	Bard struct {
		Token string `yaml:"token"`
	}
	ReadEase    ReadEase
	CookieCloud CookieCloud
	MidJourney  MidJourney
	AWS         AWSConfig
}

func GetConfig

func GetConfig() *Config

type CookieCloud

type CookieCloud struct {
	Host string
	UUID string
	Pass string
}

type LLMConfig

type LLMConfig struct {
	Type        string // openai or azureOpenAI
	ApiEndpoint string
	ApiKey      string
	ApiVersion  string
	Models      []string // valid model ids
}

type MidJourney added in v0.0.19

type MidJourney struct {
	DiscordUserToken string
	DiscordBotToken  string
	DiscordServerId  string
	DiscordChannelId int64
	DiscordAppId     string
	DiscordSessionId string
}

type ReadEase

type ReadEase struct {
	TelegramChannel int64 `yaml:"telegramChannel"`
	TopStoriesCnt   int   `yaml:"topStoriesCnt"`
}

type ServiceConfig

type ServiceConfig struct {
	Name     string
	Host     string
	Port     string
	URL      string
	LogLevel string
	Env      string
}

Jump to

Keyboard shortcuts

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