qri: github.com/qri-io/qri/cmd Index | Files | Directories

package cmd

import "github.com/qri-io/qri/cmd"

Package cmd defines the CLI interface. It relies heavily on the spf13/cobra package. Much of its structure is adapted from kubernetes/kubernetes/tree/master/cmd The `help` message for each command uses backticks rather than quotes when refering to commands by name, even though it is cumbersome to maintain. Using backticks means we can get better formatting when auto generating markdown documentation from the command help messages.

Index

Package Files

add.go cmd.go config.go connect.go dag.go diff.go export.go factory.go get.go init.go list.go log.go peers.go print.go publish.go qri.go ref_select.go registry.go remove.go rename.go render.go save.go search.go setup.go status.go stringers.go system.go templates.go update.go use.go validate.go version.go

Constants

const FileSelectedRefs = "/selected_refs.json"

FileSelectedRefs stores selection, is copied from github.com/qri-io/qri/repo/fs/files.go

func DefaultSelectedRefList Uses

func DefaultSelectedRefList(f Factory) ([]string, error)

DefaultSelectedRefList returns the list of currently `use`ing dataset references

func EnvPathFactory Uses

func EnvPathFactory() (string, string)

EnvPathFactory returns qri & IPFS paths based on enviornment variables falling back to $HOME/.qri && $HOME/.ipfs

func ErrExit Uses

func ErrExit(w io.Writer, err error)

ErrExit writes an error to the given io.Writer & exits

func Execute Uses

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ExitIfErr Uses

func ExitIfErr(w io.Writer, err error)

ExitIfErr only calls ErrExit if there is an error present

func GetWd Uses

func GetWd() string

GetWd is a convenience method to get the working directory or bail.

func NewAddCommand Uses

func NewAddCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewAddCommand creates an add command

func NewConfigCommand Uses

func NewConfigCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewConfigCommand creates a new `qri config` cobra command config represents commands that read & modify configuration settings

func NewConnectCommand Uses

func NewConnectCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewConnectCommand creates a new `qri connect` cobra command for connecting to the d.web, local api, rpc server, and webapp

func NewDAGCommand Uses

func NewDAGCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewDAGCommand creates a new `qri dag` command that generates a manifest for a given dataset reference. Referenced dataset must be stored in local CAFS

func NewDiffCommand Uses

func NewDiffCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewDiffCommand creates a new `qri diff` cobra command for comparing changes between datasets

func NewExportCommand Uses

func NewExportCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewExportCommand creates a new export cobra command exportCmd represents the export command

func NewGetCommand Uses

func NewGetCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewGetCommand creates a new `qri search` command that searches for datasets

func NewInitCommand Uses

func NewInitCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewInitCommand creates new `qri init` command that connects a working directory in the local filesystem to a dataset your repo.

func NewListCommand Uses

func NewListCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewListCommand creates new `qri list` command that lists datasets for the local peer & others

func NewLogCommand Uses

func NewLogCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewLogCommand creates a new `qri log` cobra command

func NewPeersCommand Uses

func NewPeersCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewPeersCommand cerates a new `qri peers` cobra command

func NewPublishCommand Uses

func NewPublishCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewPublishCommand creates a `qri publish` subcommand for working with configured registries

func NewQriCommand Uses

func NewQriCommand(ctx context.Context, pf PathFactory, generator gen.CryptoGenerator, ioStreams ioes.IOStreams) *cobra.Command

NewQriCommand represents the base command when called without any subcommands

func NewRegistryCommand Uses

func NewRegistryCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewRegistryCommand creates a `qri registry` subcommand for working with configured registries TODO - registry command is currently removed in favor of the newer "qri publish" command we should consider refactoring this code (espcially it's documentation) & use it for registry-specific publication & search interaction

func NewRemoveCommand Uses

func NewRemoveCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewRemoveCommand creates a new `qri remove` cobra command for removing datasets from a local repository

func NewRenameCommand Uses

func NewRenameCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewRenameCommand creates a new `qri rename` cobra command for renaming datasets

func NewRenderCommand Uses

func NewRenderCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewRenderCommand creates a new `qri render` command for executing templates against datasets

func NewSaveCommand Uses

func NewSaveCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewSaveCommand creates a `qri save` cobra command used for saving changes to datasets

func NewSearchCommand Uses

func NewSearchCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewSearchCommand creates a new `qri search` command that searches for datasets

func NewSetupCommand Uses

func NewSetupCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewSetupCommand creates a setup command

func NewStatusCommand Uses

func NewStatusCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewStatusCommand creates a `qri status` command that compares working directory to prev version

func NewUpdateCommand Uses

func NewUpdateCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewUpdateCommand creates a new `qri update` cobra command for updating datasets

func NewUseCommand Uses

func NewUseCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewUseCommand creates a new `qri search` command that searches for datasets

func NewValidateCommand Uses

func NewValidateCommand(f Factory, ioStreams ioes.IOStreams) *cobra.Command

NewValidateCommand creates a new `qri validate` cobra command for showing schema errors in a dataset body

func NewVersionCommand Uses

func NewVersionCommand(_ Factory, ioStreams ioes.IOStreams) *cobra.Command

NewVersionCommand creates a new `qri version` cobra command that prints the current qri version

func QRIRepoInitialized Uses

func QRIRepoInitialized(path string) bool

QRIRepoInitialized checks to see if a repository has been initialized at $QRI_PATH

type AddOptions Uses

type AddOptions struct {
    ioes.IOStreams
    DatasetRequests *lib.DatasetRequests
}

AddOptions encapsulates state for the add command

func (*AddOptions) Complete Uses

func (o *AddOptions) Complete(f Factory) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*AddOptions) Run Uses

func (o *AddOptions) Run(args []string) error

Run adds another peer's dataset to this user's repo

type ConfigOptions Uses

type ConfigOptions struct {
    ioes.IOStreams

    Format          string
    WithPrivateKeys bool
    Concise         bool
    Output          string

    ConfigMethods  *lib.ConfigMethods
    ProfileMethods *lib.ProfileMethods
    // contains filtered or unexported fields
}

ConfigOptions encapsulates state for the config command

func (*ConfigOptions) Complete Uses

func (o *ConfigOptions) Complete(f Factory) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*ConfigOptions) Get Uses

func (o *ConfigOptions) Get(args []string) (err error)

Get a configuration option

func (*ConfigOptions) Set Uses

func (o *ConfigOptions) Set(args []string) (err error)

Set a configuration option

type ConnectOptions Uses

type ConnectOptions struct {
    ioes.IOStreams

    Registry string
    Setup    bool
    // contains filtered or unexported fields
}

ConnectOptions encapsulates state for the connect command

func (*ConnectOptions) Complete Uses

func (o *ConnectOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*ConnectOptions) Run Uses

func (o *ConnectOptions) Run() (err error)

Run executes the connect command with currently configured state

type DAGOptions Uses

type DAGOptions struct {
    ioes.IOStreams

    Refs       []string
    Format     string
    InfoFormat string
    Pretty     bool
    Hex        bool
    File       string
    Label      string

    DatasetRequests *lib.DatasetRequests
}

DAGOptions encapsulates state for the dag command

func (*DAGOptions) Complete Uses

func (o *DAGOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*DAGOptions) Get Uses

func (o *DAGOptions) Get() (err error)

Get executes the manigest get command

func (*DAGOptions) Info Uses

func (o *DAGOptions) Info() (err error)

Info executes the dag info command

func (*DAGOptions) Missing Uses

func (o *DAGOptions) Missing() error

Missing executes the manifest missing command

type DiffOptions Uses

type DiffOptions struct {
    ioes.IOStreams

    Left     string
    Right    string
    Selector string
    Format   string
    Summary  bool

    DatasetRequests *lib.DatasetRequests
}

