cli

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Daemon = cmd.Sub{
	Name:  "daemon",
	Alias: "d",
	Short: "Startup and run the Arken daemon.",
	Run:   RunDaemon,
}
View Source
var Init = cmd.Sub{
	Name:  "init",
	Alias: "i",
	Short: "Initialize Arken's configuration without running the daemon.",
	Run:   RunInit,
}
View Source
var Root = &cmd.Root{
	Name:    "arken",
	Short:   "Arken is a distributed archive system.",
	Version: config.Version,
	License: "Licensed under the Apache License, Version 2.0",
	Flags:   &GlobalFlags{},
}
View Source
var Update = cmd.Sub{
	Name:  "update",
	Alias: "upd",
	Short: "Update Arken to the latest version available.",
	Args:  &UpdateArgs{},
	Flags: &UpdateFlags{},
	Run:   UpdateRun,
}

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

Functions

func RunDaemon

func RunDaemon(r *cmd.Root, s *cmd.Sub)

func RunInit

func RunInit(r *cmd.Root, s *cmd.Sub)

func UpdateRun added in v0.2.2

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

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

Types

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 UpdateArgs added in v0.2.2

type UpdateArgs struct {
}

UpdateArgs handles the specific arguments for the update command.

type UpdateFlags added in v0.2.2

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.

Jump to

Keyboard shortcuts

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