commands

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2018 License: MIT Imports: 14 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 AddIssueCommand

type AddIssueCommand struct {
	Ui       ui.Ui
	Provider gitlab.Provider
}

func (*AddIssueCommand) Help

func (c *AddIssueCommand) Help() string

func (*AddIssueCommand) Run

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

func (*AddIssueCommand) Synopsis

func (c *AddIssueCommand) Synopsis() string

type AddMergeReqeustCommand

type AddMergeReqeustCommand struct {
	Ui       ui.Ui
	Provider gitlab.Provider
}

func (*AddMergeReqeustCommand) Help

func (c *AddMergeReqeustCommand) Help() string

func (*AddMergeReqeustCommand) Run

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

func (*AddMergeReqeustCommand) Synopsis

func (c *AddMergeReqeustCommand) Synopsis() string

type BrowseCommand

type BrowseCommand struct {
	Ui        ui.Ui
	Provider  gitlab.Provider
	GitClient git.Client
	Cmd       cmd.Cmd
}

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 BrowseOpt

type BrowseOpt struct {
	GlobalOpt *GlobalOpt `group:"Global Options"`
}

type BrowseType

type BrowseType int
const (
	Issue BrowseType = iota
	MergeRequest
	PipeLine
)

type CreateIssueFlags

type CreateIssueFlags struct {
	Title       string `short:"t" long:"title" description:"The title of an issue"`
	Description string `short:"d" long:"description" description:"The description of an issue"`
	AssigneeID  int    `short:"a" long:"assignee_id" description:"The ID of a user to assign issue"`
	MilestoneID int    `short:"m" long:"milestone_id" description:"The ID of a milestone to assign issue"`

	Labels string `short:"l" long:"labels" description:"Comma-separated label names for an issue"`
}

type CreateMergeReqeustFlags

type CreateMergeReqeustFlags struct {
	Title        string `short:"t" long:"title" description:"The title of an merge request"`
	Description  string `short:"d" long:"description" description:"The description of an merge request"`
	SourceBranch string `short:"s" long:"source" description:"The source branch"`
	TargetBranch string `short:"g" long:"target" description:"The target branch"`
	AssigneeID   int    `short:"a" long:"assignee_id" description:"The ID of a user to assign merge request"`
	MilestoneID  int    `short:"m" long:"milestone_id" description:"The ID of a milestone to assign merge request"`

	Labels string `short:"l" long:"labels" description:"Comma-separated label names for an merge request"`
}

type GlobalOpt

type GlobalOpt struct {
	Repository string `short:"p" long:"repository" description:"target specific repository"`
}

func (*GlobalOpt) IsValid

func (g *GlobalOpt) IsValid() error

func (*GlobalOpt) NameSpaceAndProject

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

type IssueCommand

type IssueCommand struct {
	Ui       ui.Ui
	Provider gitlab.Provider
}

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 IssueOpt

type IssueOpt struct {
	GlobalOpt *GlobalOpt `group:"Global Options"`
	SearchOpt *SearchOpt `group:"Search Options"`
}

type MergeRequestCommand

type MergeRequestCommand struct {
	Ui       ui.Ui
	Provider gitlab.Provider
}

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 MergeRequestOpt

type MergeRequestOpt struct {
	GlobalOpt *GlobalOpt `group:"Global Options"`
	SearchOpt *SearchOpt `group:"Search Options"`
}

type OptionValidator

type OptionValidator interface {
	IsValid(error)
}

type SearchOpt

type SearchOpt struct {
	Line          int    `short:"n" long:"line" default:"20" default-mask:"20" description:"output the NUM lines"`
	State         string `short:"t" long:"state" default:"all" default-mask:"all" description:"just those that are opened, closed or all"`
	Scope         string `short:"c" long:"scope" default:"all" default-mask:"all" description:"given scope: created-by-me, assigned-to-me or all."`
	OrderBy       string `` /* 129-byte string literal not displayed */
	Sort          string `short:"s" long:"sort" default:"desc" default-mask:"desc" description:"sorted in asc or desc order."`
	Opened        bool   `short:"e" long:"opened" description:"search state opened"`
	Closed        bool   `short:"l" long:"closed" description:"search scope closed"`
	CreatedMe     bool   `short:"r" long:"created-me" description:"search scope created-by-me"`
	AssignedMe    bool   `short:"g" long:"assigned-me" description:"search scope assigned-to-me"`
	AllRepository bool   `short:"a" long:"all-repository" description:"search target all repository"`
}

func (*SearchOpt) GetScope

func (s *SearchOpt) GetScope() string

func (*SearchOpt) GetState

func (s *SearchOpt) GetState() string

Jump to

Keyboard shortcuts

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