commands

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitCodeOK        int = iota //0
	ExitCodeError     int = iota //1
	ExitCodeFileError int = iota //2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BrowseCommand

type BrowseCommand struct {
	Ui        ui.Ui
	Provider  lab.Provider
	GitClient git.Client
	Opener    cmd.URLOpener
}

func (*BrowseCommand) Help

func (c *BrowseCommand) Help() string

func (*BrowseCommand) Run

func (c *BrowseCommand) Run(args []string) int

func (*BrowseCommand) Synopsis

func (c *BrowseCommand) Synopsis() string

type BrowseCommandOption added in v0.2.0

type BrowseCommandOption struct {
	BrowseOption *BrowseOption `group:"Global Options"`
}

type BrowseOption added in v0.4.0

type BrowseOption struct {
	Subpage string `short:"s" long:"subpage" description:"open project sub page"`
	URL     bool   `short:"u" long:"url" description:"show project url"`
	Copy    bool   `short:"c" long:"copy" description:"copy project url to clipboard"`
	Project string `short:"p" long:"project" description:"command target specific project"`
}

func (*BrowseOption) IsValid added in v0.4.0

func (g *BrowseOption) IsValid() error

func (*BrowseOption) NameSpaceAndProject added in v0.4.0

func (g *BrowseOption) NameSpaceAndProject() (namespace, project string)

type CreateUpdateIssueOption added in v0.2.0

type CreateUpdateIssueOption struct {
	Edit       bool   `` /* 136-byte string literal not displayed */
	Title      string `short:"i" long:"title" value-name:"<title>" description:"The title of an issue"`
	Message    string `short:"m" long:"message" value-name:"<message>" description:"The message of an issue"`
	StateEvent string `long:"state-event" description:"Change the status. \"close\", \"reopen\""`
	AssigneeID int    `long:"assignee-id" description:"The ID of assignee."`
}

type CreateUpdateMergeRequestOption added in v0.2.0

type CreateUpdateMergeRequestOption struct {
	Edit         bool   `` /* 144-byte string literal not displayed */
	Title        string `short:"i" long:"title" value-name:"<title>" description:"The title of an merge request"`
	Message      string `short:"m" long:"message" value-name:"<message>" description:"The message of an merge request"`
	SourceBranch string `short:"s" long:"source" description:"The source branch"`
	TargetBranch string `short:"t" long:"target" default:"master" default-mask:"master" description:"The target branch"`
	StateEvent   string `long:"state-event" description:"Change the status. \"opened\", \"closed\""`
	AssigneeID   int    `long:"assignee-id" description:"The ID of assignee."`
}

type CreateUpdateProjectVaribleOption added in v0.5.0

type CreateUpdateProjectVaribleOption struct {
	Add    bool `short:"a" long:"add" description:"Create/Add project variable."`
	Update bool `short:"u" long:"update" description:"Update project variable."`
	Delete bool `short:"d" long:"delete" description:"Delete project variable."`
}

type IssueCommand

type IssueCommand struct {
	Ui       ui.Ui
	Provider lab.Provider
	EditFunc func(program, file string) error
}

func (*IssueCommand) Help

func (c *IssueCommand) Help() string

func (*IssueCommand) Run

func (c *IssueCommand) Run(args []string) int

func (*IssueCommand) Synopsis

func (c *IssueCommand) Synopsis() string

type IssueCommnadOption added in v0.2.0

type IssueCommnadOption struct {
	CreateUpdateOption *CreateUpdateIssueOption `group:"Create, Update Options"`
	ListOption         *ListIssueOption         `group:"List Options"`
}

type IssueOperation added in v0.2.0

type IssueOperation int
const (
	CreateIssue IssueOperation = iota
	CreateIssueOnEditor
	UpdateIssue
	UpdateIssueOnEditor
	ShowIssue
	ListIssue
	ListIssueAllProject
)

type JobCommand added in v0.4.0

type JobCommand struct {
	UI       ui.Ui
	Provider lab.Provider
}

func (*JobCommand) Help added in v0.4.0

func (c *JobCommand) Help() string

func (*JobCommand) Run added in v0.4.0

func (c *JobCommand) Run(args []string) int

func (*JobCommand) Synopsis added in v0.4.0

func (c *JobCommand) Synopsis() string

type JobCommandOption added in v0.4.0

type JobCommandOption struct {
	ListOption *ListJobOption `group:"List Options"`
}

type LintCommand added in v0.2.0

