Documentation
¶
Index ¶
- Constants
- Variables
- func DatasetDeleteFactory(ui cli.Ui) cli.CommandFactory
- func DatasetDownloadFactory(ui cli.Ui) cli.CommandFactory
- func DatasetFactory(ui cli.Ui) cli.CommandFactory
- func DatasetListFactory(ui cli.Ui) cli.CommandFactory
- func DatasetUploadFactory(ui cli.Ui) cli.CommandFactory
- func JobDeleteFactory(ui cli.Ui) cli.CommandFactory
- func JobFactory(ui cli.Ui) cli.CommandFactory
- func JobListFactory(ui cli.Ui) cli.CommandFactory
- func JobLogsFactory(ui cli.Ui) cli.CommandFactory
- func JobRunFactory(ui cli.Ui) cli.CommandFactory
- func ParseInputSpecification(input string) (parts []string, err error)
- type Dataset
- func (cmd Dataset) AutocompleteArgs() complete.Predictor
- func (cmd Dataset) AutocompleteFlags() (fl complete.Flags)
- func (cmd *Dataset) Description() string
- func (cmd *Dataset) Execute(args []string) (err error)
- func (cmd Dataset) Help() string
- func (cmd Dataset) Logger() *logrus.Logger
- func (cmd Dataset) Options() *flags.Parser
- func (cmd Dataset) Run(args []string) int
- func (cmd *Dataset) Synopsis() string
- func (cmd *Dataset) Usage() string
- type DatasetDelete
- func (cmd DatasetDelete) AutocompleteArgs() complete.Predictor
- func (cmd DatasetDelete) AutocompleteFlags() (fl complete.Flags)
- func (cmd *DatasetDelete) Description() string
- func (cmd *DatasetDelete) Execute(args []string) (err error)
- func (cmd DatasetDelete) Help() string
- func (cmd DatasetDelete) Logger() *logrus.Logger
- func (cmd DatasetDelete) Options() *flags.Parser
- func (cmd DatasetDelete) Run(args []string) int
- func (cmd *DatasetDelete) Synopsis() string
- func (cmd *DatasetDelete) Usage() string
- type DatasetDownload
- func (cmd DatasetDownload) AutocompleteArgs() complete.Predictor
- func (cmd DatasetDownload) AutocompleteFlags() (fl complete.Flags)
- func (cmd *DatasetDownload) Description() string
- func (cmd *DatasetDownload) Execute(args []string) (err error)
- func (cmd DatasetDownload) Help() string
- func (cmd DatasetDownload) Logger() *logrus.Logger
- func (cmd DatasetDownload) Options() *flags.Parser
- func (cmd DatasetDownload) Run(args []string) int
- func (cmd *DatasetDownload) Synopsis() string
- func (cmd *DatasetDownload) Usage() string
- type DatasetList
- func (cmd DatasetList) AutocompleteArgs() complete.Predictor
- func (cmd DatasetList) AutocompleteFlags() (fl complete.Flags)
- func (cmd *DatasetList) Description() string
- func (cmd *DatasetList) Execute(args []string) (err error)
- func (cmd DatasetList) Help() string
- func (cmd DatasetList) Logger() *logrus.Logger
- func (cmd DatasetList) Options() *flags.Parser
- func (cmd DatasetList) Run(args []string) int
- func (cmd *DatasetList) Synopsis() string
- func (cmd *DatasetList) Usage() string
- type DatasetUpload
- func (cmd DatasetUpload) AutocompleteArgs() complete.Predictor
- func (cmd DatasetUpload) AutocompleteFlags() (fl complete.Flags)
- func (cmd *DatasetUpload) Description() string
- func (cmd *DatasetUpload) Execute(args []string) (err error)
- func (cmd DatasetUpload) Help() string
- func (cmd DatasetUpload) Logger() *logrus.Logger
- func (cmd DatasetUpload) Options() *flags.Parser
- func (cmd DatasetUpload) Run(args []string) int
- func (cmd *DatasetUpload) Synopsis() string
- func (cmd *DatasetUpload) Usage() string
- type Deps
- type Job
- func (cmd Job) AutocompleteArgs() complete.Predictor
- func (cmd Job) AutocompleteFlags() (fl complete.Flags)
- func (cmd *Job) Description() string
- func (cmd *Job) Execute(args []string) (err error)
- func (cmd Job) Help() string
- func (cmd Job) Logger() *logrus.Logger
- func (cmd Job) Options() *flags.Parser
- func (cmd Job) Run(args []string) int
- func (cmd *Job) Synopsis() string
- func (cmd *Job) Usage() string
- type JobDelete
- func (cmd JobDelete) AutocompleteArgs() complete.Predictor
- func (cmd JobDelete) AutocompleteFlags() (fl complete.Flags)
- func (cmd *JobDelete) Description() string
- func (cmd *JobDelete) Execute(args []string) (err error)
- func (cmd JobDelete) Help() string
- func (cmd JobDelete) Logger() *logrus.Logger
- func (cmd JobDelete) Options() *flags.Parser
- func (cmd JobDelete) Run(args []string) int
- func (cmd *JobDelete) Synopsis() string
- func (cmd *JobDelete) Usage() string
- type JobList
- func (cmd JobList) AutocompleteArgs() complete.Predictor
- func (cmd JobList) AutocompleteFlags() (fl complete.Flags)
- func (cmd *JobList) Description() string
- func (cmd *JobList) Execute(args []string) (err error)
- func (cmd JobList) Help() string
- func (cmd JobList) Logger() *logrus.Logger
- func (cmd JobList) Options() *flags.Parser
- func (cmd JobList) Run(args []string) int
- func (cmd *JobList) Synopsis() string
- func (cmd *JobList) Usage() string
- type JobLogs
- func (cmd JobLogs) AutocompleteArgs() complete.Predictor
- func (cmd JobLogs) AutocompleteFlags() (fl complete.Flags)
- func (cmd *JobLogs) Description() string
- func (cmd *JobLogs) Execute(args []string) (err error)
- func (cmd JobLogs) Help() string
- func (cmd JobLogs) Logger() *logrus.Logger
- func (cmd JobLogs) Options() *flags.Parser
- func (cmd JobLogs) Run(args []string) int
- func (cmd *JobLogs) Synopsis() string
- func (cmd *JobLogs) Usage() string
- type JobRun
- func (cmd JobRun) AutocompleteArgs() complete.Predictor
- func (cmd JobRun) AutocompleteFlags() (fl complete.Flags)
- func (cmd *JobRun) Description() string
- func (cmd *JobRun) Execute(args []string) (err error)
- func (cmd JobRun) Help() string
- func (cmd JobRun) Logger() *logrus.Logger
- func (cmd JobRun) Options() *flags.Parser
- func (cmd JobRun) Run(args []string) int
- func (cmd *JobRun) Synopsis() string
- func (cmd *JobRun) Usage() string
- type KubeOpts
- type Output
- type TransferOpts
Constants ¶
const (
//OutputDirPermissions are the output directory's permissions.
OutputDirPermissions = 0755
)
Variables ¶
var ( //MessageNotEnoughArguments is shown when the user didn't provide enough arguments MessageNotEnoughArguments = "Not enough arguments, this command requires at least %d argument%s." //PlaceholderSynopsis is synopsis text when none is available PlaceholderSynopsis = "<synopsis>" //PlaceholderHelp is help when none is available PlaceholderHelp = "<help>" //PlaceholderUsage is shown when no specific implementation is available PlaceholderUsage = "<usage>" )
var ( // ErrNamespaceNotSet is returned when no namespace config is found in the kube config file. ErrNamespaceNotSet = errors.New("no cluster set, use `nerd login` to update your configuration") // ErrNotLoggedIn is returned when no oauth access token was found in the config file. ErrNotLoggedIn = errors.New("you're not logged in. Please login with `nerd login`") )
Functions ¶
func DatasetDeleteFactory ¶
func DatasetDeleteFactory(ui cli.Ui) cli.CommandFactory
DatasetDeleteFactory creates the command
func DatasetDownloadFactory ¶
func DatasetDownloadFactory(ui cli.Ui) cli.CommandFactory
DatasetDownloadFactory creates the command
func DatasetFactory ¶
func DatasetFactory(ui cli.Ui) cli.CommandFactory
DatasetFactory creates the command
func DatasetListFactory ¶
func DatasetListFactory(ui cli.Ui) cli.CommandFactory
DatasetListFactory creates the command
func DatasetUploadFactory ¶
func DatasetUploadFactory(ui cli.Ui) cli.CommandFactory
DatasetUploadFactory creates the command
func JobDeleteFactory ¶
func JobDeleteFactory(ui cli.Ui) cli.CommandFactory
JobDeleteFactory creates the command
func JobListFactory ¶
func JobListFactory(ui cli.Ui) cli.CommandFactory
JobListFactory creates the command
func JobLogsFactory ¶
func JobLogsFactory(ui cli.Ui) cli.CommandFactory
JobLogsFactory creates the command
func JobRunFactory ¶
func JobRunFactory(ui cli.Ui) cli.CommandFactory
JobRunFactory creates the command
func ParseInputSpecification ¶
ParseInputSpecification will look at an input string and return its parts if valid
Types ¶
type Dataset ¶
type Dataset struct {
// contains filtered or unexported fields
}
Dataset command
func (Dataset) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (Dataset) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*Dataset) Description ¶
Description returns long-form help text
type DatasetDelete ¶
type DatasetDelete struct { KubeOpts // contains filtered or unexported fields }
DatasetDelete command
func (DatasetDelete) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (DatasetDelete) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*DatasetDelete) Description ¶
func (cmd *DatasetDelete) Description() string
Description returns long-form help text
func (*DatasetDelete) Execute ¶
func (cmd *DatasetDelete) Execute(args []string) (err error)
Execute runs the command
func (*DatasetDelete) Synopsis ¶
func (cmd *DatasetDelete) Synopsis() string
Synopsis returns a one-line
type DatasetDownload ¶
type DatasetDownload struct { KubeOpts Input string `` /* 128-byte string literal not displayed */ Output string `` /* 130-byte string literal not displayed */ // contains filtered or unexported fields }
DatasetDownload command
func (DatasetDownload) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (DatasetDownload) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*DatasetDownload) Description ¶
func (cmd *DatasetDownload) Description() string
Description returns long-form help text
func (*DatasetDownload) Execute ¶
func (cmd *DatasetDownload) Execute(args []string) (err error)
Execute runs the command
func (*DatasetDownload) Synopsis ¶
func (cmd *DatasetDownload) Synopsis() string
Synopsis returns a one-line
type DatasetList ¶
type DatasetList struct { KubeOpts // contains filtered or unexported fields }
DatasetList command
func (DatasetList) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (DatasetList) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*DatasetList) Description ¶
func (cmd *DatasetList) Description() string
Description returns long-form help text
func (*DatasetList) Execute ¶
func (cmd *DatasetList) Execute(args []string) (err error)
Execute runs the command
func (*DatasetList) Synopsis ¶
func (cmd *DatasetList) Synopsis() string
Synopsis returns a one-line
type DatasetUpload ¶
type DatasetUpload struct { KubeOpts TransferOpts Name string `long:"name" short:"n" description:"assign a name to the dataset"` // contains filtered or unexported fields }
DatasetUpload command
func (DatasetUpload) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (DatasetUpload) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*DatasetUpload) Description ¶
func (cmd *DatasetUpload) Description() string
Description returns long-form help text
func (*DatasetUpload) Execute ¶
func (cmd *DatasetUpload) Execute(args []string) (err error)
Execute runs the command
func (*DatasetUpload) Synopsis ¶
func (cmd *DatasetUpload) Synopsis() string
Synopsis returns a one-line
type Deps ¶
type Deps struct {
// contains filtered or unexported fields
}
Deps exposes dependencies
func (*Deps) Kube ¶
func (deps *Deps) Kube() kubernetes.Interface
Kube provides the kubernetes dependency
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
Job command
func (Job) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (Job) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*Job) Description ¶
Description returns long-form help text
type JobDelete ¶
type JobDelete struct { KubeOpts // contains filtered or unexported fields }
JobDelete command
func (JobDelete) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (JobDelete) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*JobDelete) Description ¶
Description returns long-form help text
type JobList ¶
type JobList struct { KubeOpts // contains filtered or unexported fields }
JobList command
func (JobList) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (JobList) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*JobList) Description ¶
Description returns long-form help text
type JobLogs ¶
type JobLogs struct { KubeOpts Tail int64 `long:"tail" short:"t" description:"only return the oldest N lines of the process logs"` // contains filtered or unexported fields }
JobLogs command
func (JobLogs) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (JobLogs) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*JobLogs) Description ¶
Description returns long-form help text
type JobRun ¶
type JobRun struct { KubeOpts TransferOpts Name string `long:"name" short:"n" description:"assign a name to the job"` Env []string `long:"env" short:"e" description:"environment variables to use"` Memory string `long:"memory" short:"m" description:"memory to use for this job, expressed in gigabytes" default:"3"` VCPU string `long:"vcpu" description:"number of vcpus to use for this job" default:"2"` Inputs []string `` /* 140-byte string literal not displayed */ Outputs []string `` /* 164-byte string literal not displayed */ // contains filtered or unexported fields }
JobRun command
func (JobRun) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (JobRun) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*JobRun) Description ¶
Description returns long-form help text
type KubeOpts ¶
type KubeOpts struct { KubeConfig string `` /* 133-byte string literal not displayed */ Timeout time.Duration `` /* 126-byte string literal not displayed */ }
KubeOpts can be used to create a Kubernetes service
type Output ¶
Output standardizes the way in which we would like to capture output throughout the program
type TransferOpts ¶
type TransferOpts struct { AWSS3Bucket string `long:"aws-s3-bucket" description:"AWS S3 Bucket name that will be used for dataset storage" default:"nlz-datasets-dev"` AWSRegion string `long:"aws-region" description:"AWS region used for dataset storage"` AWSAccessKeyID string `long:"aws-access-key-id" description:"AWS access key used for auth with the storage backend"` AWSSecretAccessKey string `long:"aws-secret-access-key" description:"AWS secret key for auth with the storage backend"` AWSSessionToken string `long:"aws-session-token" description:"AWS temporary auth token for the storage backend"` }
TransferOpts hold CLI options for configuring data transfer
func (TransferOpts) TransferManager ¶
func (opts TransferOpts) TransferManager(kube *svc.Kube) (mgr transfer.Manager, sto *transferstore.StoreOptions, sta *transferarchiver.ArchiverOptions, err error)
TransferManager creates a transfermanager using the command line options