config

package
v0.0.0-...-e70d3af Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateConfig

func ValidateConfig(conf EnvConfig, offline bool) error

Validate the given config file. If offline, do so without connecting to keybase (used in code that is meant to function without any reliance on Keybase).

Types

type Config

type Config interface {
	GetCAKeyLocation() string
	GetKeybaseHomeDir() string
	GetKeybasePaperKey() string
	GetKeybaseUsername() string
	GetKeyExpiration() string
	GetTeams() []string
	GetChatTeam() string
	GetChannelName() string
	GetLogLocation() string
	GetStrictLogging() bool
	GetAnnouncement() string
	DebugString() string
}

Represents a loaded and validated config for keybaseca

type EnvConfig

type EnvConfig struct{}

A Config struct that pulls transparently from the environment

func (*EnvConfig) DebugString

func (ef *EnvConfig) DebugString() string

Dump this EnvConfig to a string for debugging purposes

func (*EnvConfig) GetAnnouncement

func (ef *EnvConfig) GetAnnouncement() string

Get the announcement string used when the bot is started up. May be empty.

func (*EnvConfig) GetCAKeyLocation

func (ef *EnvConfig) GetCAKeyLocation() string

Get the location of the CA key

func (*EnvConfig) GetChannelName

func (ef *EnvConfig) GetChannelName() string

Get the channel used for all communication. May be empty.

func (*EnvConfig) GetChatTeam

func (ef *EnvConfig) GetChatTeam() string

Get the team used for all communication. May be empty.

func (*EnvConfig) GetKeyExpiration

func (ef *EnvConfig) GetKeyExpiration() string

Get the expiration period for signatures generated by the bot.

func (*EnvConfig) GetKeybaseHomeDir

func (ef *EnvConfig) GetKeybaseHomeDir() string

Get the keybase home directory. Used if you are running a separate instance of keybase for the chatbot. May be empty.

func (*EnvConfig) GetKeybasePaperKey

func (ef *EnvConfig) GetKeybasePaperKey() string

Get the keybase paper key for the bot account. Used if you are running a separate instance of keybase for the chatbot. May be empty.

func (*EnvConfig) GetKeybaseUsername

func (ef *EnvConfig) GetKeybaseUsername() string

Get the keybase username for the bot account. Used if you are running a separate instance of keybase for the chatbot. May be empty.

func (*EnvConfig) GetLogLocation

func (ef *EnvConfig) GetLogLocation() string

Get the location for the bot's audit logs. May be empty.

func (*EnvConfig) GetStrictLogging

func (ef *EnvConfig) GetStrictLogging() bool

Get whether or not strict logging (see env.md for a description of this feature) is enabled

func (*EnvConfig) GetTeams

func (ef *EnvConfig) GetTeams() []string

Get the list of keybase teams configured to be used with the bot.

Jump to

Keyboard shortcuts

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