type LintCommand struct {
	UI       ui.Ui
	Provider gitlab.Provider
}

func (*LintCommand) Help added in v0.2.0

func (c *LintCommand) Help() string

func (*LintCommand) Run added in v0.2.0

func (c *LintCommand) Run(args []string) int

func (*LintCommand) Synopsis added in v0.2.0

func (c *LintCommand) Synopsis() string

type ListIssueOption added in v0.2.0

type ListIssueOption struct {
	Num        int    `short:"n" long:"num" value-name:"<num>" default:"20" default-mask:"20" description:"Limit the number of issue to output."`
	State      string `` /* 164-byte string literal not displayed */
	Scope      string `` /* 154-byte string literal not displayed */
	OrderBy    string `` /* 162-byte string literal not displayed */
	Sort       string `` /* 131-byte string literal not displayed */
	Opened     bool   `short:"o" long:"opened" description:"Shorthand of the state option for \"--state=opened\"."`
	Closed     bool   `short:"c" long:"closed" description:"Shorthand of the state option for \"--state=closed\"."`
	CreatedMe  bool   `short:"r" long:"created-me" description:"Shorthand of the scope option for \"--scope=created-by-me\"."`
	AssignedMe bool   `short:"a" long:"assigned-me" description:"Shorthand of the scope option for \"--scope=assigned-by-me\"."`
	AllProject bool   `short:"A" long:"all-project" description:"Print the issue of all projects"`
}

func (*ListIssueOption) GetScope added in v0.2.0

func (l *ListIssueOption) GetScope() string

func (*ListIssueOption) GetState added in v0.2.0

func (l *ListIssueOption) GetState() string

type ListJobOption added in v0.4.0

type ListJobOption struct {
	Num int  `short:"n" long:"num" value-name:"<num>" default:"20" default-mask:"20" description:"Limit the number of search to output."`
	Log bool `short:"t" long:"log" description:"Get a trace of a specific job of a project."`
}

type ListMergeRequestOption added in v0.2.0

type ListMergeRequestOption struct {
	Num        int    `` /* 129-byte string literal not displayed */
	State      string `` /* 184-byte string literal not displayed */
	Scope      string `` /* 154-byte string literal not displayed */
	OrderBy    string `` /* 170-byte string literal not displayed */
	Sort       string `` /* 139-byte string literal not displayed */
	Opened     bool   `short:"o" long:"opened" description:"Shorthand of the state option for \"--state=opened\"."`
	Closed     bool   `short:"c" long:"closed" description:"Shorthand of the state option for \"--state=closed\"."`
	Merged     bool   `short:"g" long:"merged" description:"Shorthand of the state option for \"--state=merged\"."`
	CreatedMe  bool   `short:"r" long:"created-me" description:"Shorthand of the scope option for \"--scope=created-by-me\"."`
	AssignedMe bool   `short:"a" long:"assigned-me" description:"Shorthand of the scope option for \"--scope=assigned-by-me\"."`
	AllProject bool   `short:"A" long:"all-project" description:"Print the merge request of all projects"`
}

func (*ListMergeRequestOption) GetScope added in v0.2.0

func (l *ListMergeRequestOption) GetScope() string

func (*ListMergeRequestOption) GetState added in v0.2.0

func (l *ListMergeRequestOption) GetState() string

type ListPipelineOption added in v0.4.0

type ListPipelineOption struct {
	Num     int    `short:"n" long:"num" value-name:"<num>" default:"20" default-mask:"20" description:"Limit the number of pipeline to output."`
	Sort    string `` /* 134-byte string literal not displayed */
	Scope   string `short:"c" long:"scope" description:"The scope of pipelines, one of: running, pending, finished, branches, tags"`
	States  string `short:"t" long:"states" description:" The status of pipelines, one of: running, pending, success, failed, canceled, skipped"`
	OrderBy string `short:"o" long:"orderby" default:"id" default-mask:"id" description:"Order pipelines by id, status, ref, or user_id"`
}

type ListProjectOption added in v0.4.0

type ListProjectOption struct {
	Num        int    `short:"n" long:"num" value-name:"<num>" default:"20" default-mask:"20" description:"Limit the number of project to output."`
	Sort       string `` /* 133-byte string literal not displayed */
	OrderBy    string `` /* 163-byte string literal not displayed */
	Owned      bool   `short:"w" long:"owned" description:"Limit by projects owned by the current user"`
	Membership bool   `short:"m" long:"member-ship" description:"Limit by projects that the current user is a member of"`
}

