Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion types/owner.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
package types

import (
"github.com/google/uuid"
)

// Based on https://github.com/coder/terraform-provider-coder/blob/9a745586b23a9cb5de2f65a2dcac12e48b134ffa/provider/workspace_owner.go#L72
type WorkspaceOwner struct {
Groups []string `json:"groups"`
ID uuid.UUID `json:"id"`
Name string `json:"name"`
FullName string `json:"full_name"`
Email string `json:"email"`
SSHPublicKey string `json:"ssh_public_key"`
// SSHPrivateKey is intentionally omitted for now, due to the security risk
// that exposing it poses.
// SSHPrivateKey string `json:"ssh_private_key"`
Groups []string `json:"groups"`
SessionToken string `json:"session_token"`
OIDCAccessToken string `json:"oidc_access_token"`
LoginType string `json:"login_type"`
RBACRoles []WorkspaceOwnerRBACRole `json:"rbac_roles"`
}

type WorkspaceOwnerRBACRole struct {
Name string `json:"name"`
OrgID uuid.UUID `json:"org_id"`
}
Loading