Browse Source

WIP use cases, CLI.

Frederic G. MARAND 6 years ago
parent
commit
4ef052a452
5 changed files with 82 additions and 0 deletions
  1. 30 0
      cmd/kurz/kurz.go
  2. 26 0
      cmd/kurzd/kurzd.go
  3. 8 0
      doc/use_cases/admins/admin1.md
  4. 15 0
      doc/use_cases/ops/ops1.md
  5. 3 0
      doc/use_cases/ops/ops2.md

+ 30 - 0
cmd/kurz/kurz.go

@@ -0,0 +1,30 @@
+// Package kurz contains the Kurz client command.
+package kurz
+
+/*
+kurz
+	-v							Verbose (default: false).
+	--url                       Access kurzd on this URL: (default: https://localhost:443, then http://localhost:80)
+	-h, --help					Display help.
+	check <url>                 Show information about a Kurz URL (default command). Exit 0 if the URL is available
+		--format json|null|text|url|yaml    Use a given format for the info (default: text). For null, only return an exit code.
+		--usage                 Also provide usage information (privileged)
+	-u <user>, --user=<user>    Provide a user account. Default: $KURZ_USER
+	-p <pass>, --pass=<pass>    Provide a user password. Default: $KURZ_PASS. If used without a pass, ask for one
+	create                      Create a new Kurz URL
+		--dry-run               Simulate creation: do not store result.
+		<url>                   Default creation
+		<url> <domain>          Create on vanity domain (restricted)
+		<url> <vanity_url>      Create as vanity URL (restricted)
+	archive                     Archive a Kurz URL (restricted)
+		--dry-run               Simulate archival
+		<url>                   The URL to archive
+	purge
+
+A Kurz URL created for a Kurz URL
+	- for the same user: the same URL.
+	- for a different user: a different URL.
+ */
+func main() {
+	
+}

+ 26 - 0
cmd/kurzd/kurzd.go

@@ -0,0 +1,26 @@
+// Package kurzd contains the Kurz daemon command.
+package kurzd
+
+/**
+kurzd
+	-v									Verbose (default: false).
+	help								Display help.
+	server 							Serve kurz (default option).
+		-p|--port <port_id>			    Serve on this IP port (default: 80).
+		-m|--monitoring <port_id>         Serve monitoring on this IP port (default: none)
+	install							Install kurzd completely.
+		config							Install the configuration define by command line to ~.
+		schema							Install the kurz database schema.
+	export							Export kurzd data.
+		-o <file>						Specify a destination file.
+		config						    Export kurz configuration.
+		content							Export kurz content.
+	uninstall						Uninstall kurzd completely.
+		config							Uninstall the curz configuration file from ~.
+		schema							Uninstall the curz database schema.
+	status                          Report on kurzd status
+	stop                            Stop all instances of kurzd on the current server (restricted)
+ */
+func main() {
+	
+}

+ 8 - 0
doc/use_cases/admins/admin1.md

@@ -0,0 +1,8 @@
+As a Kurz administrator
+In order to check business results
+I need to access business metrics from kurzd
+
+As a Kurz administrator
+In order to help customers
+I need to impersonate users in the user interface
+

+ 15 - 0
doc/use_cases/ops/ops1.md

@@ -0,0 +1,15 @@
+As a system administrator
+In order to install Kurz
+I need to provide storage information to kurzd
+
+As a system administrator
+In order to ensure system stability
+I need to access CPU, RAM, and storage metrics from kurzd
+
+As a system administrator for a system with SystemD
+In order to deploy Kurz
+I need to have a SystemD service for kurzd
+
+As a system administrator for a system without SystemD
+In order to deploy Kurz
+I need to have a SysV service for kurzd

+ 3 - 0
doc/use_cases/ops/ops2.md

@@ -0,0 +1,3 @@
+As a system administrator for an APT system
+In order to deploy Kurz
+I need to have Kurz available on an APT repository