MCPcopy Create free account
hub / github.com/bytebase/bytebase / GetWorkspaceID

Method GetWorkspaceID

backend/store/workspace.go:79–88  ·  view source on GitHub ↗

GetWorkspaceID returns the workspace resource ID. Returns ("", nil) if no workspace exists.

(ctx context.Context)

Source from the content-addressed store, hash-verified

77// GetWorkspaceID returns the workspace resource ID.
78// Returns ("", nil) if no workspace exists.
79func (s *Store) GetWorkspaceID(ctx context.Context) (string, error) {
80 ws, err := s.getWorkspace(ctx)
81 if err != nil {
82 return "", err
83 }
84 if ws == nil {
85 return "", nil
86 }
87 return ws.ResourceID, nil
88}
89
90// CreateWorkspace creates a new workspace and initializes its default settings and IAM policy.
91func (s *Store) CreateWorkspace(ctx context.Context, create *WorkspaceMessage, adminEmail string) (*WorkspaceMessage, error) {

Callers

nothing calls this directly

Calls 1

getWorkspaceMethod · 0.95

Tested by

no test coverage detected