config

package
v0.0.0-...-174561d Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger() *logrus.Logger

Types

type Config

type Config struct {
	LogLevel       string `yaml:"logLevel"`
	UpdateInterval int    `yaml:"updateInterval"`
	Todoist        struct {
		Token                 string `yaml:"token"`
		NextActionLabel       string `yaml:"nextActionLabel"`
		AssignProjectLabel    bool   `yaml:"assignProjectLabel"`
		AssignNextActionLabel bool   `yaml:"assignNextActionLabel"`
		ParentProjectName     string `yaml:"parentProjectName"`
		ProjectsLabelPrefix   string `yaml:"projectsLabelPrefix"`
	} `yaml:"todoist"`
	Jira []JiraConfig `yaml:"jira"`
	// contains filtered or unexported fields
}

func GetConfiguration

func GetConfiguration() Config

func (*Config) IsTest

func (cfg *Config) IsTest() bool

func (*Config) ToAPIPriority

func (cfg *Config) ToAPIPriority(configPriority string) (int, error)

ToAPIPriority converts a configuration priority to a Todoist API priority

type JiraConfig

type JiraConfig struct {
	Site               string              `yaml:"site"`
	Username           string              `yaml:"username"`
	Token              string              `yaml:"token"`
	JQL                string              `yaml:"jql"`
	Labels             []string            `yaml:"labels"`
	CompletionStatuses []string            `yaml:"completionStatuses"`
	Project            string              `yaml:"project"`
	SyncJiraLabels     bool                `yaml:"syncJiraLabels"`
	SyncJiraComponents bool                `yaml:"syncJiraComponents"`
	PriorityMap        map[string][]string `yaml:"priorityMap"`
}

Jump to

Keyboard shortcuts

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