jiracli

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2017 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllTemplates = map[string]string{
	"attach-list":    defaultAttachListTemplate,
	"comment":        defaultCommentTemplate,
	"component-add":  defaultComponentAddTemplate,
	"components":     defaultComponentsTemplate,
	"create":         defaultCreateTemplate,
	"createmeta":     defaultDebugTemplate,
	"debug":          defaultDebugTemplate,
	"edit":           defaultEditTemplate,
	"editmeta":       defaultDebugTemplate,
	"epic-create":    defaultEpicCreateTemplate,
	"epic-list":      defaultTableTemplate,
	"fields":         defaultDebugTemplate,
	"issuelinktypes": defaultDebugTemplate,
	"issuetypes":     defaultIssuetypesTemplate,
	"json":           defaultDebugTemplate,
	"list":           defaultListTemplate,
	"request":        defaultDebugTemplate,
	"subtask":        defaultSubtaskTemplate,
	"table":          defaultTableTemplate,
	"transition":     defaultTransitionTemplate,
	"transitions":    defaultTransitionsTemplate,
	"transmeta":      defaultDebugTemplate,
	"view":           defaultViewTemplate,
	"worklog":        defaultWorklogTemplate,
	"worklogs":       defaultWorklogsTemplate,
}

Functions

func BrowseUsage

func BrowseUsage(cmd *kingpin.CmdClause, opts *CommonOptions)

func CliError

func CliError(cause error) error

func ConfigTemplate added in v1.0.6

func ConfigTemplate(fig *figtree.FigTree, template, command string, opts interface{}) (string, error)

func ConvertType added in v1.0.8

func ConvertType(input interface{}, output interface{}) error

func EditLoop

func EditLoop(opts *CommonOptions, input interface{}, output interface{}, submit func() error) error

func EditorUsage

func EditorUsage(cmd *kingpin.CmdClause, opts *CommonOptions)

func FlagValue

func FlagValue(ctx *kingpin.ParseContext, name string) string

func GJsonQueryUsage added in v1.0.5

func GJsonQueryUsage(cmd *kingpin.CmdClause, opts *CommonOptions)

func Homedir

func Homedir() string

func LoadConfigs

func LoadConfigs(cmd *kingpin.CmdClause, fig *figtree.FigTree, opts interface{})

func Register

func Register(app *kingpin.Application, o *oreo.Client, fig *figtree.FigTree, reg []CommandRegistry)

func RunTemplate

func RunTemplate(templateName string, data interface{}, out io.Writer) error

func TemplateProcessor

func TemplateProcessor() *template.Template

func TemplateUsage

func TemplateUsage(cmd *kingpin.CmdClause, opts *CommonOptions)

Types

type CommandRegistry

type CommandRegistry struct {
	Command string
	Aliases []string
	Entry   *CommandRegistryEntry
	Default bool
}

type CommandRegistryEntry

type CommandRegistryEntry struct {
	Help        string
	UsageFunc   func(*figtree.FigTree, *kingpin.CmdClause) error
	ExecuteFunc func(*oreo.Client, *GlobalOptions) error
}

type CommonOptions

type CommonOptions struct {
	Browse      figtree.BoolOption   `yaml:"browse,omitempty" json:"browse,omitempty"`
	Editor      figtree.StringOption `yaml:"editor,omitempty" json:"editor,omitempty"`
	GJsonQuery  figtree.StringOption `yaml:"gjq,omitempty" json:"gjq,omitempty"`
	SkipEditing figtree.BoolOption   `yaml:"noedit,omitempty" json:"noedit,omitempty"`
	Template    figtree.StringOption `yaml:"template,omitempty" json:"template,omitempty"`
}

func (*CommonOptions) PrintTemplate added in v1.0.5

func (o *CommonOptions) PrintTemplate(data interface{}) error

type Error

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

type Exit

type Exit struct {
	Code int
}

type GlobalOptions

type GlobalOptions struct {
	Endpoint       figtree.StringOption `yaml:"endpoint,omitempty" json:"endpoint,omitempty"`
	Insecure       figtree.BoolOption   `yaml:"insecure,omitempty" json:"insecure,omitempty"`
	PasswordSource figtree.StringOption `yaml:"password-source,omitempty" json:"password-source,omitempty"`
	Quiet          figtree.BoolOption   `yaml:"quiet,omitempty" json:"quiet,omitempty"`
	UnixProxy      figtree.StringOption `yaml:"unixproxy,omitempty" json:"unixproxy,omitempty"`
	User           figtree.StringOption `yaml:"user,omitempty" json:"user,omitempty"`
}

func (*GlobalOptions) GetPass

func (o *GlobalOptions) GetPass() string

func (*GlobalOptions) ProvideAuthParams

func (o *GlobalOptions) ProvideAuthParams() *jiradata.AuthParams

func (*GlobalOptions) SetPass

func (o *GlobalOptions) SetPass(passwd string) error

Jump to

Keyboard shortcuts

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