Documentation
¶
Index ¶
Constants ¶
const DefaultDocsRef = "v16.4.0-ee"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commands ¶
type Commands struct {
Globals
Get GetCommand `cmd:"" help:"Save GitLab project's configuration to a local file."`
Set SetCommand `cmd:"" help:"Update GitLab project's configuration based on a local file."`
Sops SopsCommand `cmd:"" help:"Run SOPS, an editor of encrypted files. See: https://github.com/tozd/sops" passthrough:""`
}
Commands is used as configuration for Kong command-line parser.
Besides commands themselves it also contains top-level (global) flags.
type Configuration ¶
type Configuration struct {
Project map[string]interface{} `json:"project" yaml:"project"`
Avatar *string `json:"avatar" yaml:"avatar"`
Approvals map[string]interface{} `json:"approvals" yaml:"approvals"`
ApprovalRules []map[string]interface{} `json:"approval_rules" yaml:"approval_rules"`
ApprovalRulesComment string `json:"comment:approval_rules,omitempty" yaml:"comment:approval_rules,omitempty"`
PushRules map[string]interface{} `json:"push_rules" yaml:"push_rules"`
PushRulesComment string `json:"comment:push_rules,omitempty" yaml:"comment:push_rules,omitempty"`
ForkedFromProject *int `json:"forked_from_project" yaml:"forked_from_project"`
ForkedFromProjectComment string `json:"comment:forked_from_project,omitempty" yaml:"comment:forked_from_project,omitempty"`
Labels []map[string]interface{} `json:"labels" yaml:"labels"`
LabelsComment string `json:"comment:labels,omitempty" yaml:"comment:labels,omitempty"`
ProtectedBranches []map[string]interface{} `json:"protected_branches" yaml:"protected_branches"`
ProtectedBranchesComment string `json:"comment:protected_branches,omitempty" yaml:"comment:protected_branches,omitempty"`
ProtectedTags []map[string]interface{} `json:"protected_tags" yaml:"protected_tags"`
ProtectedTagsComment string `json:"comment:protected_tags,omitempty" yaml:"comment:protected_tags,omitempty"`
Variables []map[string]interface{} `json:"variables" yaml:"variables"`
VariablesComment string `json:"comment:variables,omitempty" yaml:"comment:variables,omitempty"`
PipelineSchedules []map[string]interface{} `json:"pipeline_schedules" yaml:"pipeline_schedules"`
PipelineSchedulesComment string `json:"comment:pipeline_schedules,omitempty" yaml:"comment:pipeline_schedules,omitempty"`
}
Configuration represents GitLab's project configuration supported.
Some fields have type map[string]interface{} because they are passed almost as-is to GitLab API. This allows for potential customization in behavior beyond what is currently supported by this package.
All fields with prefix "comment:" are moved into YAML comments before they are written out. Similarly, fields which have "Comment" suffix are moved into YAML comments and are not used for project configuration.
type GetCommand ¶
type GetCommand struct {
GitLab
Output string `` //nolint:lll
/* 300-byte string literal not displayed */
Avatar string `` //nolint:lll
/* 300-byte string literal not displayed */
EncComment string `` //nolint:lll
/* 300-byte string literal not displayed */
EncSuffix string `` //nolint:lll
/* 127-byte string literal not displayed */
}
GetCommand describes parameters for the get command.
type GitLab ¶
type GitLab struct {
Project string `` /* 206-byte string literal not displayed */
BaseURL string `` /* 384-byte string literal not displayed */
Token string `` /* 354-byte string literal not displayed */
DocsRef string `` /* 384-byte string literal not displayed */
}
GitLab describes parameters needed to connect to GitLab API.
type Globals ¶
type Globals struct {
ChangeTo kong.ChangeDirFlag `` /* 188-byte string literal not displayed */
Version kong.VersionFlag `help:"Show program's version and exit." short:"V"`
}
Globals describes top-level (global) flags.
type SetCommand ¶
type SetCommand struct {
GitLab
Input string `` //nolint:lll
/* 208-byte string literal not displayed */
EncSuffix string `help:"Remove the suffix from field names before calling APIs. Disabled by default." short:"S"` //nolint:lll
NoDecrypt bool `help:"Do not attempt to decrypt the configuration."`
}
SetCommand describes parameters for the set command.
type SopsCommand ¶ added in v0.2.0
type SopsCommand struct {
Arg []string `arg:"" help:"Arguments passed on to SOPS." optional:""`
}
SopsCommand describes parameters for the sops command.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
gitlab-config
command
Command gitlab-config enables keeping GitLab project's config in a local file (e.g., in a git repository).
|
Command gitlab-config enables keeping GitLab project's config in a local file (e.g., in a git repository). |