configs

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "goclockify"
	Version = "1.2.0"
)

AppName Application Name Version Application Version

Variables

View Source
var (
	FilePath = xdg.New("abgeo", AppName).QueryConfig("config")
)

FilePath Configuration file path

Functions

func CreateConfigFile

func CreateConfigFile() (file *os.File, err error)

CreateConfigFile creates the default config file

Types

type Config

type Config struct {
	ClockifyAPIToken string     `json:"clockify_api_token"`
	KeyMapping       KeyMapping `json:"key_mapping"`
}

Config structure type

func NewConfig

func NewConfig() (cfg *Config, err error)

NewConfig creates the new config object from FilePath content

type KeyMapping

type KeyMapping struct {
	Workspace   WorkspaceKeyMapping   `json:"workspace"`
	TimeEntries TimeEntriesKeyMapping `json:"time_entries"`
	Other       OtherKeyMapping       `json:"other"`
}

KeyMapping the union of WorkspaceKeyMapping, TimeEntriesKeyMapping and OtherKeyMapping

type OtherKeyMapping

type OtherKeyMapping struct {
	Quit        []string `json:"quit"`
	CloseWindow []string `json:"close_window"`
	Help        []string `json:"help"`
}

OtherKeyMapping is a structure for general key mapping

type TimeEntriesKeyMapping

type TimeEntriesKeyMapping struct {
	NavigationUp       []string `json:"nav_up"`
	NavigationDown     []string `json:"nav_down"`
	NavigationToTop    []string `json:"nav_to_top"`
	NavigationToBottom []string `json:"nav_to_bottom"`
	NavigationSelect   []string `json:"nav_select"`
	Add                []string `json:"add"`
	Delete             []string `json:"delete"`
	Edit               []string `json:"edit"`
}

TimeEntriesKeyMapping is a structure for general key mapping

type WorkspaceKeyMapping

type WorkspaceKeyMapping struct {
	NavigationUp   []string `json:"nav_up"`
	NavigationDown []string `json:"nav_down"`
}

WorkspaceKeyMapping is a structure for workspaces key mapping

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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