DiffOptions encapsulates options for the diff command

func (*DiffOptions) Complete Uses

func (o *DiffOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*DiffOptions) Run Uses

func (o *DiffOptions) Run() (err error)

Run executes the diff command

type ExportOptions Uses

type ExportOptions struct {
    ioes.IOStreams

    Refs   *RefSelect
    Blank  bool
    Output string
    Format string
    Zipped bool

    UsingRPC       bool
    ExportRequests *lib.ExportRequests
}

ExportOptions encapsulates state for the export command

func (*ExportOptions) Complete Uses

func (o *ExportOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*ExportOptions) Run Uses

func (o *ExportOptions) Run() error

Run executes the Export command

type Factory Uses

type Factory interface {
    Instance() *lib.Instance
    Config() (*config.Config, error)

    IpfsFsPath() string
    QriRepoPath() string
    CryptoGenerator() gen.CryptoGenerator

    Init() error
    RPC() *rpc.Client
    ConnectionNode() (*p2p.QriNode, error)

    ConfigMethods() (*lib.ConfigMethods, error)
    DatasetRequests() (*lib.DatasetRequests, error)
    RemoteRequests() (*lib.RemoteRequests, error)
    RegistryRequests() (*lib.RegistryRequests, error)
    LogRequests() (*lib.LogRequests, error)
    ExportRequests() (*lib.ExportRequests, error)
    PeerRequests() (*lib.PeerRequests, error)
    ProfileMethods() (*lib.ProfileMethods, error)
    SearchRequests() (*lib.SearchRequests, error)
    RenderRequests() (*lib.RenderRequests, error)
    FSIMethods() (*lib.FSIMethods, error)
}

Factory is an interface for providing required structures to cobra commands It's main implementation is QriOptions

type GetOptions Uses

type GetOptions struct {
    ioes.IOStreams

    Refs     *RefSelect
    Selector string
    Format   string

    Page     int
    PageSize int
    All      bool

    Pretty    bool
    HasPretty bool

    DatasetRequests *lib.DatasetRequests
}

GetOptions encapsulates state for the get command

func (*GetOptions) Complete Uses

func (o *GetOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*GetOptions) Run Uses

func (o *GetOptions) Run() (err error)

Run executes the get command

type InitOptions Uses

type InitOptions struct {
    ioes.IOStreams

    Name   string
    Format string
    Link   string

    DatasetRequests *lib.DatasetRequests
    FSIMethods      *lib.FSIMethods
}

InitOptions encapsulates state for the `init` command

func (*InitOptions) Complete Uses

func (o *InitOptions) Complete(f Factory) (err error)

Complete completes a dataset reference

func (*InitOptions) Run Uses

func (o *InitOptions) Run() (err error)

Run executes the `init` command

type ListOptions Uses

type ListOptions struct {
    ioes.IOStreams

    Format          string
    PageSize        int
    Page            int
    Term            string
    Peername        string
    Published       bool
    ShowNumVersions bool

    DatasetRequests *lib.DatasetRequests
}

ListOptions encapsulates state for the List command

func (*ListOptions) Complete Uses

func (o *ListOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*ListOptions) Run Uses

func (o *ListOptions) Run() (err error)

Run executes the list command

type LogOptions Uses

type LogOptions struct {
    ioes.IOStreams

    PageSize int
    Page     int
    Refs     *RefSelect

    LogRequests *lib.LogRequests
}

LogOptions encapsulates state for the log command

func (*LogOptions) Complete Uses

func (o *LogOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*LogOptions) Run Uses

func (o *LogOptions) Run() error

Run executes the log command

type PathFactory Uses

type PathFactory func() (string, string)

PathFactory is a function that returns paths to qri & ipfs repos

func NewDirPathFactory Uses

func NewDirPathFactory(dir string) PathFactory

NewDirPathFactory creates a path factory that sets qri & ipfs paths to dir/qri & qri/ipfs

