cli

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const AddedFilesPath string = ".ark/added_files"

AddedFilesPath is the file cache location.

Variables

View Source
var Add = cmd.Sub{
	Name:  "add",
	Alias: "ad",
	Short: "Stage a file for set of files for a submission.",
	Args:  &AddArgs{},
	Run:   AddRun,
}

Add stages a file or set of files for a submission.

View Source
var Alias = cmd.Sub{
	Name:  "alias",
	Alias: "a",
	Short: "Create a shortcut for a manifest URL.",
	Args:  &AliasArgs{},
	Flags: &AliasFlags{},
	Run:   AliasRun,
}

Alias creates a custom alias mapping in Ark.

View Source
var Config = cmd.Sub{
	Name:  "config",
	Alias: "c",
	Short: "Update an one of Ark's Configuration Values.",
	Args:  &ConfigArgs{},
	Run:   ConfigRun,
}

Config updates a config value with Ark.

View Source
var Init = cmd.Sub{
	Name:  "init",
	Alias: "i",
	Short: "Initialize a dataset's local configuration.",
	Args:  &InitArgs{},
	Run:   InitRun,
}

Init configures Ark's local staging and configuration directory.

View Source
var Pull = cmd.Sub{
	Name:  "pull",
	Alias: "pl",
	Short: "Pull a file from an Arken Cluster.",
	Args:  &PullArgs{},
	Run:   PullRun,
}

Pull downloads files from an Arken cluster.

View Source
var Remove = cmd.Sub{
	Name:  "remove",
	Alias: "rm",
	Short: "Remove a file from the internal submission cache.",
	Args:  &RemoveArgs{},
	Run:   RemoveRun,
}

Add stages a file or set of files for a submission.

View Source
var Root = &cmd.Root{
	Name:    "ark",
	Short:   "The Arken command-line client.",
	Version: config.Version,
	License: "Licensed under the Apache License, Version 2.0",
	Flags:   &GlobalFlags{},
}
View Source
var Status = cmd.Sub{
	Name:  "status",
	Alias: "s",
	Short: "View what files are currently staged for submission.",
	Args:  &StatusArgs{},
	Run:   StatusRun,
}

Status prints out what files are currently staged for submission.

View Source
var Submit = cmd.Sub{
	Name:  "submit",
	Alias: "sb",
	Short: "Submit your files to a manifest repository.",
	Args:  &SubmitArgs{},
	Flags: &SubmitFlags{},
	Run:   SubmitRun,
}

Submit creates a manifest file and uploads it to the destination git repository.

View Source
var Update = cmd.Sub{
	Name:  "update",
	Alias: "upd",
	Short: "Update Ark to the latest version available.",
	Args:  &UpdateArgs{},
	Flags: &UpdateFlags{},
	Run:   UpdateRun,
}

Update checks for a new version of the AIT program and updates itself if a newer version is found and the user agrees to update.

View Source
var Upload = cmd.Sub{
	Name:  "upload",
	Alias: "up",
	Short: "Upload files to an Arken cluster after an accepted submission.",
	Args:  &UploadArgs{},
	Run:   UploadRun,
}

Upload begins seeding your files to an Arken Cluster once your submission into the Manifest has been merged into the repository.

Functions

func AddRun

func AddRun(r *cmd.Root, c *cmd.Sub)

AddRun stages a file within the current working directory for a later submission.

func AliasRun

func AliasRun(r *cmd.Root, c *cmd.Sub)

AliasRun creates a custom alias mapping for a manifest url.

func ConfigRun

func ConfigRun(r *cmd.Root, c *cmd.Sub)

ConfigRun updates one of Ark's internal config values.

func InitRun

func InitRun(r *cmd.Root, c *cmd.Sub)

InitRun creates a new ark repo simply by creating a folder called .ark in the working dir.

func PullRun

func PullRun(r *cmd.Root, c *cmd.Sub)

PullRun handles pulling and saving a file from an Arken cluster.

func RemoveRun

func RemoveRun(r *cmd.Root, c *cmd.Sub)

RemoveRun removes file from the submission cache.

func StatusRun

func StatusRun(r *cmd.Root, c *cmd.Sub)

StatusRun handles the execution of the status command.

func SubmitRun

func SubmitRun(r *cmd.Root, c *cmd.Sub)

SubmitRun authenticates the user through our OAuth app and uses that to upload a manifest file generated locally, or makes a pull request if necessary.

func UpdateRun

func UpdateRun(r *cmd.Root, c *cmd.Sub)

UpdateRun handles the checking and self updating of the AIT program.

func UploadRun

func UploadRun(r *cmd.Root, c *cmd.Sub)

UploadRun handles the uploading and display of the upload command.

Types

type AddArgs

type AddArgs struct {
	Paths []string
}

AddArgs handles the specific arguments for the add command.

type AliasArgs

type AliasArgs struct {
	Shortcut string
	URL      []string `zero:"true"`
}

AliasArgs handles the specific arguments for the alias command.

type AliasFlags

type AliasFlags struct {
	Delete bool `short:"d" long:"delete" desc:"delete an alias shortcut."`
}

AliasFlags handles the specific flags for the alias command.

type ConfigArgs

type ConfigArgs struct {
	Key   string
	Value []string `zero:"true"`
}

ConfigArgs handles the specific arguments for the config command.

type GlobalFlags

type GlobalFlags struct {
	Config  string `short:"c" long:"config" desc:"Specify a custom config path."`
	Verbose bool   `short:"v" long:"verbose" desc:"Show More Information"`
}

GlobalFlags contains the flags for commands.

type InitArgs

type InitArgs struct {
}

InitArgs handles the specific arguments for the init command.

type PullArgs

type PullArgs struct {
	Manifest  string
	Filepaths []string
}

PullArgs handles the specific arguments for the pull command.

type RemoveArgs

type RemoveArgs struct {
	Paths []string
}

RemoveArgs handles the specific arguments for the remove command.

type StatusArgs

type StatusArgs struct {
}

StatusArgs handles the specific arguments for the status command.

type SubmitArgs

type SubmitArgs struct {
	Manifest string
}

SubmitArgs handles the specific arguments for the submit command.

type SubmitFlags

type SubmitFlags struct {
	IsPR bool `short:"p" long:"pull-request" desc:"Jump straight into submitting a pull request"`
}

SubmitFlags handles the specific flags for the submit command.

type UpdateArgs

type UpdateArgs struct {
}

UpdateArgs handles the specific arguments for the update command.

type UpdateFlags

type UpdateFlags struct {
	Yes bool `short:"y" long:"yes" desc:"If a newer version is found update without prompting the user."`
}

UpdateFlags handles the specific flags for the update command.

type UploadArgs

type UploadArgs struct {
	Manifest string
}

UploadArgs handles the specific arguments for the upload command.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL