config

package
v0.0.0-...-8427dcf Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DiscordToken holds the API Token for discord.
	DiscordToken string
	// DiscordAppID holds the application ID for the bot.
	DiscordAppID string
	// DiscordGuildID holds a GuildID to restring the bot to a single guild.
	DiscordGuildID string
	// OpenAIKey holds the API key for OpenAI.
	OpenAIKey string
	// GoogleAPIKey holds the API key for Google.
	GoogleAPIKey string
	// AdminUserID holds primary admin's DiscordID
	AdminUserID string
	// EIUserID holds the DiscordID used for EI API calls requiring Ultra (Periodicals)
	EIUserID string
	// EIUserIDBasic holds the DiscordID used for non-Ultra responses
	EIUserIDBasic string
	// AdminUsers holds a list of DiscordIDs for other admins
	AdminUsers []string
	// TestMode is true if the bot is running in test mode.
	TestMode bool
	// DevBotAppID is the application ID for the development bot.
	DevBotAppID string
	// FeatureFlags is a list of feature flags for the bot.
	FeatureFlags []string
	// EventsURL is the URL for the carpet-wasmegg events page.
	EventsURL string
	// RocketsURL is the URL for the carpet-wasmegg rockets page].
	RocketsURL string
	// GistToken is the token used to access the gist.
	GistToken string
	// GistID is the ID of the gist used for storage.
	GistID string
	// BannerPath is the path to the banner image and font files.
	BannerPath string
	// BannerOutputPath is the path where the compsited banner image will be saved.
	BannerOutputPath string
	// BannerURL is the URL to the banner image.
	BannerURL string
	// DevelopmentStaff is a list of user IDs for development staff.
	DevelopmentStaff []string
	// Key is the encryption key used for encrypting sensitive data.
	Key string
)

Functions

func DecryptCombined

func DecryptCombined(key []byte, combined []byte) ([]byte, error)

DecryptCombined performs AES-GCM decryption on a combined byte slice. It splits the nonce from the ciphertext and then decrypts the data.

func EncryptAndCombine

func EncryptAndCombine(key []byte, plaintext []byte) ([]byte, error)

EncryptAndCombine performs AES-GCM encryption and returns the nonce and ciphertext combined into a single byte slice.

func GenerateKey

func GenerateKey() ([]byte, error)

GenerateKey creates a new, random 32-byte key for AES-256.

func GetTestMode

func GetTestMode() bool

GetTestMode returns the current test mode status.

func IsDevBot

func IsDevBot() bool

IsDevBot returns true if the bot is running in development mode.

func ReadConfig

func ReadConfig(cfgFile string) error

ReadConfig will load the configuration files for API tokens.

Types

This section is empty.

Jump to

Keyboard shortcuts

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