type PeersOptions Uses

type PeersOptions struct {
    ioes.IOStreams

    Peername string
    Verbose  bool
    Format   string
    Cached   bool
    Network  string
    PageSize int
    Page     int

    UsingRPC     bool
    PeerRequests *lib.PeerRequests
}

PeersOptions encapsulates state for the peers command

func (*PeersOptions) Complete Uses

func (o *PeersOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*PeersOptions) Connect Uses

func (o *PeersOptions) Connect() (err error)

Connect attempts to connect to a peer

func (*PeersOptions) Disconnect Uses

func (o *PeersOptions) Disconnect() (err error)

Disconnect attempts to disconnect from a peer

func (*PeersOptions) Info Uses

func (o *PeersOptions) Info() (err error)

Info gets peer info

func (*PeersOptions) List Uses

func (o *PeersOptions) List() (err error)

List shows a list of peers

type PublishOptions Uses

type PublishOptions struct {
    ioes.IOStreams

    Refs       []string
    Unpublish  bool
    NoRegistry bool
    NoPin      bool
    RemoteName string

    DatasetRequests *lib.DatasetRequests
    RemoteRequests  *lib.RemoteRequests
}

PublishOptions encapsulates state for the publish command

func (*PublishOptions) Complete Uses

func (o *PublishOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*PublishOptions) Run Uses

func (o *PublishOptions) Run() error

Run executes the publish command

type QriOptions Uses

type QriOptions struct {
    ioes.IOStreams

    // path to the QRI repository directory
    RepoPath string
    // custom path to IPFS repo
    IpfsPath string

    // NoPrompt Disables all promt messages
    NoPrompt bool
    // NoColor disables colorized output
    NoColor bool
    // path to configuration object
    ConfigPath string
    // contains filtered or unexported fields
}

QriOptions holds the Root Command State

func NewQriOptions Uses

func NewQriOptions(ctx context.Context, qriPath, ipfsPath string, generator gen.CryptoGenerator, ioStreams ioes.IOStreams) *QriOptions

NewQriOptions creates an options object

func (*QriOptions) Config Uses

func (o *QriOptions) Config() (*config.Config, error)

Config returns from internal state

func (*QriOptions) ConfigMethods Uses

func (o *QriOptions) ConfigMethods() (m *lib.ConfigMethods, err error)

ConfigMethods generates a lib.ConfigMethods from internal state

func (*QriOptions) ConnectionNode Uses

func (o *QriOptions) ConnectionNode() (*p2p.QriNode, error)

ConnectionNode returns the internal QriNode, if it is available

func (*QriOptions) CryptoGenerator Uses

func (o *QriOptions) CryptoGenerator() gen.CryptoGenerator

CryptoGenerator returns a resource for generating cryptographic info

func (*QriOptions) DatasetRequests Uses

func (o *QriOptions) DatasetRequests() (*lib.DatasetRequests, error)

DatasetRequests generates a lib.DatasetRequests from internal state

func (*QriOptions) ExportRequests Uses

func (o *QriOptions) ExportRequests() (*lib.ExportRequests, error)

ExportRequests generates a lib.ExportRequests from internal state

func (*QriOptions) FSIMethods Uses

func (o *QriOptions) FSIMethods() (m *lib.FSIMethods, err error)

FSIMethods generates a lib.FSIMethods from internal state

func (*QriOptions) Init Uses

func (o *QriOptions) Init() (err error)

Init will initialize the internal state

func (*QriOptions) Instance Uses

func (o *QriOptions) Instance() *lib.Instance

Instance returns the instance this options is using

func (*QriOptions) IpfsFsPath Uses

func (o *QriOptions) IpfsFsPath() string

IpfsFsPath returns from internal state

func (*QriOptions) LogRequests Uses

func (o *QriOptions) LogRequests() (*lib.LogRequests, error)

LogRequests generates a lib.LogRequests from internal state

