commands

package
v0.0.0-...-6bdf688 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const ADMIN_USER_UUID = "00000000-0000-0000-0000-000000000000"

The following consts MUST MATCH those defined in cmd/dotmesh-server/pkg/main/users.go

FIXME: When we have a shared library betwixt client and server, we can put all this in there.

View Source
const API_KEY_BYTES = 32

How many bytes of entropy in an API key

View Source
const DISCOVERY_API_KEY = "...ADMIN_API_KEY"
View Source
const DISCOVERY_PASSWORD = "...ADMIN_PASSWORD"
View Source
const DOTMESH_DOCKER_IMAGE = "quay.io/dotmesh/dotmesh-server"
View Source
const DOTMESH_UPGRADES_INTERVAL_SECONDS = 14400 // 4 hours
View Source
const DOTMESH_UPGRADES_URL = "https://checkpoint.dotmesh.com/"
View Source
const HASH_BYTES = 32

And in a password hash

View Source
const SALT_BYTES = 32

And in a salt

View Source
const SCRYPT_N = 32768

Scrypt parameters, these are considered good as of 2017 according to https://godoc.org/golang.org/x/crypto/scrypt

View Source
const SCRYPT_P = 1
View Source
const SCRYPT_R = 8

Variables

View Source
var MainCmd = &cobra.Command{
	Use:   "dm",
	Short: "dotmesh (dm) is like git for your data in Docker",
	Long: `dotmesh (dm) is like git for your data in Docker.

This is the client. Configure it to talk to a dotmesh cluster with 'dm remote
add'. Create a dotmesh cluster with 'dm cluster init'.`,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		configPathInner, err := homedir.Expand(configPath)
		configPath = configPathInner
		if err != nil {
			return err
		}
		dirPath := filepath.Dir(configPath)
		if _, err := os.Stat(dirPath); err != nil {
			if err := os.MkdirAll(dirPath, 0700); err != nil {
				return fmt.Errorf(
					"Could not create config directory %s: %v", configPath, err,
				)
			}
		}
		return nil
	},
}

Functions

func Initialise

func Initialise()

func NewCmdBranch

func NewCmdBranch(out io.Writer) *cobra.Command

func NewCmdCheckout

func NewCmdCheckout(out io.Writer) *cobra.Command

func NewCmdClone

func NewCmdClone(out io.Writer) *cobra.Command

func NewCmdCluster

func NewCmdCluster(out io.Writer) *cobra.Command

func NewCmdClusterBackupEtcd

func NewCmdClusterBackupEtcd(out io.Writer) *cobra.Command

func NewCmdClusterInit

func NewCmdClusterInit(out io.Writer) *cobra.Command

func NewCmdClusterJoin

func NewCmdClusterJoin(out io.Writer) *cobra.Command

func NewCmdClusterReset

func NewCmdClusterReset(out io.Writer) *cobra.Command

func NewCmdClusterRestoreEtcd

func NewCmdClusterRestoreEtcd(out io.Writer, in io.Reader) *cobra.Command

func NewCmdClusterUpgrade

func NewCmdClusterUpgrade(out io.Writer) *cobra.Command

func NewCmdCommit

func NewCmdCommit(out io.Writer) *cobra.Command

func NewCmdDebug

func NewCmdDebug(out io.Writer) *cobra.Command

func NewCmdDot

func NewCmdDot(out io.Writer) *cobra.Command

func NewCmdDotDelete

func NewCmdDotDelete(out io.Writer) *cobra.Command

func NewCmdDotForceBranchMaster

func NewCmdDotForceBranchMaster(out io.Writer) *cobra.Command

func NewCmdDotSetUpstream

func NewCmdDotSetUpstream(out io.Writer) *cobra.Command

func NewCmdDotShow

func NewCmdDotShow(out io.Writer) *cobra.Command

func NewCmdInit

func NewCmdInit(out io.Writer) *cobra.Command

func NewCmdList

func NewCmdList(out io.Writer) *cobra.Command

func NewCmdLog

func NewCmdLog(out io.Writer) *cobra.Command

func NewCmdMount

func NewCmdMount(out io.Writer) *cobra.Command

func NewCmdPull

func NewCmdPull(out io.Writer) *cobra.Command

func NewCmdPush

func NewCmdPush(out io.Writer) *cobra.Command

func NewCmdRemote

func NewCmdRemote(out io.Writer) *cobra.Command

func NewCmdReset

func NewCmdReset(out io.Writer) *cobra.Command

func NewCmdS3

func NewCmdS3(out io.Writer) *cobra.Command

func NewCmdSwitch

func NewCmdSwitch(out io.Writer) *cobra.Command

func NewCmdVersion

func NewCmdVersion(out io.Writer) *cobra.Command

func RandToken

func RandToken(length int) (string, error)

func SetVersion

func SetVersion(v, t string)

Types

type DiscoveryResponse

type DiscoveryResponse struct {
	Action string `json:"action"`
	Node   struct {
		Key   string `json:"key"`
		Dir   bool   `json:"dir"`
		Nodes []struct {
			Key           string `json:"key"`
			Value         string `json:"value"`
			ModifiedIndex int    `json:"modifiedIndex"`
			CreatedIndex  int    `json:"createdIndex"`
		} `json:"nodes"`
		ModifiedIndex int `json:"modifiedIndex"`
		CreatedIndex  int `json:"createdIndex"`
	} `json:"node"`
}

Jump to

Keyboard shortcuts

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