Documentation
¶
Index ¶
- type CountOrgMembersByOrgIDsRow
- type CreateOrgMemberParams
- type CreateOrganizationParams
- type CreateRoleAssignmentParams
- type CreateWorkspaceParams
- type DBTX
- type EnsureSystemOrgTypeParams
- type EnsureSystemOrganizationParams
- type EnsureSystemWorkspaceParams
- type ListActiveMembersByOrgIDRow
- type ListActiveMembershipsByPersonIDRow
- type ListOrganizationNamesByIDsRow
- type ListOrganizationsPageParams
- type ListOrganizationsPageRow
- type OrgMember
- type OrgType
- type Organization
- type Querier
- type Queries
- func (q *Queries) AnyOrgTypeWithDefaultPlan(ctx context.Context) (bool, error)
- func (q *Queries) CountOrgMembersByOrgIDs(ctx context.Context, orgIds []string) ([]CountOrgMembersByOrgIDsRow, error)
- func (q *Queries) CountTeamOrganizations(ctx context.Context) (int64, error)
- func (q *Queries) CountWorkspacesByOrgID(ctx context.Context, orgID string) (int64, error)
- func (q *Queries) CreateOrgMember(ctx context.Context, arg CreateOrgMemberParams) (OrgMember, error)
- func (q *Queries) CreateOrganization(ctx context.Context, arg CreateOrganizationParams) (Organization, error)
- func (q *Queries) CreateRoleAssignment(ctx context.Context, arg CreateRoleAssignmentParams) (RoleAssignment, error)
- func (q *Queries) CreateWorkspace(ctx context.Context, arg CreateWorkspaceParams) (Workspace, error)
- func (q *Queries) EnsureSystemOrgType(ctx context.Context, arg EnsureSystemOrgTypeParams) error
- func (q *Queries) EnsureSystemOrganization(ctx context.Context, arg EnsureSystemOrganizationParams) error
- func (q *Queries) EnsureSystemWorkspace(ctx context.Context, arg EnsureSystemWorkspaceParams) error
- func (q *Queries) GetOrgType(ctx context.Context, orgType string) (OrgType, error)
- func (q *Queries) GetOrganizationByID(ctx context.Context, orgID string) (Organization, error)
- func (q *Queries) GetOrganizationByKey(ctx context.Context, key sql.NullString) (Organization, error)
- func (q *Queries) GetOrganizationsByOwner(ctx context.Context, ownerPersonID string) ([]Organization, error)
- func (q *Queries) GetSystemOrgWorkspace(ctx context.Context) (Workspace, error)
- func (q *Queries) GetSystemOrganization(ctx context.Context) (Organization, error)
- func (q *Queries) GetSystemRoleByName(ctx context.Context, roleName string) (Role, error)
- func (q *Queries) GetWorkspaceByID(ctx context.Context, workspaceID string) (Workspace, error)
- func (q *Queries) GetWorkspacesByOrgID(ctx context.Context, orgID string) ([]Workspace, error)
- func (q *Queries) ListActiveMembersByOrgID(ctx context.Context, orgID string) ([]ListActiveMembersByOrgIDRow, error)
- func (q *Queries) ListActiveMembershipsByPersonID(ctx context.Context, personID string) ([]ListActiveMembershipsByPersonIDRow, error)
- func (q *Queries) ListConfigurableOrgTypes(ctx context.Context) ([]OrgType, error)
- func (q *Queries) ListOrgTypes(ctx context.Context) ([]OrgType, error)
- func (q *Queries) ListOrganizationNamesByIDs(ctx context.Context, orgIds []string) ([]ListOrganizationNamesByIDsRow, error)
- func (q *Queries) ListOrganizations(ctx context.Context) ([]Organization, error)
- func (q *Queries) ListOrganizationsByType(ctx context.Context, orgType string) ([]Organization, error)
- func (q *Queries) ListOrganizationsPage(ctx context.Context, arg ListOrganizationsPageParams) ([]ListOrganizationsPageRow, error)
- func (q *Queries) LockOrgType(ctx context.Context, orgType string) (OrgType, error)
- func (q *Queries) SearchOrganizationsByName(ctx context.Context, arg SearchOrganizationsByNameParams) ([]SearchOrganizationsByNameRow, error)
- func (q *Queries) UpdateOrgTypeDefaultPlanLadder(ctx context.Context, arg UpdateOrgTypeDefaultPlanLadderParams) (OrgType, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Role
- type RoleAssignment
- type SearchOrganizationsByNameParams
- type SearchOrganizationsByNameRow
- type UpdateOrgTypeDefaultPlanLadderParams
- type Workspace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOrgMemberParams ¶
type CreateOrganizationParams ¶
type CreateOrganizationParams struct {
Name string `json:"name"`
OrgType string `json:"org_type"`
OwnerPersonID string `json:"owner_person_id"`
Key sql.NullString `json:"key"`
}
type CreateWorkspaceParams ¶
type CreateWorkspaceParams struct {
OrgID string `json:"org_id"`
Name string `json:"name"`
Key sql.NullString `json:"key"`
}
type ListActiveMembersByOrgIDRow ¶
type ListActiveMembersByOrgIDRow struct {
OrgMemberID string `json:"org_member_id"`
PersonID string `json:"person_id"`
RoleID string `json:"role_id"`
JoinedAt time.Time `json:"joined_at"`
DisplayName string `json:"display_name"`
PrimaryEmail string `json:"primary_email"`
RoleName string `json:"role_name"`
}
type ListOrganizationsPageParams ¶
type ListOrganizationsPageParams struct {
Q sql.NullString `json:"q"`
OrgType sql.NullString `json:"org_type"`
PageOffset int32 `json:"page_offset"`
PageLimit int32 `json:"page_limit"`
}
type ListOrganizationsPageRow ¶
type ListOrganizationsPageRow struct {
OrgID string `json:"org_id"`
Name string `json:"name"`
OrgType string `json:"org_type"`
OwnerPersonID string `json:"owner_person_id"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
OwnerDisplayName sql.NullString `json:"owner_display_name"`
TotalCount int64 `json:"total_count"`
}
type OrgMember ¶
type OrgMember struct {
OrgMemberID string `json:"org_member_id"`
OrgID string `json:"org_id"`
PersonID string `json:"person_id"`
RoleID string `json:"role_id"`
Status string `json:"status"`
JoinedAt time.Time `json:"joined_at"`
RemovedAt sql.NullTime `json:"removed_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type OrgType ¶
type OrgType struct {
OrgType string `json:"org_type"`
DisplayName string `json:"display_name"`
Description sql.NullString `json:"description"`
IsActive bool `json:"is_active"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
IsReserved bool `json:"is_reserved"`
DefaultPlanLadderID uuid.NullUUID `json:"default_plan_ladder_id"`
}
type Organization ¶
type Organization struct {
OrgID string `json:"org_id"`
Name string `json:"name"`
Key sql.NullString `json:"key"`
OrgType string `json:"org_type"`
OwnerPersonID string `json:"owner_person_id"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type Querier ¶
type Querier interface {
// Setup-checklist existence probe; reserved types never carry a default.
AnyOrgTypeWithDefaultPlan(ctx context.Context) (bool, error)
// The member count of each organization one page of the operator's
// organizations list shows, in one read (#10): every org_members row with its
// person and role, as the list has always counted, so a member of any status
// counts. An organization with no member is absent from the result.
CountOrgMembersByOrgIDs(ctx context.Context, orgIds []string) ([]CountOrgMembersByOrgIDsRow, error)
// Operator overview headline. Personal orgs exist one-per-member by
// structural convention (design/organization/architecture.md §2), so an
// organizations count that includes them tracks the people count and reads
// as an error. Negative-space predicate instead of org_type = 'team':
// everything active that is neither the auto-created personal type nor a
// reserved type counts, so team, enterprise, and deployment-defined types
// need no code change here and the reserved system org never appears.
CountTeamOrganizations(ctx context.Context) (int64, error)
CountWorkspacesByOrgID(ctx context.Context, orgID string) (int64, error)
CreateOrgMember(ctx context.Context, arg CreateOrgMemberParams) (OrgMember, error)
// Identity is org_id, presentation is name, and organization names are
// deliberately not unique. `key` is the optional declarative address
// (entity-keys §1 to §4): a caller outside the database -- a seed, a
// configuration loader, an API client -- supplies it to name this row
// literally. UI-created organizations leave it NULL, and a personal
// organization never gets one: a key is never derived from a person's login
// or display name (§4).
CreateOrganization(ctx context.Context, arg CreateOrganizationParams) (Organization, error)
CreateRoleAssignment(ctx context.Context, arg CreateRoleAssignmentParams) (RoleAssignment, error)
// The name is what people see and the only thing the create form asks for;
// uq_workspaces_org_id_name_ci keeps it unambiguous within the organization
// among live workspaces. `key` is the optional declarative address
// (entity-keys §3), unique within the organization rather than globally
// because a workspace is a child; UI-created workspaces leave it NULL, and a
// singleton workspace is addressed through its organization.
CreateWorkspace(ctx context.Context, arg CreateWorkspaceParams) (Workspace, error)
// Idempotently insert the reserved 'system' org type. is_reserved=TRUE keeps it
// out of the operator config UI; default_plan_ladder_id stays NULL, so
// auto-provisioning issues no default grant for system orgs.
EnsureSystemOrgType(ctx context.Context, arg EnsureSystemOrgTypeParams) error
// Idempotently insert the singleton System organization. The partial unique
// index uq_organizations_one_system enforces "exactly one System tenant", and
// the conflict target repeats the index predicate so Postgres can infer it.
// Read back with GetSystemOrganization.
//
// `system` is one of the two keys the system writes for itself (entity-keys
// §4): a fixed constant for a row the console creates by design, not a value
// derived from anybody's data. It is written here rather than by the Go
// caller so the only path that creates the System tenant is also the only
// path that names it.
EnsureSystemOrganization(ctx context.Context, arg EnsureSystemOrganizationParams) error
// Idempotently insert the System tenant's workspace, keyed on its name
// within the organization (entity-keys). The conflict target
// repeats the predicate of the partial index uq_workspaces_org_id_name_ci
// so Postgres can infer it. Only called when the system org has no
// workspace yet.
EnsureSystemWorkspace(ctx context.Context, arg EnsureSystemWorkspaceParams) error
GetOrgType(ctx context.Context, orgType string) (OrgType, error)
GetOrganizationByID(ctx context.Context, orgID string) (Organization, error)
// Root-scoped key resolver (entity-keys §5): the query that makes `key` a
// whole feature rather than a seed-only column. uq_organizations_key
// guarantees at most one row matches; a NULL key never matches because the
// parameter is compared with `=`.
GetOrganizationByKey(ctx context.Context, key sql.NullString) (Organization, error)
GetOrganizationsByOwner(ctx context.Context, ownerPersonID string) ([]Organization, error)
// Natural-key resolver: the workspace of the singleton organization whose
// org_type is 'system'. Returns the oldest workspace so a pre-existing
// workspace (e.g. an ad-hoc seed using a different name) is adopted rather
// than duplicated.
GetSystemOrgWorkspace(ctx context.Context) (Workspace, error)
// The singleton System organization, resolved by its natural key. Paired
// with EnsureSystemOrganization; uq_organizations_one_system guarantees at
// most one row matches.
GetSystemOrganization(ctx context.Context) (Organization, error)
GetSystemRoleByName(ctx context.Context, roleName string) (Role, error)
GetWorkspaceByID(ctx context.Context, workspaceID string) (Workspace, error)
GetWorkspacesByOrgID(ctx context.Context, orgID string) ([]Workspace, error)
// Operator composite's Members section. Active members only (status='active',
// excluding removed/historical rows). Unbounded: the section searches and
// pages the whole set Go-side, so a LIMIT here would make its stated total
// the cap rather than the member count. Most recently joined first; the person
// id (unique within an organization) breaks a tie, so the order is total and
// each member lands on exactly one page.
ListActiveMembersByOrgID(ctx context.Context, orgID string) ([]ListActiveMembersByOrgIDRow, error)
// Person-detail "Org memberships" section. Returns each org the person
// belongs to (active memberships only) with the org's display fields and
// the person's role at that org. Sorted by joined_at DESC so the most
// recent membership appears first — operators usually want "what's the
// person doing now" rather than "where did they start."
ListActiveMembershipsByPersonID(ctx context.Context, personID string) ([]ListActiveMembershipsByPersonIDRow, error)
// Operator-facing list: excludes reserved (app-managed) org types like 'system'
// so they don't render as editable cards on the Org Types management page.
ListConfigurableOrgTypes(ctx context.Context) ([]OrgType, error)
ListOrgTypes(ctx context.Context) ([]OrgType, error)
// The names of the organizations one operator page names, in one read (#10),
// with each one's type, which the floor name reads. An id with no row is
// absent from the result.
ListOrganizationNamesByIDs(ctx context.Context, orgIds []string) ([]ListOrganizationNamesByIDsRow, error)
ListOrganizations(ctx context.Context) ([]Organization, error)
ListOrganizationsByType(ctx context.Context, orgType string) ([]Organization, error)
// Organizations list operator surface (operator-list-scale UX-4): the
// paged, searched, org-type-filtered successor to ListOrganizationsWithOwner
// -- each row still carries its owner's display name so no organization can
// read as unowned (ux-honest-surfaces UX-16). owner_person_id is NOT NULL
// (every organization has an owner person, the System tenant included --
// 00001_init.sql), so the LEFT JOIN is defensive rather than expected to
// ever drop the owner's name.
//
// sqlc.narg(q): NULL matches every row; set, a case-insensitive substring
// match against the organization's name, or its owner's display
// name or primary email (operator-list-scale: "carries a scoped
// server-side search" -- "organizations: name and owner name or
// email").
// sqlc.narg(org_type): NULL matches every org type; set, an exact facet
// match (operator-list-scale: "Status filters exist ... organizations: org
// type").
// count(*) OVER() carries the true total for the filtered set alongside
// the page's rows (design D2), so the stated total never reflects only the
// page.
// Organization names are not unique, and organizations written in one
// transaction share created_at, so ties on the name fall to the organization
// id: it is time-ordered, which lists the later-written organization first,
// so each lists on exactly one page.
ListOrganizationsPage(ctx context.Context, arg ListOrganizationsPageParams) ([]ListOrganizationsPageRow, error)
// Locks one org type's row against a concurrent edit of the type and the
// demonstration seed, without blocking an organization insert's key-share
// lock on it. The default change's commit reads the type under it.
LockOrgType(ctx context.Context, orgType string) (OrgType, error)
// Landing lookup's organization branch (entity-keys). Runs only
// when no person matches the lookup term; a dedicated query rather than
// ListOrganizationsPage because that query's owner-email term would blur
// the person/organization split the lookup depends on. Active
// organizations only, name substring match, bounded by LIMIT so a short
// term cannot return the whole table.
SearchOrganizationsByName(ctx context.Context, arg SearchOrganizationsByNameParams) ([]SearchOrganizationsByNameRow, error)
UpdateOrgTypeDefaultPlanLadder(ctx context.Context, arg UpdateOrgTypeDefaultPlanLadderParams) (OrgType, error)
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AnyOrgTypeWithDefaultPlan ¶
Setup-checklist existence probe; reserved types never carry a default.
func (*Queries) CountOrgMembersByOrgIDs ¶
func (q *Queries) CountOrgMembersByOrgIDs(ctx context.Context, orgIds []string) ([]CountOrgMembersByOrgIDsRow, error)
The member count of each organization one page of the operator's organizations list shows, in one read (#10): every org_members row with its person and role, as the list has always counted, so a member of any status counts. An organization with no member is absent from the result.
func (*Queries) CountTeamOrganizations ¶
Operator overview headline. Personal orgs exist one-per-member by structural convention (design/organization/architecture.md §2), so an organizations count that includes them tracks the people count and reads as an error. Negative-space predicate instead of org_type = 'team': everything active that is neither the auto-created personal type nor a reserved type counts, so team, enterprise, and deployment-defined types need no code change here and the reserved system org never appears.
func (*Queries) CountWorkspacesByOrgID ¶
func (*Queries) CreateOrgMember ¶
func (*Queries) CreateOrganization ¶
func (q *Queries) CreateOrganization(ctx context.Context, arg CreateOrganizationParams) (Organization, error)
Identity is org_id, presentation is name, and organization names are deliberately not unique. `key` is the optional declarative address (entity-keys §1 to §4): a caller outside the database -- a seed, a configuration loader, an API client -- supplies it to name this row literally. UI-created organizations leave it NULL, and a personal organization never gets one: a key is never derived from a person's login or display name (§4).
func (*Queries) CreateRoleAssignment ¶
func (q *Queries) CreateRoleAssignment(ctx context.Context, arg CreateRoleAssignmentParams) (RoleAssignment, error)
func (*Queries) CreateWorkspace ¶
func (q *Queries) CreateWorkspace(ctx context.Context, arg CreateWorkspaceParams) (Workspace, error)
The name is what people see and the only thing the create form asks for; uq_workspaces_org_id_name_ci keeps it unambiguous within the organization among live workspaces. `key` is the optional declarative address (entity-keys §3), unique within the organization rather than globally because a workspace is a child; UI-created workspaces leave it NULL, and a singleton workspace is addressed through its organization.
func (*Queries) EnsureSystemOrgType ¶
func (q *Queries) EnsureSystemOrgType(ctx context.Context, arg EnsureSystemOrgTypeParams) error
Idempotently insert the reserved 'system' org type. is_reserved=TRUE keeps it out of the operator config UI; default_plan_ladder_id stays NULL, so auto-provisioning issues no default grant for system orgs.
func (*Queries) EnsureSystemOrganization ¶
func (q *Queries) EnsureSystemOrganization(ctx context.Context, arg EnsureSystemOrganizationParams) error
Idempotently insert the singleton System organization. The partial unique index uq_organizations_one_system enforces "exactly one System tenant", and the conflict target repeats the index predicate so Postgres can infer it. Read back with GetSystemOrganization.
`system` is one of the two keys the system writes for itself (entity-keys §4): a fixed constant for a row the console creates by design, not a value derived from anybody's data. It is written here rather than by the Go caller so the only path that creates the System tenant is also the only path that names it.
func (*Queries) EnsureSystemWorkspace ¶
func (q *Queries) EnsureSystemWorkspace(ctx context.Context, arg EnsureSystemWorkspaceParams) error
Idempotently insert the System tenant's workspace, keyed on its name within the organization (entity-keys). The conflict target repeats the predicate of the partial index uq_workspaces_org_id_name_ci so Postgres can infer it. Only called when the system org has no workspace yet.
func (*Queries) GetOrgType ¶
func (*Queries) GetOrganizationByID ¶
func (*Queries) GetOrganizationByKey ¶
func (q *Queries) GetOrganizationByKey(ctx context.Context, key sql.NullString) (Organization, error)
Root-scoped key resolver (entity-keys §5): the query that makes `key` a whole feature rather than a seed-only column. uq_organizations_key guarantees at most one row matches; a NULL key never matches because the parameter is compared with `=`.
func (*Queries) GetOrganizationsByOwner ¶
func (*Queries) GetSystemOrgWorkspace ¶
Natural-key resolver: the workspace of the singleton organization whose org_type is 'system'. Returns the oldest workspace so a pre-existing workspace (e.g. an ad-hoc seed using a different name) is adopted rather than duplicated.
func (*Queries) GetSystemOrganization ¶
func (q *Queries) GetSystemOrganization(ctx context.Context) (Organization, error)
The singleton System organization, resolved by its natural key. Paired with EnsureSystemOrganization; uq_organizations_one_system guarantees at most one row matches.
func (*Queries) GetSystemRoleByName ¶
func (*Queries) GetWorkspaceByID ¶
func (*Queries) GetWorkspacesByOrgID ¶
func (*Queries) ListActiveMembersByOrgID ¶
func (q *Queries) ListActiveMembersByOrgID(ctx context.Context, orgID string) ([]ListActiveMembersByOrgIDRow, error)
Operator composite's Members section. Active members only (status='active', excluding removed/historical rows). Unbounded: the section searches and pages the whole set Go-side, so a LIMIT here would make its stated total the cap rather than the member count. Most recently joined first; the person id (unique within an organization) breaks a tie, so the order is total and each member lands on exactly one page.
func (*Queries) ListActiveMembershipsByPersonID ¶
func (q *Queries) ListActiveMembershipsByPersonID(ctx context.Context, personID string) ([]ListActiveMembershipsByPersonIDRow, error)
Person-detail "Org memberships" section. Returns each org the person belongs to (active memberships only) with the org's display fields and the person's role at that org. Sorted by joined_at DESC so the most recent membership appears first — operators usually want "what's the person doing now" rather than "where did they start."
func (*Queries) ListConfigurableOrgTypes ¶
Operator-facing list: excludes reserved (app-managed) org types like 'system' so they don't render as editable cards on the Org Types management page.
func (*Queries) ListOrgTypes ¶
func (*Queries) ListOrganizationNamesByIDs ¶
func (q *Queries) ListOrganizationNamesByIDs(ctx context.Context, orgIds []string) ([]ListOrganizationNamesByIDsRow, error)
The names of the organizations one operator page names, in one read (#10), with each one's type, which the floor name reads. An id with no row is absent from the result.
func (*Queries) ListOrganizations ¶
func (q *Queries) ListOrganizations(ctx context.Context) ([]Organization, error)
func (*Queries) ListOrganizationsByType ¶
func (*Queries) ListOrganizationsPage ¶
func (q *Queries) ListOrganizationsPage(ctx context.Context, arg ListOrganizationsPageParams) ([]ListOrganizationsPageRow, error)
Organizations list operator surface (operator-list-scale UX-4): the paged, searched, org-type-filtered successor to ListOrganizationsWithOwner -- each row still carries its owner's display name so no organization can read as unowned (ux-honest-surfaces UX-16). owner_person_id is NOT NULL (every organization has an owner person, the System tenant included -- 00001_init.sql), so the LEFT JOIN is defensive rather than expected to ever drop the owner's name.
sqlc.narg(q): NULL matches every row; set, a case-insensitive substring match against the organization's name, or its owner's display name or primary email (operator-list-scale: "carries a scoped server-side search" -- "organizations: name and owner name or email"). sqlc.narg(org_type): NULL matches every org type; set, an exact facet match (operator-list-scale: "Status filters exist ... organizations: org type"). count(*) OVER() carries the true total for the filtered set alongside the page's rows (design D2), so the stated total never reflects only the page. Organization names are not unique, and organizations written in one transaction share created_at, so ties on the name fall to the organization id: it is time-ordered, which lists the later-written organization first, so each lists on exactly one page.
func (*Queries) LockOrgType ¶
Locks one org type's row against a concurrent edit of the type and the demonstration seed, without blocking an organization insert's key-share lock on it. The default change's commit reads the type under it.
func (*Queries) SearchOrganizationsByName ¶
func (q *Queries) SearchOrganizationsByName(ctx context.Context, arg SearchOrganizationsByNameParams) ([]SearchOrganizationsByNameRow, error)
Landing lookup's organization branch (entity-keys). Runs only when no person matches the lookup term; a dedicated query rather than ListOrganizationsPage because that query's owner-email term would blur the person/organization split the lookup depends on. Active organizations only, name substring match, bounded by LIMIT so a short term cannot return the whole table.
func (*Queries) UpdateOrgTypeDefaultPlanLadder ¶
type Role ¶
type Role struct {
RoleID string `json:"role_id"`
OrgID uuid.NullUUID `json:"org_id"`
RoleName string `json:"role_name"`
DisplayName string `json:"display_name"`
Description sql.NullString `json:"description"`
IsSystem bool `json:"is_system"`
Permissions []string `json:"permissions"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type RoleAssignment ¶
type RoleAssignment struct {
AssignmentID string `json:"assignment_id"`
RoleID string `json:"role_id"`
PersonID string `json:"person_id"`
OrgID string `json:"org_id"`
ScopeType string `json:"scope_type"`
ScopeID string `json:"scope_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type SearchOrganizationsByNameRow ¶
type SearchOrganizationsByNameRow struct {
OrgID string `json:"org_id"`
Name string `json:"name"`
OrgType string `json:"org_type"`
OwnerDisplayName sql.NullString `json:"owner_display_name"`
}
type Workspace ¶
type Workspace struct {
WorkspaceID string `json:"workspace_id"`
OrgID string `json:"org_id"`
Name string `json:"name"`
Key sql.NullString `json:"key"`
Description sql.NullString `json:"description"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}