func (*QriOptions) PeerRequests Uses

func (o *QriOptions) PeerRequests() (*lib.PeerRequests, error)

PeerRequests generates a lib.PeerRequests from internal state

func (*QriOptions) ProfileMethods Uses

func (o *QriOptions) ProfileMethods() (m *lib.ProfileMethods, err error)

ProfileMethods generates a lib.ProfileMethods from internal state

func (*QriOptions) QriRepoPath Uses

func (o *QriOptions) QriRepoPath() string

QriRepoPath returns from internal state

func (*QriOptions) RPC Uses

func (o *QriOptions) RPC() *rpc.Client

RPC returns from internal state

func (*QriOptions) RegistryRequests Uses

func (o *QriOptions) RegistryRequests() (*lib.RegistryRequests, error)

RegistryRequests generates a lib.RegistryRequests from internal state

func (*QriOptions) RemoteRequests Uses

func (o *QriOptions) RemoteRequests() (*lib.RemoteRequests, error)

RemoteRequests generates a lib.RemoteRequests from internal state

func (*QriOptions) RenderRequests Uses

func (o *QriOptions) RenderRequests() (*lib.RenderRequests, error)

RenderRequests generates a lib.RenderRequests from internal state

func (*QriOptions) SearchRequests Uses

func (o *QriOptions) SearchRequests() (*lib.SearchRequests, error)

SearchRequests generates a lib.SearchRequests from internal state

type RefSelect Uses

type RefSelect struct {
    // contains filtered or unexported fields
}

RefSelect represents zero or more references, either explicitly provided or implied

func GetCurrentRefSelect Uses

func GetCurrentRefSelect(f Factory, args []string, allowed int) (*RefSelect, error)

GetCurrentRefSelect returns the current reference selection. This could be explicitly provided as command-line arguments, or could be determined by being in a linked directory, or could be selected by the `use` command. This order is also the precendence, from most important to least. This is the recommended method for command-line commands to get references, unless they have a special way of interacting with datasets (for example, `qri status`).

func GetLinkedRefSelect Uses

func GetLinkedRefSelect() (*RefSelect, error)

GetLinkedRefSelect returns the current reference selection only if it is a linked directory

func NewExplicitRefSelect Uses

func NewExplicitRefSelect(ref string) *RefSelect

NewExplicitRefSelect returns a single explicitly provided reference

func NewLinkedDirectoryRefSelect Uses

func NewLinkedDirectoryRefSelect(ref, dir string) *RefSelect

NewLinkedDirectoryRefSelect returns a single reference implied by a linked directory

func NewUsingRefSelect Uses

func NewUsingRefSelect(ref string) *RefSelect

NewUsingRefSelect returns a single reference implied by the use command

func (*RefSelect) Dir Uses

func (r *RefSelect) Dir() string

Dir returns the directory of a linked directory reference

func (*RefSelect) IsExplicit Uses

func (r *RefSelect) IsExplicit() bool

IsExplicit returns whether the reference is explicit

func (*RefSelect) IsLinked Uses

func (r *RefSelect) IsLinked() bool

IsLinked returns whether the reference is implied by a linked directory

func (*RefSelect) Ref Uses

func (r *RefSelect) Ref() string

Ref returns the reference as a string

func (*RefSelect) RefList Uses

func (r *RefSelect) RefList() []string

RefList returns a list of all references

func (*RefSelect) String Uses

func (r *RefSelect) String() string

String returns a stringified version of the ref selection

type RegistryOptions Uses

type RegistryOptions struct {
    ioes.IOStreams

    Refs []string

    RegistryRequests *lib.RegistryRequests
}

RegistryOptions encapsulates state for the registry command & subcommands

func (*RegistryOptions) Complete Uses

func (o *RegistryOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*RegistryOptions) Pin Uses

func (o *RegistryOptions) Pin() error

Pin executes the pin command

func (*RegistryOptions) Publish Uses

