Skip to content

feat(client): add user and workspace user group clients, with list co… - #96

Open
cschroer wants to merge 1 commit into
meshcloud:mainfrom
cschroer:feat/workspace-user-group
Open

cschroer wants to merge 1 commit into
meshcloud:mainfrom
cschroer:feat/workspace-user-group

Conversation

@cschroer

Copy link
Copy Markdown

…mmands

MeshWorkspaceUserGroupClient covers create, read, update, delete and list of meshWorkspaceUserGroup v1, addressed by workspace.group. MeshUserClient reads a meshUser v2 by username and lists users by uuid, username, email, euid, workspace, workspace role or project. Both are new fields of client.Client, so the Terraform provider's mocks keep compiling, and client.New registers both with Raw. The group listing documents no sort parameter, so it keeps meshStack's own order.

meshstack user list lists the users with a role in the workspace, and meshstack workspaceusergroup list (alias wug) the groups the workspace owns. meshStack answers 400 to a group listing that filters by workspace and username at once, so --username lists the user's groups in every workspace the credential can access.

The workspaceUserGroupIdentifier filter of the user listing is left out: the API docs do not say whether it takes the group name or workspace.group.

…mmands

MeshWorkspaceUserGroupClient covers create, read, update, delete and list
of meshWorkspaceUserGroup v1, addressed by workspace.group. MeshUserClient
reads a meshUser v2 by username and lists users by uuid, username, email,
euid, workspace, workspace role or project. Both are new fields of
client.Client, so the Terraform provider's mocks keep compiling, and
client.New registers both with Raw. The group listing documents no sort
parameter, so it keeps meshStack's own order.

meshstack user list lists the users with a role in the workspace, and
meshstack workspaceusergroup list (alias wug) the groups the workspace owns.
meshStack answers 400 to a group listing that filters by workspace and
username at once, so --username lists the user's groups in every workspace
the credential can access.

The workspaceUserGroupIdentifier filter of the user listing is left out:
the API docs do not say whether it takes the group name or workspace.group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread cmd/user/list.go
"github.com/meshcloud/meshstack-cli/cmd/internal"
)

func newList() *cobra.Command {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d: would it be enough for now adding the client/ package changes only and the corresponding TF provider resources for now? I'm a bit reluctant to extend the CLI api here in one go, in particular considering that meshstack api is already there to talk to that public api without a dedicated set of CLI list commands for now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants