Implement 'get' and 'get keys' -SDL CLI commands 17/7017/4
authorPetri Ovaska <petri.ovaska@nokia.com>
Tue, 9 Nov 2021 06:28:48 +0000 (08:28 +0200)
committerPetri Ovaska <petri.ovaska@nokia.com>
Mon, 15 Nov 2021 10:34:27 +0000 (12:34 +0200)
commit273d032db02901dba8deeb692f92ed2366dc6ee5
tree3d15c70134c52a5c8c4f70ff12d52d8200690370
parent7c256b622c8fd065e91a7e289937d6e692a7eb1d
Implement 'get' and 'get keys' -SDL CLI commands

sdlcli get -command is used to display one or many resources.

 Usage:
   sdlcli get [command]

sdlcli get keys -subcommand is used to list keys in the given
namespace matching key search pattern.

 Usage:
   sdlcli get keys <namespace> [pattern|default '*'] [flags]

Issue-Id: RIC-113
Change-Id: I86b81ff8d8d2cdc0e959e285b19f93696ebe377e
Signed-off-by: Petri Ovaska <petri.ovaska@nokia.com>
12 files changed:
cmd/sdlcli/main.go
internal/cli/cli_private_fn_test.go
internal/cli/get.go [new file with mode: 0644]
internal/cli/get_test.go [new file with mode: 0644]
internal/cli/healthcheck.go
internal/cli/healthcheck_test.go
internal/cli/keys.go [new file with mode: 0644]
internal/cli/keys_test.go [new file with mode: 0644]
internal/cli/root.go
internal/cli/types.go
internal/cli/utils.go
internal/mocks/db_mocks_private_testing.go