func (o *RegistryOptions) Publish() error

Publish executes the publish command

func (*RegistryOptions) Status Uses

func (o *RegistryOptions) Status() error

Status gets the status of a dataset reference on the registry

func (*RegistryOptions) Unpin Uses

func (o *RegistryOptions) Unpin() error

Unpin executes the unpin command

func (*RegistryOptions) Unpublish Uses

func (o *RegistryOptions) Unpublish() error

Unpublish executes the unpublish command

type RemoveOptions Uses

type RemoveOptions struct {
    ioes.IOStreams

    Args []string

    RevisionsText string
    All           bool
    Revision      rev.Rev

    DatasetRequests *lib.DatasetRequests
}

RemoveOptions encapsulates state for the remove command

func (*RemoveOptions) Complete Uses

func (o *RemoveOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*RemoveOptions) Run Uses

func (o *RemoveOptions) Run() (err error)

Run executes the remove command

func (*RemoveOptions) Validate Uses

func (o *RemoveOptions) Validate() error

Validate checks that all user input is valid

type RenameOptions Uses

type RenameOptions struct {
    ioes.IOStreams

    From string
    To   string

    DatasetRequests *lib.DatasetRequests
}

RenameOptions encapsulates state for the rename command

func (*RenameOptions) Complete Uses

func (o *RenameOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*RenameOptions) Run Uses

func (o *RenameOptions) Run() error

Run executes the rename command

func (*RenameOptions) Validate Uses

func (o *RenameOptions) Validate() error

Validate checks that all user input is valid

type RenderOptions Uses

type RenderOptions struct {
    ioes.IOStreams

    Refs     *RefSelect
    Template string
    Output   string

    RenderRequests *lib.RenderRequests
}

RenderOptions encapsulates state for the render command

func (*RenderOptions) Complete Uses

func (o *RenderOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*RenderOptions) Run Uses

func (o *RenderOptions) Run() (err error)

Run executes the render command

type SaveOptions Uses

type SaveOptions struct {
    ioes.IOStreams

    Refs      *RefSelect
    FilePaths []string
    BodyPath  string
    Recall    string

    Title   string
    Message string

    Replace        bool
    ShowValidation bool
    Publish        bool
    DryRun         bool
    KeepFormat     bool
    Force          bool
    NoRender       bool
    Secrets        []string

    DatasetRequests *lib.DatasetRequests
    FSIMethods      *lib.FSIMethods
    // contains filtered or unexported fields
}

SaveOptions encapsulates state for the save command

func (*SaveOptions) Complete Uses

func (o *SaveOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*SaveOptions) Run Uses

func (o *SaveOptions) Run() (err error)

Run executes the save command

func (*SaveOptions) Validate Uses

func (o *SaveOptions) Validate() error

Validate checks that all user input is valid

type SearchOptions Uses

type SearchOptions struct {
    ioes.IOStreams

    Query          string
    SearchRequests *lib.SearchRequests
    Format         string
    PageSize       int
    Page           int
}

SearchOptions encapsulates state for the search command

func (*SearchOptions) Complete Uses

func (o *SearchOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*SearchOptions) Run Uses

func (o *SearchOptions) Run() (err error)

Run executes the search command

func (*SearchOptions) Validate Uses

func (o *SearchOptions) Validate() error

Validate checks that any user inputs are valid

type SetupOptions Uses

type SetupOptions struct {
    ioes.IOStreams

    Anonymous      bool
    Overwrite      bool
    IPFS           bool
    Remove         bool
    Peername       string
    Registry       string
    IPFSConfigData string
    ConfigData     string

    QriRepoPath string
    IpfsFsPath  string
    Generator   gen.CryptoGenerator
}

SetupOptions encapsulates state for the setup command

func (*SetupOptions) Complete Uses

func (o *SetupOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*SetupOptions) DoSetup Uses

func (o *SetupOptions) DoSetup(f Factory) (err error)

DoSetup executes the setup-ie bit from the setup command

