Documentation
¶
Index ¶
- Constants
- Variables
- func ClusterFactory(ui cli.Ui) cli.CommandFactory
- func ClusterListFactory(ui cli.Ui) cli.CommandFactory
- func ClusterUseFactory(ui cli.Ui) cli.CommandFactory
- 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 LoginFactory(ui cli.Ui) cli.CommandFactory
- func ParseInputSpecification(input string) (parts []string, err error)
- func VersionFactory(version, commit string, ui cli.Ui) cli.CommandFactory
- type Cluster
- func (cmd Cluster) AutocompleteArgs() complete.Predictor
- func (cmd Cluster) AutocompleteFlags() (fl complete.Flags)
- func (cmd *Cluster) Description() string
- func (cmd *Cluster) Execute(args []string) (err error)
- func (cmd Cluster) Help() string
- func (cmd Cluster) Logger() *logrus.Logger
- func (cmd Cluster) Options() *flags.Parser
- func (cmd Cluster) Run(args []string) int
- func (cmd *Cluster) Synopsis() string
- func (cmd *Cluster) Usage() string
- type ClusterList
- func (cmd ClusterList) AutocompleteArgs() complete.Predictor
- func (cmd ClusterList) AutocompleteFlags() (fl complete.Flags)
- func (cmd *ClusterList) Description() string
- func (cmd *ClusterList) Execute(args []string) (err error)
- func (cmd ClusterList) Help() string
- func (cmd ClusterList) Logger() *logrus.Logger
- func (cmd ClusterList) Options() *flags.Parser
- func (cmd ClusterList) Run(args []string) int
- func (cmd *ClusterList) Synopsis() string
- func (cmd *ClusterList) Usage() string
- type ClusterUse
- func (cmd ClusterUse) AutocompleteArgs() complete.Predictor
- func (cmd ClusterUse) AutocompleteFlags() (fl complete.Flags)
- func (cmd *ClusterUse) Description() string
- func (cmd *ClusterUse) Execute(args []string) (err error)
- func (cmd ClusterUse) Help() string
- func (cmd ClusterUse) Logger() *logrus.Logger
- func (cmd ClusterUse) Options() *flags.Parser
- func (cmd ClusterUse) Run(args []string) int
- func (cmd *ClusterUse) Synopsis() string
- func (cmd *ClusterUse) Usage() string
- type ConfOpts
- 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 Login
- func (cmd Login) AutocompleteArgs() complete.Predictor
- func (cmd Login) AutocompleteFlags() (fl complete.Flags)
- func (cmd *Login) Description() string
- func (cmd *Login) Execute(args []string) (err error)
- func (cmd Login) Help() string
- func (cmd Login) Logger() *logrus.Logger
- func (cmd Login) Options() *flags.Parser
- func (cmd Login) Run(args []string) int
- func (cmd *Login) Synopsis() string
- func (cmd *Login) Usage() string
- type Output
- type TransferOpts
- type Version
- func (cmd Version) AutocompleteArgs() complete.Predictor
- func (cmd Version) AutocompleteFlags() (fl complete.Flags)
- func (cmd *Version) Description() string
- func (cmd *Version) Execute(args []string) (err error)
- func (cmd Version) Help() string
- func (cmd Version) Logger() *logrus.Logger
- func (cmd Version) Options() *flags.Parser
- func (cmd Version) Run(args []string) int
- func (cmd *Version) Synopsis() string
- func (cmd *Version) Usage() string
Constants ¶
const ( //EnvConfigJSON can be used to pass the config file as a json encoded string EnvConfigJSON = "NERD_CONFIG_JSON" //EnvNerdProject can be used to set the nerd project EnvNerdProject = "NERD_PROJECT" )
const (
//OutputDirPermissions are the output directory's permissions.
OutputDirPermissions = 0755
)
const (
//PublicCluster is a service type we get from authentication
PublicCluster = "public-kubernetes"
)
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." //MessageTooManyArguments is shown when the user provides too many arguments MessageTooManyArguments = "Too may arguments, this command takes at most %d argument%s." //MessageNoArgumentRequired is shown when the user provides too many arguments and the command doesn't take any argument MessageNoArgumentRequired = "Too many arguments, this command takes no argument." //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`") // ErrOverwriteWarning is returned when a user is trying to use the same name for input and output datasets ErrOverwriteWarning = errors.New("it is not possible to use the same name for input and output datasets, as it would overwrite your dataset") )
Functions ¶
func ClusterFactory ¶
func ClusterFactory(ui cli.Ui) cli.CommandFactory
ClusterFactory creates the command
func ClusterListFactory ¶
func ClusterListFactory(ui cli.Ui) cli.CommandFactory
ClusterListFactory creates the command
func ClusterUseFactory ¶
func ClusterUseFactory(ui cli.Ui) cli.CommandFactory
ClusterUseFactory creates the command
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 LoginFactory ¶
func LoginFactory(ui cli.Ui) cli.CommandFactory
LoginFactory returns a factory method for the join command
func ParseInputSpecification ¶
ParseInputSpecification will look at an input string and return its parts if valid
func VersionFactory ¶
func VersionFactory(version, commit string, ui cli.Ui) cli.CommandFactory
VersionFactory returns a factory method for the join command
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster command
func (Cluster) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (Cluster) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*Cluster) Description ¶
Description returns long-form help text
type ClusterList ¶
type ClusterList struct {
// contains filtered or unexported fields
}
ClusterList command
func (ClusterList) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (ClusterList) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*ClusterList) Description ¶
func (cmd *ClusterList) Description() string
Description returns long-form help text
func (*ClusterList) Execute ¶
func (cmd *ClusterList) Execute(args []string) (err error)
Execute runs the command
func (*ClusterList) Synopsis ¶
func (cmd *ClusterList) Synopsis() string
Synopsis returns a one-line
type ClusterUse ¶
type ClusterUse struct { Namespace string `long:"namespace" short:"n" description:"set a specific namespace as the default one"` // contains filtered or unexported fields }
ClusterUse command
func (ClusterUse) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (ClusterUse) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*ClusterUse) Description ¶
func (cmd *ClusterUse) Description() string
Description returns long-form help text
func (*ClusterUse) Execute ¶
func (cmd *ClusterUse) Execute(args []string) (err error)
Execute runs the command
type ConfOpts ¶
type ConfOpts struct { ConfigFile func(string) `long:"config-file" default:"" default-mask:"" env:"NERD_CONFIG_FILE" description:"Location of config file"` SessionFile func(string) `long:"session-file" default:"" default-mask:"" env:"NERD_SESSION_FILE" description:"Location of session file"` }
ConfOpts are the options related to config file and the way output is handled.
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 { All bool `long:"all" short:"a" description:"delete all your datasets in one command"` // 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 { 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 {
// 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 { 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 { All bool `long:"all" short:"a" description:"delete all your jobs in one command"` // 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 {
// 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 { 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 { 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:"1"` VCPU string `long:"vcpu" description:"number of vcpus to use for this job" default:"1"` Inputs []string `` /* 140-byte string literal not displayed */ Outputs []string `` /* 173-byte string literal not displayed */ Private bool `` /* 266-byte string literal not displayed */ CleanCreds bool `` /* 279-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 `` /* 134-byte string literal not displayed */ Timeout time.Duration `` /* 126-byte string literal not displayed */ }
KubeOpts can be used to create a Kubernetes service
type Login ¶
type Login struct { Config string `long:"config-src" default:"oidc" default-mask:"" description:"type of configuration to use (from env, endpoint, or oidc)"` // contains filtered or unexported fields }
Login command
func (Login) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (Login) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*Login) Description ¶
Description returns long-form help text
type Output ¶
Output standardizes the way in which we would like to capture output throughout the program
type TransferOpts ¶
type TransferOpts struct { S3Bucket string `long:"s3-bucket" description:"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"` S3AccessKey string `long:"s3-access-key" description:"access key used for auth with the storage backend"` S3SecretKey string `long:"s3-secret-key" description:"secret key for auth with the storage backend"` S3SessionToken string `long:"s3-session-token" description:"temporary auth token for the storage backend"` S3Prefix string `long:"s3-prefix" description:"store this dataset under a specific prefix"` }
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
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
Version command
func (Version) AutocompleteArgs ¶
AutocompleteArgs returns the argument predictor for this command.
func (Version) AutocompleteFlags ¶
AutocompleteFlags returns a mapping of supported flags
func (*Version) Description ¶
Description returns long-form help text