configuration

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInitCommand

func NewInitCommand(cfgHandler ConfigurationHandler, prompter prompter.Prompter) *cobra.Command

func NewSetOriginCommand

func NewSetOriginCommand(cfgHandler ConfigurationHandler) *cobra.Command

func NewSetTokenCommand

func NewSetTokenCommand(cfgHandler ConfigurationHandler) *cobra.Command

func NewSetTokenEnvNameCommand

func NewSetTokenEnvNameCommand(cfgHandler ConfigurationHandler) *cobra.Command

func NewSwitchTrustGitBranchCommand

func NewSwitchTrustGitBranchCommand(cfgHandler ConfigurationHandler) *cobra.Command

Types

type BasicConfigurationHandler

type BasicConfigurationHandler struct {
	// contains filtered or unexported fields
}

func NewBasicConfigurationHandler

func NewBasicConfigurationHandler() *BasicConfigurationHandler

func (*BasicConfigurationHandler) GetToken

func (h *BasicConfigurationHandler) GetToken() string

func (*BasicConfigurationHandler) LoadConfig

func (h *BasicConfigurationHandler) LoadConfig() *Config

func (*BasicConfigurationHandler) SaveConfig

func (h *BasicConfigurationHandler) SaveConfig(config *Config) error

type Config

type Config struct {
	JiraOrigin       string            `json:"jira_origin"`
	JiraToken        string            `json:"jira_token"`
	JiraTokenEnvName string            `json:"jira_token_env_name"`
	Aliases          map[string]string `json:"aliases"`
	Snapshot         *time.Time        `json:"snapshot"`
	TrustGitBranch   bool              `json:"trustGitBranch"`
}

type ConfigurationHandler

type ConfigurationHandler interface {
	LoadConfig() *Config
	SaveConfig(config *Config) error
	GetToken() string
}

type MockConfigurationHandler

type MockConfigurationHandler struct {
	// contains filtered or unexported fields
}

func NewMockConfigurationHandler

func NewMockConfigurationHandler() *MockConfigurationHandler

func (*MockConfigurationHandler) GetToken

func (h *MockConfigurationHandler) GetToken() string

func (*MockConfigurationHandler) LoadConfig

func (h *MockConfigurationHandler) LoadConfig() *Config

func (*MockConfigurationHandler) SaveConfig

func (h *MockConfigurationHandler) SaveConfig(cfg *Config) error

func (*MockConfigurationHandler) SetConfig

func (h *MockConfigurationHandler) SetConfig(cfg *Config)

func (*MockConfigurationHandler) SetError

func (h *MockConfigurationHandler) SetError(err error)

Jump to

Keyboard shortcuts

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