type ListUserOption added in v0.3.0

type ListUserOption struct {
	Num        int    `short:"n" long:"num" value-name:"<num>" default:"20" default-mask:"20" description:"Limit the number of search to output."`
	Search     string `short:"s" long:"search" value-name:"<search word>" description:"Search for specific users"`
	AllProject bool   `short:"A" long:"all-project" description:"Print the user of all projects"`
}

type MergeRequestCommand

type MergeRequestCommand struct {
	Ui        ui.Ui
	Provider  lab.Provider
	GitClient git.Client
	EditFunc  func(program, file string) error
}

func (*MergeRequestCommand) Help

func (c *MergeRequestCommand) Help() string

func (*MergeRequestCommand) Run

func (c *MergeRequestCommand) Run(args []string) int

func (*MergeRequestCommand) Synopsis

func (c *MergeRequestCommand) Synopsis() string

type MergeRequestCommandOption added in v0.2.0

type MergeRequestCommandOption struct {
	CreateUpdateOption *CreateUpdateMergeRequestOption `group:"Create, Update Options"`
	ListOption         *ListMergeRequestOption         `group:"List Options"`
}

type MergeRequestOperation added in v0.2.0

type MergeRequestOperation int
const (
	CreateMergeRequest MergeRequestOperation = iota
	CreateMergeRequestOnEditor
	UpdateMergeRequest
	UpdateMergeRequestOnEditor
	ShowMergeRequest
	ListMergeRequest
	ListMergeRequestAllProject
)

type PipelineCommand added in v0.2.0

type PipelineCommand struct {
	UI       ui.Ui
	Provider lab.Provider
}

func (*PipelineCommand) Help added in v0.2.0

func (c *PipelineCommand) Help() string

func (*PipelineCommand) Run added in v0.2.0

func (c *PipelineCommand) Run(args []string) int

func (*PipelineCommand) Synopsis added in v0.2.0

func (c *PipelineCommand) Synopsis() string

type PipelineCommandOption added in v0.2.0

type PipelineCommandOption struct {
	ListOption *ListPipelineOption `group:"List Options"`
}

type PipelineOperation added in v0.3.0

type PipelineOperation int
const (
	ListPipeline PipelineOperation = iota
	ShowPipeline
)

type PipelineOption added in v0.2.0

type PipelineOption struct {
}

type ProjectCommand added in v0.2.0

type ProjectCommand struct {
	UI       ui.Ui
	Provider lab.Provider
}

func (*ProjectCommand) Help added in v0.2.0

func (c *ProjectCommand) Help() string

func (*ProjectCommand) Run added in v0.2.0

func (c *ProjectCommand) Run(args []string) int

func (*ProjectCommand) Synopsis added in v0.2.0

func (c *ProjectCommand) Synopsis() string

type ProjectCommnadOption added in v0.2.0

type ProjectCommnadOption struct {
	OutputOption *ListProjectOption `group:"List Options"`
}

type ProjectVariableCommand added in v0.5.0

type ProjectVariableCommand struct {
	UI       ui.Ui
	Provider lab.Provider
}

func (*ProjectVariableCommand) Help added in v0.5.0

func (c *ProjectVariableCommand) Help() string

func (*ProjectVariableCommand) Run added in v0.5.0

func (c *ProjectVariableCommand) Run(args []string) int

func (*ProjectVariableCommand) Synopsis added in v0.5.0

func (c *ProjectVariableCommand) Synopsis() string

type ProjectVariableOperation added in v0.5.0

type ProjectVariableOperation int
const (
	CreateProjectVariable ProjectVariableOperation = iota
	UpdateProjectVariable
	RemoveProjectVariable
	ListProjectVariable
)

type ProjectVaribleCommandOption added in v0.5.0

type ProjectVaribleCommandOption struct {
	CreateUpdateOption *CreateUpdateProjectVaribleOption `group:"List Options"`
}

type UserCommand added in v0.3.0

type UserCommand struct {
	UI       ui.Ui
	Provider lab.Provider
}

func (*UserCommand) Help added in v0.3.0

func (c *UserCommand) Help() string

func (*UserCommand) Run added in v0.3.0

func (c *UserCommand) Run(args []string) int

func (*UserCommand) Synopsis added in v0.3.0

func (c *UserCommand) Synopsis() string

type UserCommandOption added in v0.3.0

type UserCommandOption struct {
	ListOption *ListUserOption `group:"List Options"`
}

Jump to

Keyboard shortcuts

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