func (*SetupOptions) Run Uses

func (o *SetupOptions) Run(f Factory) error

Run executes the setup command

type StatusOptions Uses

type StatusOptions struct {
    ioes.IOStreams

    Refs *RefSelect
    Dir  string

    FSIMethods *lib.FSIMethods
}

StatusOptions encapsulates state for the Status command

func (*StatusOptions) Complete Uses

func (o *StatusOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*StatusOptions) Run Uses

func (o *StatusOptions) Run() (err error)

Run executes the status command

type UpdateOptions Uses

type UpdateOptions struct {
    ioes.IOStreams

    Ref     string
    Title   string
    Message string

    BodyPath  string
    FilePaths []string
    Recall    string

    Publish    bool
    DryRun     bool
    NoRender   bool
    Force      bool
    KeepFormat bool
    Secrets    []string

    Daemonize bool
    Page      int
    PageSize  int

    // specifies custom repo location when scheduling a job,
    // should only be set if --repo persistent flag is set
    RepoPath string
    // contains filtered or unexported fields
}

UpdateOptions encapsulates state for the update command

func (*UpdateOptions) Complete Uses

func (o *UpdateOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*UpdateOptions) List Uses

func (o *UpdateOptions) List() (err error)

List shows scheduled update jobs

func (*UpdateOptions) LogFile Uses

func (o *UpdateOptions) LogFile(logName string) error

LogFile prints a log output file

func (*UpdateOptions) Logs Uses

func (o *UpdateOptions) Logs(args []string) (err error)

Logs shows a history of job events

func (*UpdateOptions) RunUpdate Uses

func (o *UpdateOptions) RunUpdate(args []string) (err error)

RunUpdate executes an update immediately

func (*UpdateOptions) Schedule Uses

func (o *UpdateOptions) Schedule(args []string) (err error)

Schedule adds a job to the update scheduler

func (*UpdateOptions) ServiceStart Uses

func (o *UpdateOptions) ServiceStart(ioStreams ioes.IOStreams, repoPath string) (err error)

ServiceStart ensures the update service is running

func (*UpdateOptions) ServiceStatus Uses

func (o *UpdateOptions) ServiceStatus() error

ServiceStatus gets the current status of the update daemon

func (*UpdateOptions) ServiceStop Uses

func (o *UpdateOptions) ServiceStop() (err error)

ServiceStop halts the update scheduler service

func (*UpdateOptions) Unschedule Uses

func (o *UpdateOptions) Unschedule(args []string) (err error)

Unschedule removes a job from the scheduler

type UseOptions Uses

type UseOptions struct {
    ioes.IOStreams

    Refs  []string
    List  bool
    Clear bool

    QriRepoPath string
}

UseOptions encapsulates state for the search command

func (*UseOptions) Complete Uses

func (o *UseOptions) Complete(f Factory, args []string) (err error)

Complete adds any missing configuration that can only be added just before calling Run

func (*UseOptions) Run Uses

func (o *UseOptions) Run() (err error)

Run executes the search command

func (*UseOptions) Validate Uses

func (o *UseOptions) Validate() error

Validate checks that any user input is valide

type ValidateOptions Uses

type ValidateOptions struct {
    ioes.IOStreams

    Ref            string
    Filepath       string
    SchemaFilepath string
    URL            string

    DatasetRequests *lib.DatasetRequests
}

ValidateOptions encapsulates state for the validate command

func (*ValidateOptions) Complete Uses

func (o *ValidateOptions) Complete(f Factory, args []string) (err error)

Complete adds any configuration that can only be added just before calling Run

func (*ValidateOptions) Run Uses

func (o *ValidateOptions) Run() (err error)

Run executes the run command

Directories

PathSynopsis
generatePackage generate is a command that creates a bash completion file for qri

Package cmd imports 43 packages (graph) and is imported by 3 packages. Updated 2019-07-20. Refresh now. Tools for package owners.