Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

Decide who should hold the workspace id: the Workspace model or the Structurizr Client #21

Open
ilaif opened this issue Aug 10, 2020 · 5 comments
Labels
low priority Low priority issue

Comments

@ilaif
Copy link
Collaborator

ilaif commented Aug 10, 2020

No description provided.

@ilaif ilaif mentioned this issue Aug 10, 2020
5 tasks
@yt-ms
Copy link
Collaborator

yt-ms commented Oct 18, 2020

It seems a bit odd that the client be tied to a single workspace, and this is inconsistent with the Java API.

I'd suggest keeping the workspace ID in the Workspace, and allowing the client to operate across multiple workspaces. Note that we'd need a slightly different solution to being able to lock/unlock a workspace with a with block - maybe do something like with client.lock(workspace):, which is also explicit about what it's doing?

@Midnighter
Copy link
Owner

I like your idea for a context manager around a lock method!

It's true that the Java API accepts the workspace ID as an argument, however, it does hold the API key and secret which, as far as I know, are also specific to a particular workspace (but maybe I'm wrong on this). That's why I originally decided to put all of that on the settings object.

@yt-ms
Copy link
Collaborator

yt-ms commented Oct 19, 2020

it does hold the API key and secret which, as far as I know, are also specific to a particular workspace (but maybe I'm wrong on this).

Hmmm, good point. I'm hoping to get a licence key shortly that gives me multiple workspaces, so I'll check this out and see whether the key and secret are workspace-specific.

@Midnighter
Copy link
Owner

I have access to three workspaces through the open source plan and each ID, key, and secret are different.

@Midnighter
Copy link
Owner

This is actually a duplicate of #11 but more discussion here so I'll close that one.

@Midnighter Midnighter mentioned this issue Nov 27, 2020
@Midnighter Midnighter added the low priority Low priority issue label Nov 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
low priority Low priority issue
Projects
None yet
Development

No branches or pull requests

3 participants