Documentation
¶
Index ¶
- type APIClient
- func (ac *APIClient) CancelPatch(patchId string) error
- func (ac *APIClient) CheckUpdates() (*evergreen.ClientConfig, error)
- func (ac *APIClient) DeletePatchModule(patchId, module string) error
- func (ac *APIClient) FinalizePatch(patchId string) error
- func (ac *APIClient) GetPatches() ([]patch.Patch, error)
- func (ac *APIClient) GetProjectRef(projectId string) (*model.ProjectRef, error)
- func (ac *APIClient) ListProjects() ([]model.ProjectRef, error)
- func (ac *APIClient) PutPatch(incomingPatch patchSubmission) (*patch.Patch, error)
- func (ac *APIClient) UpdatePatchModule(patchId, module, patch, base string) error
- func (ac *APIClient) ValidateLocalConfig(data []byte) ([]validator.ValidationError, error)
- type APIError
- type CancelPatchCommand
- type FinalizePatchCommand
- type GetUpdateCommand
- type ListPatchesCommand
- type ListProjectsCommand
- type Options
- type PatchCommand
- type ProjectConf
- type RemoveModuleCommand
- type SetModuleCommand
- type Settings
- type ValidateCommand
- type VersionCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct { APIRoot string User string APIKey string // contains filtered or unexported fields }
APIClient manages requests to the API server endpoints, and unmarshaling the results into usable structures.
func (*APIClient) CancelPatch ¶
func (*APIClient) CheckUpdates ¶
func (ac *APIClient) CheckUpdates() (*evergreen.ClientConfig, error)
CheckUpdates fetches information about available updates to client binaries from the server.
func (*APIClient) DeletePatchModule ¶
DeletePatchModule makes a request to the API server to delete the given module from a patch
func (*APIClient) FinalizePatch ¶
func (*APIClient) GetPatches ¶
GetPatches requests a list of the user's patches from the API and returns them as a list
func (*APIClient) GetProjectRef ¶
func (ac *APIClient) GetProjectRef(projectId string) (*model.ProjectRef, error)
GetProjectRef requests project details from the API server for a given project ID.
func (*APIClient) ListProjects ¶
func (ac *APIClient) ListProjects() ([]model.ProjectRef, error)
func (*APIClient) PutPatch ¶
PutPatch submits a new patch for the given project to the API server. If successful, returns the patch object itself.
func (*APIClient) UpdatePatchModule ¶
UpdatePatchModule makes a request to the API server to set a module patch on the given patch ID.
func (*APIClient) ValidateLocalConfig ¶
func (ac *APIClient) ValidateLocalConfig(data []byte) ([]validator.ValidationError, error)
ValidateLocalConfig validates the local project config with the server
type APIError ¶
type APIError struct {
// contains filtered or unexported fields
}
APIError is an implementation of error for reporting unexpected results from API calls.
func NewAPIError ¶
NewAPIError creates an APIError by reading the body of the response and its status code.
type CancelPatchCommand ¶
type CancelPatchCommand struct { GlobalOpts Options `no-flag:"true"` PatchId string `short:"i" description:"id of the patch to modify" required:"true"` }
CancelPatchCommand is used to cancel a patch.
func (*CancelPatchCommand) Execute ¶
func (cpc *CancelPatchCommand) Execute(args []string) error
type FinalizePatchCommand ¶
type FinalizePatchCommand struct { GlobalOpts Options `no-flag:"true"` PatchId string `short:"i" description:"id of the patch to modify" required:"true"` }
FinalizePatchCommand is used to finalize a patch, allowing it to be scheduled.
func (*FinalizePatchCommand) Execute ¶
func (fpc *FinalizePatchCommand) Execute(args []string) error
type GetUpdateCommand ¶
type GetUpdateCommand struct { GlobalOpts Options `no-flag:"true"` Install bool `long:"install" description:"after downloading update, overwrite old binary with new one"` }
GetUpdateCommand attempts to fetch the latest version of the client binary and install it over the current one.
func (*GetUpdateCommand) Execute ¶
func (uc *GetUpdateCommand) Execute(args []string) error
type ListPatchesCommand ¶
type ListPatchesCommand struct { GlobalOpts Options `no-flag:"true"` Variants []string `short:"v" long:"variants" description:"variants to run the patch on. may be specified multiple times, or use the value 'all'"` PatchId string `short:"i" description:"show details for only the patch with this ID"` ShowSummary bool `short:"s" long:"show-summary" description:"show a summary of the diff for each patch"` }
ListPatchesCommand is used to list a user's existing patches.
func (*ListPatchesCommand) Execute ¶
func (lpc *ListPatchesCommand) Execute(args []string) error
type ListProjectsCommand ¶
type ListProjectsCommand struct {
GlobalOpts Options `no-flag:"true"`
}
func (*ListProjectsCommand) Execute ¶
func (lp *ListProjectsCommand) Execute(args []string) error
type Options ¶
type Options struct {
ConfFile string `short:"c" long:"config" description:"path to config file (defaults to ~/.evergreen.yml)"`
}
type PatchCommand ¶
type PatchCommand struct { GlobalOpts Options `no-flag:"true"` Project string `short:"p" long:"project" description:"project to submit patch for"` Variants []string `short:"v" long:"variants"` SkipConfirm bool `short:"y" long:"yes" description:"skip confirmation text"` Description string `short:"d" long:"description" description:"description of patch (optional)"` Finalize bool `short:"f" long:"finalize" description:"schedule tasks immediately"` }
PatchCommand is used to submit a new patch to the API server.
func (*PatchCommand) Execute ¶
func (pc *PatchCommand) Execute(args []string) error
type ProjectConf ¶
type RemoveModuleCommand ¶
type RemoveModuleCommand struct { GlobalOpts Options `no-flag:"true"` Module string `short:"m" long:"module" description:"name of the module to remove from patch" required:"true" ` PatchId string `short:"i" description:"name of the module to remove from patch" required:"true" ` }
RemoveModuleCommand removes module information from an existing patch.
func (*RemoveModuleCommand) Execute ¶
func (rmc *RemoveModuleCommand) Execute(args []string) error
type SetModuleCommand ¶
type SetModuleCommand struct { GlobalOpts Options `no-flag:"true"` Module string `short:"m" long:"module" description:"name of the module to set patch for"` PatchId string `short:"i" description:"id of the patch to modify" required:"true" ` SkipConfirm bool `short:"y" long:"yes" description:"skip confirmation text"` }
SetModuleCommand adds or updates a module in an existing patch.
func (*SetModuleCommand) Execute ¶
func (smc *SetModuleCommand) Execute(args []string) error
type Settings ¶
type Settings struct { APIServerHost string `yaml:"api_server_host,omitempty"` UIServerHost string `yaml:"ui_server_host,omitempty"` APIKey string `yaml:"api_key,omitempty"` User string `yaml:"user,omitempty"` Projects []ProjectConf `yaml:"projects,omitempty"` }
Settings represents the data stored in the user's config file, by default located at ~/.evergreen.yml
func (*Settings) FindDefaultProject ¶
func (*Settings) FindDefaultVariants ¶
func (*Settings) SetDefaultProject ¶
func (*Settings) SetDefaultVariants ¶
type ValidateCommand ¶
type ValidateCommand struct {
GlobalOpts Options `no-flag:"true"`
}
ValidateCommand is used to verify that a config file is valid.
func (*ValidateCommand) Execute ¶
func (vc *ValidateCommand) Execute(args []string) error
type VersionCommand ¶
type VersionCommand struct{}
VersionCommand prints the revision that the CLI binary was built with. Is used by auto-update to verify the new version.
func (*VersionCommand) Execute ¶
func (vc *VersionCommand) Execute(args []string) error