Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvVariableConfigPath = "CONFIG_PATH" AppName = "hephaestus" CmdHelp = "help" CmdConnect = "connect" CmdDocs = "docs" CmdSend = "send" CmdVerify = "verify" CmdCheck = "check" LogCommand = "command" LogUser = "user" LogExpirationEnd = "expiration_end" LogRecipient = "recipient" NetworkTestnet = "testnet" NetworkMainnet = "mainnet" ReactionOK = "✅" ReactionWarning = "🚨" )
Variables ¶
View Source
var (
HomeDir, _ = os.UserHomeDir()
DataDir = path.Join(HomeDir, ".hephaestus")
)
Functions ¶
This section is empty.
Types ¶
type BotConfig ¶
type BotConfig struct {
Token string `yaml:"token"`
Prefix string `yaml:"prefix"`
Limitations []*LimitationConfig `yaml:"limitations"`
}
BotConfig contains the configuration about the bot
func (*BotConfig) FindLimitationByCommand ¶
func (cfg *BotConfig) FindLimitationByCommand(command string) *LimitationConfig
type ChainConfig ¶
type ChainConfig struct {
*wallettypes.ChainConfig `yaml:"-,inline"`
ChainGraphQL string `yaml:"chain_graphql_addr"`
DesmosGraphQL string `yaml:"djuno_graphql_addr"`
}
ChainConfig wraps the wallet ChainConfig structure adding the GraphQL endpoint
type CmdHandler ¶
type CmdHandler = func(s disgord.Session, h *disgord.MessageCreate) error
CmdHandler represents a function that extends a disgord.HandlerMessageCreate to allow it to return an error
func MergeHandlers ¶
func MergeHandlers(handlers ...CmdHandler) CmdHandler
MergeHandlers merges all the given handlers into a single one
type Config ¶
type Config struct {
Networks *NetworksConfig `yaml:"networks"`
BotConfig *BotConfig `yaml:"bot"`
}
Config contains all the configuration data
type DiscordConfig ¶
type DiscordConfig struct {
VerifiedUserRole uint64 `yaml:"verified_user_role_id"`
VerifiedValidatorRole uint64 `yaml:"verified_validator_role_id"`
}
DiscordConfig contains the configuration about the Discord server
type LimitationConfig ¶
type NetworkConfig ¶
type NetworkConfig struct {
Chain *ChainConfig `yaml:"chain"`
Account *wallettypes.AccountConfig `yaml:"account"`
Themis *ThemisConfig `yaml:"themis"`
Discord *DiscordConfig `yaml:"discord"`
}
NetworkConfig contains the configuration about the Desmos network to be used
type NetworksConfig ¶
type NetworksConfig struct {
Testnet *NetworkConfig `yaml:"testnet"`
Mainnet *NetworkConfig `yaml:"mainnet"`
}
type ThemisConfig ¶
type ThemisConfig struct {
// Themis host URL to where to upload data
Host string `yaml:"host"`
// Path to the PKCS#8-encoded private key of the bot
PrivateKeyPath string `yaml:"private_key_path"`
}
ThemisConfig contains the configuration of the Themis APIs endpoint
Click to show internal directories.
Click to hide internal directories.