Skip to content

Commit 7e74ec5

Browse files
authored
chore: add additional WorkspaceOwner fields (#48)
1 parent ab350ac commit 7e74ec5

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

types/owner.go

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
package types
22

3+
import (
4+
"github.com/google/uuid"
5+
)
6+
7+
// Based on https://github.com/coder/terraform-provider-coder/blob/9a745586b23a9cb5de2f65a2dcac12e48b134ffa/provider/workspace_owner.go#L72
38
type WorkspaceOwner struct {
4-
Groups []string `json:"groups"`
9+
ID uuid.UUID `json:"id"`
10+
Name string `json:"name"`
11+
FullName string `json:"full_name"`
12+
Email string `json:"email"`
13+
SSHPublicKey string `json:"ssh_public_key"`
14+
// SSHPrivateKey is intentionally omitted for now, due to the security risk
15+
// that exposing it poses.
16+
// SSHPrivateKey string `json:"ssh_private_key"`
17+
Groups []string `json:"groups"`
18+
SessionToken string `json:"session_token"`
19+
OIDCAccessToken string `json:"oidc_access_token"`
20+
LoginType string `json:"login_type"`
21+
RBACRoles []WorkspaceOwnerRBACRole `json:"rbac_roles"`
22+
}
23+
24+
type WorkspaceOwnerRBACRole struct {
25+
Name string `json:"name"`
26+
OrgID uuid.UUID `json:"org_id"`
527
}

0 commit comments

Comments
 (0)