Documentation
¶
Index ¶
- Constants
- func CreateDirectory(dir string) error
- func CreateFile(name string) error
- func DirectoryExists(dir string) (bool, error)
- func EnsureConfigDirExists() error
- func EnsureFileExists(name string) error
- func FileExists(file string) (bool, error)
- func GetConfigDirectory() (string, error)
- func SaveConfig(conf *ApplicationConfig) error
- type ApplicationConfig
- type ColorBookmarkForm
- type ColorBookmarks
- type ColorHelpPage
- type ColorMetadata
- type ColorNavBar
- type ColorProjects
- type ColorTags
- type Colors
- type NavBar
- type Shortcuts
Constants ¶
View Source
const ( AppName = "Bookmarker" AppNameLower = "bookmarker" Version = "0.1.0" )
Variables ¶
This section is empty.
Functions ¶
func SaveConfig ¶
func SaveConfig(conf *ApplicationConfig) error
Types ¶
type ApplicationConfig ¶
type ApplicationConfig struct { LogLevel string `toml:"log_level"` HideArchived bool `toml:"default_hide_archived"` DefaultMetadata []string `toml:"default_metadata_fields"` DataBase string `toml:"database_file"` Log string `toml:"log_file"` AutoComplete bool `toml:"autocomplete"` AutoCompleteMaxResults int `toml:"autocomplete_max_results"` EnableFullTextSearch bool `toml:"full_text_search"` Colors Colors Shortcuts Shortcuts // contains filtered or unexported fields }
var Configuration *ApplicationConfig = &ApplicationConfig{}
func ReadConfigFile ¶
func ReadConfigFile(file string) (*ApplicationConfig, error)
ReadConfigFile reads config file from given file. If file is empty, use default location provided by os
func (*ApplicationConfig) ConfigDir ¶
func (a *ApplicationConfig) ConfigDir() string
func (*ApplicationConfig) DbFile ¶
func (a *ApplicationConfig) DbFile() string
func (*ApplicationConfig) Logfile ¶
func (a *ApplicationConfig) Logfile() string
func (*ApplicationConfig) ParseLogLevel ¶
func (a *ApplicationConfig) ParseLogLevel() (logrus.Level, error)
type ColorBookmarkForm ¶
type ColorBookmarks ¶
type ColorHelpPage ¶
type ColorMetadata ¶
type ColorNavBar ¶
type ColorNavBar struct {}
func (*ColorNavBar) ToNavBar ¶
func (c *ColorNavBar) ToNavBar() *twidgets.NavBarColors
type ColorProjects ¶
type ColorTags ¶
type Colors ¶
type Colors struct { Background tcell.Color TextPrimary tcell.Color TextPrimaryLight tcell.Color TextPrimaryDim tcell.Color SelectionBackground tcell.Color SelectionText tcell.Color Border tcell.Color BorderFocus tcell.Color ButtonBackground tcell.Color ButtonBackgroundSelected tcell.Color ButtonLabel tcell.Color ButtonLabelSelected tcell.Color ModalBackground tcell.Color Bookmarks ColorBookmarks Projects ColorProjects BookmarkForm ColorBookmarkForm Tags ColorTags Metadata ColorMetadata HelpPage ColorHelpPage }
type NavBar ¶
type NavBar struct {}
type Shortcuts ¶
type Shortcuts struct {
} Click to show internal directories.
Click to hide internal directories.