config

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Dir is a jira-cli config directory.
	Dir = ".jira"
	// FileName is a jira-cli config file name.
	FileName = ".config"
	// FileType is a jira-cli config file extension.
	FileType = "yml"
)

Variables

View Source
var (
	// ErrSkip is returned when a user skips the config generation.
	ErrSkip = fmt.Errorf("skipping config generation")
	// ErrUnexpectedResponseFormat is returned if the response data is in unexpected format.
	ErrUnexpectedResponseFormat = fmt.Errorf("unexpected response format")
)

Functions

func Exists

func Exists(file string) bool

Exists checks if the file exist.

Types

type JiraCLIConfig

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

JiraCLIConfig is a Jira CLI config.

func NewJiraCLIConfig

func NewJiraCLIConfig(opts ...JiraCLIConfigFunc) *JiraCLIConfig

NewJiraCLIConfig creates a new Jira CLI config.

func (*JiraCLIConfig) Generate

func (c *JiraCLIConfig) Generate() (string, error)

Generate generates the config file.

type JiraCLIConfigFunc

type JiraCLIConfigFunc func(*JiraCLIConfig)

JiraCLIConfigFunc decorates option for JiraCLIConfig.

func WithInsecureTLS

func WithInsecureTLS(ins bool) JiraCLIConfigFunc

WithInsecureTLS is a functional opt to set TLS certificate verification option.

Jump to

Keyboard shortcuts

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