about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--users/fcuny/exp/buckit/README.org21
-rw-r--r--users/fcuny/exp/buckit/add.go4
-rw-r--r--users/fcuny/exp/buckit/delete.go8
-rw-r--r--users/fcuny/exp/buckit/fetch.go4
-rw-r--r--users/fcuny/exp/buckit/info.go4
-rw-r--r--users/fcuny/exp/buckit/list.go7
6 files changed, 21 insertions, 27 deletions
diff --git a/users/fcuny/exp/buckit/README.org b/users/fcuny/exp/buckit/README.org
index d6ab4c5..bad0dae 100644
--- a/users/fcuny/exp/buckit/README.org
+++ b/users/fcuny/exp/buckit/README.org
@@ -3,14 +3,13 @@
 ~buckit~ is a tool to add files to a GCS bucket.
 
 * Store
-=buckit= is a CLI to upload files to a GCS bucket. A file belongs to a *namespace*. A namespace can have multiple *files*. Each files can have multiple *versions*.
+=buckit= is a CLI to upload files to a GCS bucket. A *package* belongs to a *bucket*. A bucket can have multiple *packages*. Each package can have multiple *versions*.
 
-When a version of a file is added to a namespace, a record is created in the index.
+When a version of a file is added to a bucket, a record is created in the index.
 
 A record is composed of the following information:
 - the version of the file
 - the name of the file
-- the name of the namespace
 - the checksum of the version
 - the path in the GCS bucket
 - the user who uploaded the version
@@ -19,7 +18,7 @@ A record is composed of the following information:
 
 GCS' ACLs are used to change the visibility of the object in the bucket.
 
-The index is a single JSON file stored at the root of the bucket. The keys in the index are the namespace. Inside a namespace, keys are the name of the files. Files contain a list of versions, in order (the most recent version is the last entry in the list).
+The index is a single JSON file stored at the root of the bucket. The keys in the index are the packages. Packages contain a list of versions, in order (the most recent version is the last entry in the list).
 
 A lock is used for both read and write of the file.
 ** Life cycle of files
@@ -34,30 +33,26 @@ When a file is marked for deletion, it can not be fetched anymore. The state can
 * CLI
 ** add
 #+begin_src sh
-buckit add <namespace> <file> <file path>
+buckit add <package> <file path>
 #+end_src
 ** list
 #+begin_src sh
 buckit list
 #+end_src
-
-#+begin_src sh
-buckit list <namespace>
-#+end_src
 ** fetch
 #+begin_src sh
-buckit fetch <namespace> <file> <version>
+buckit fetch <package> <version>
 #+end_src
 ** info
 #+begin_src sh
-buckit info <namespace> <file> <version>
+buckit info <package> <version>
 #+end_src
 ** delete
 #+begin_src sh
-buckit delete <namespace> <file> <version>
+buckit delete <package> <version>
 #+end_src
 ** undelete
 #+begin_src sh
-bucket undelete <namespace> <file> <version>
+bucket undelete <package> <version>
 #+end_src
 
diff --git a/users/fcuny/exp/buckit/add.go b/users/fcuny/exp/buckit/add.go
index 32f5870..c29476e 100644
--- a/users/fcuny/exp/buckit/add.go
+++ b/users/fcuny/exp/buckit/add.go
@@ -6,9 +6,9 @@ import (
 
 var addCmd = &cli.Command{
 	Name:      "add",
-	Usage:     "Add a file to a namespace",
+	Usage:     "Add a package",
 	Action:    addAction,
-	ArgsUsage: "<namespace> <file> <filepath>",
+	ArgsUsage: "<package> <filepath>",
 }
 
 func addAction(ctx *cli.Context) error {
diff --git a/users/fcuny/exp/buckit/delete.go b/users/fcuny/exp/buckit/delete.go
index 6e504a9..7bd2ab2 100644
--- a/users/fcuny/exp/buckit/delete.go
+++ b/users/fcuny/exp/buckit/delete.go
@@ -6,16 +6,16 @@ import (
 
 var deleteCmd = &cli.Command{
 	Name:      "delete",
-	Usage:     "Delete a version of a file within a namespace",
+	Usage:     "Delete a version of a package",
 	Action:    deleteAction,
-	ArgsUsage: "<namespace> <file> <version>",
+	ArgsUsage: "<package> <version>",
 }
 
 var undeleteCmd = &cli.Command{
 	Name:      "undelete",
-	Usage:     "Un-delete a version of a file within a namespace",
+	Usage:     "Un-delete a version of a package",
 	Action:    undeleteAction,
-	ArgsUsage: "<namespace> <file> <version>",
+	ArgsUsage: "<package> <version>",
 }
 
 func deleteAction(ctx *cli.Context) error {
diff --git a/users/fcuny/exp/buckit/fetch.go b/users/fcuny/exp/buckit/fetch.go
index 9ac31cc..e4204ae 100644
--- a/users/fcuny/exp/buckit/fetch.go
+++ b/users/fcuny/exp/buckit/fetch.go
@@ -6,9 +6,9 @@ import (
 
 var fetchCmd = &cli.Command{
 	Name:      "fetch",
-	Usage:     "Fetch a version of a file within a namespace",
+	Usage:     "Fetch a version of a package",
 	Action:    fetchAction,
-	ArgsUsage: "<namespace> <file> <version>",
+	ArgsUsage: "<package> <version>",
 }
 
 func fetchAction(ctx *cli.Context) error {
diff --git a/users/fcuny/exp/buckit/info.go b/users/fcuny/exp/buckit/info.go
index a75add4..f8ad448 100644
--- a/users/fcuny/exp/buckit/info.go
+++ b/users/fcuny/exp/buckit/info.go
@@ -6,9 +6,9 @@ import (
 
 var infoCmd = &cli.Command{
 	Name:      "info",
-	Usage:     "Get information about a version of a file in a namespace",
+	Usage:     "Get information about a version of a package",
 	Action:    infoAction,
-	ArgsUsage: "<namespace> <file> <version>",
+	ArgsUsage: "<package> <version>",
 }
 
 func infoAction(ctx *cli.Context) error {
diff --git a/users/fcuny/exp/buckit/list.go b/users/fcuny/exp/buckit/list.go
index 5d81c34..1c080ab 100644
--- a/users/fcuny/exp/buckit/list.go
+++ b/users/fcuny/exp/buckit/list.go
@@ -5,10 +5,9 @@ import (
 )
 
 var listCmd = &cli.Command{
-	Name:      "list",
-	Usage:     "List namespaces or files within a namespace",
-	Action:    listAction,
-	ArgsUsage: "[namespace]",
+	Name:   "list",
+	Usage:  "List packages",
+	Action: listAction,
 }
 
 func listAction(ctx *cli.Context) error {