Documentation
¶
Index ¶
Constants ¶
View Source
const AppName = "strawpoll-cli"
Variables ¶
This section is empty.
Functions ¶
func ConfigExists ¶
ConfigExists checks whether the config file exists on disk.
func ConfigPath ¶
func EnsureKeyringDir ¶
func KeyringDir ¶
func WriteConfig ¶
WriteConfig writes the YAML config file atomically using a .tmp + rename pattern.
Types ¶
type File ¶
type File struct {
KeyringBackend string `yaml:"keyring_backend,omitempty" json:"keyring_backend,omitempty"`
Dupcheck string `yaml:"dupcheck,omitempty" json:"dupcheck,omitempty"`
ResultsVisibility string `yaml:"results_visibility,omitempty" json:"results_visibility,omitempty"`
IsPrivate *bool `yaml:"is_private,omitempty" json:"is_private,omitempty"`
AllowComments *bool `yaml:"allow_comments,omitempty" json:"allow_comments,omitempty"`
AllowVPN *bool `yaml:"allow_vpn_users,omitempty" json:"allow_vpn_users,omitempty"`
HideParticipants *bool `yaml:"hide_participants,omitempty" json:"hide_participants,omitempty"`
EditVotePerms string `yaml:"edit_vote_permissions,omitempty" json:"edit_vote_permissions,omitempty"`
}
File represents the strawpoll-cli YAML configuration.
func ReadConfig ¶
ReadConfig reads the YAML config file. Returns zero File{} if file does not exist.
Click to show internal directories.
Click to hide internal directories.