Documentation ¶
Index ¶
Constants ¶
View Source
const ( //AppName is the name representing the application. AppName = "Cordless" //AppNameLowercase is the representative name, but lowercase. //It us used for filepaths and such. AppNameLowercase = "cordless" //HourMinuteAndSeconds is the time format HH:MM:SS. HourMinuteAndSeconds = 0 //HourAndMinute is the time format HH:MM. HourAndMinute = 1 //NoTime means that not time at all will be displayed. NoTime = 2 )
Variables ¶
This section is empty.
Functions ¶
func GetConfigDirectory ¶
GetConfigDirectory is the parent directory in the os, that contains the settings for the application.
func GetConfigFile ¶
GetConfigFile returns the absolute path to the configuration file or an error in case of failure.
func PersistConfig ¶
func PersistConfig() error
PersistConfig saves the current configuration onto the filesystem.
Types ¶
type Config ¶
type Config struct { //Token is the authorization token for accessing the discord API. Token string //Times decides on the time format (none, short and long). Times int //FocusChannelAfterGuildSelection will cause the widget focus to move over //to the channel tree after selecting a guild. FocusChannelAfterGuildSelection bool //FocusMessageInputAfterChannelSelection will cause the widget focus to //move over to the message input widget after channel selection FocusMessageInputAfterChannelSelection bool //ShowFrame decides wether the application will have a border and a title. ShowFrame bool //ShowChatHeader decides wether the box above the chat will be shown //or not. ShowChatHeader bool //ShowUserContainer decides wether the user container is part of the //layout or not. ShowUserContainer bool //UseFixedLayout defines whether the FixedSizeLeft and FixedSizeRight //values will be applied or not. UseFixedLayout bool //FixedSizeLeft determines the size of the guilds/channels/friends //container on the left side of the layout. FixedSizeLeft int //FixedSizeRight defines the size of the users container on the right. FixedSizeRight int }
Config contains all possible configuration for the application.
func LoadConfig ¶
LoadConfig loads the configuration initially and returns it.
Click to show internal directories.
Click to hide internal directories.