mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 17:57:37 +00:00
Rename [Nn]amespace -> [Uu]ser in go code
Use gopls, ag and perl to rename all occurances of Namespace Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:

committed by
Juan Font

parent
bafb6791d3
commit
e3a2593344
@@ -328,10 +328,10 @@ func (t *HeadscaleInContainer) WaitForReady() error {
|
||||
})
|
||||
}
|
||||
|
||||
func (t *HeadscaleInContainer) CreateNamespace(
|
||||
namespace string,
|
||||
func (t *HeadscaleInContainer) CreateUser(
|
||||
user string,
|
||||
) error {
|
||||
command := []string{"headscale", "namespaces", "create", namespace}
|
||||
command := []string{"headscale", "users", "create", user}
|
||||
|
||||
_, _, err := dockertestutil.ExecuteCommand(
|
||||
t.container,
|
||||
@@ -346,14 +346,14 @@ func (t *HeadscaleInContainer) CreateNamespace(
|
||||
}
|
||||
|
||||
func (t *HeadscaleInContainer) CreateAuthKey(
|
||||
namespace string,
|
||||
user string,
|
||||
reusable bool,
|
||||
ephemeral bool,
|
||||
) (*v1.PreAuthKey, error) {
|
||||
command := []string{
|
||||
"headscale",
|
||||
"--namespace",
|
||||
namespace,
|
||||
"--user",
|
||||
user,
|
||||
"preauthkeys",
|
||||
"create",
|
||||
"--expiration",
|
||||
@@ -388,10 +388,10 @@ func (t *HeadscaleInContainer) CreateAuthKey(
|
||||
return &preAuthKey, nil
|
||||
}
|
||||
|
||||
func (t *HeadscaleInContainer) ListMachinesInNamespace(
|
||||
namespace string,
|
||||
func (t *HeadscaleInContainer) ListMachinesInUser(
|
||||
user string,
|
||||
) ([]*v1.Machine, error) {
|
||||
command := []string{"headscale", "--namespace", namespace, "nodes", "list", "--output", "json"}
|
||||
command := []string{"headscale", "--user", user, "nodes", "list", "--output", "json"}
|
||||
|
||||
result, _, err := dockertestutil.ExecuteCommand(
|
||||
t.container,
|
||||
|
Reference in New Issue
Block a user