Documentation
¶
Overview ¶
Package cmd contains the cobra command tree for gh-devlake.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnSetupResult ¶ added in v0.3.0
type ConnSetupResult struct {
Plugin string
ConnectionID int
Name string
Organization string
Enterprise string
}
ConnSetupResult holds the outcome of setting up one connection.
type ConnectionDef ¶ added in v0.3.0
type ConnectionDef struct {
Plugin string
DisplayName string
Available bool // false = coming soon
Endpoint string
NeedsOrg bool
NeedsEnterprise bool
NeedsOrgOrEnt bool
SupportsTest bool
RateLimitPerHour int // default rate limit; 0 = use 4500
EnableGraphql bool // send enableGraphql=true in create/test payloads
RequiredScopes []string // PAT scopes needed for this plugin
ScopeHint string // short hint for error messages
TokenPrompt string // label for masked token prompt (e.g. "GitHub PAT")
OrgPrompt string // label for org prompt; empty = not prompted
EnterprisePrompt string // label for enterprise prompt; empty = not prompted
EnvVarNames []string // environment variable names for token resolution
EnvFileKeys []string // .devlake.env keys for token resolution
}
ConnectionDef describes a plugin connection type and how to create it.
func AvailableConnections ¶ added in v0.3.0
func AvailableConnections() []*ConnectionDef
AvailableConnections returns only available (non-coming-soon) connection defs.
func FindConnectionDef ¶ added in v0.3.0
func FindConnectionDef(plugin string) *ConnectionDef
FindConnectionDef returns the def for the given plugin slug, or nil.
func (*ConnectionDef) BuildCreateRequest ¶ added in v0.3.0
func (d *ConnectionDef) BuildCreateRequest(name string, params ConnectionParams) *devlake.ConnectionCreateRequest
BuildCreateRequest constructs the API payload for creating this connection.
func (*ConnectionDef) BuildTestRequest ¶ added in v0.3.0
func (d *ConnectionDef) BuildTestRequest(name string, params ConnectionParams) *devlake.ConnectionTestRequest
BuildTestRequest constructs the API payload for testing this connection.
func (*ConnectionDef) MenuLabel ¶ added in v0.3.0
func (d *ConnectionDef) MenuLabel() string
MenuLabel returns the label for interactive menus.
type ConnectionParams ¶ added in v0.3.0
type ConnectionParams struct {
Token string
Org string
Enterprise string
Name string // override default connection name
Proxy string // HTTP proxy URL
Endpoint string // override default endpoint (e.g. GitHub Enterprise Server)
}
ConnectionParams holds user-supplied values for a single connection.
type ProjectOpts ¶ added in v0.3.7
type ProjectOpts struct {
ProjectName string
TimeAfter string
Cron string
SkipSync bool
Wait bool
Timeout time.Duration
// Pre-resolved fields set by orchestrators (full, init)
Client *devlake.Client
StatePath string
State *devlake.State
}
ProjectOpts holds options for the project command.
type ScopeOpts ¶ added in v0.3.7
type ScopeOpts struct {
Org string
Enterprise string
Plugin string
Repos string
ReposFile string
ConnectionID int
ProjectName string
DeployPattern string
ProdPattern string
IncidentLabel string
TimeAfter string
Cron string
SkipSync bool
Wait bool
Timeout string
}
ScopeOpts holds all options for scope and project commands, replacing the former package-level scope* variables.
Source Files
¶
- cleanup.go
- configure.go
- configure_connection_delete.go
- configure_connection_list.go
- configure_connection_test_cmd.go
- configure_connection_update.go
- configure_connections.go
- configure_full.go
- configure_projects.go
- configure_scopes.go
- connection_types.go
- deploy.go
- deploy_azure.go
- deploy_local.go
- helpers.go
- init.go
- root.go
- status.go
- workdir.go