Documentation
¶
Index ¶
- type ApplyProjectMemberProjectionParams
- type CreateTeamAPIKeyParams
- type CreateTeamMembershipIfMissingParams
- type CreateTeamMembershipParams
- type CreateTeamParams
- type CreateTeamRow
- type DBTX
- type DeleteTeamAPIKeyParams
- type DeleteTeamMemberParams
- type GetAutoJoinTeamsBySSOOrganizationIDRow
- type GetDefaultTeamByUserIDRow
- type GetTeamAPIKeysWithCreatorRow
- type GetTeamWithTierByAPIKeyRow
- type GetTeamWithTierByTeamAndUserParams
- type GetTeamWithTierByTeamAndUserRow
- type GetTeamWithTierByTeamIDRow
- type GetTeamsWithUsersTeamsRow
- type GetTeamsWithUsersTeamsWithTierForUpdateRow
- type GetTeamsWithUsersTeamsWithTierRow
- type GetUserIdentitiesBySubjectsParams
- type GetUserIdentitiesBySubjectsRow
- type GetUserIdentitiesByUserIDsAndIssuersParams
- type GetUserIdentitiesByUserIDsAndIssuersRow
- type GetUserIdentityParams
- type GetUserIdentityRow
- type InsertManagedTeamParams
- type InsertManagedTeamRow
- type Queries
- func (q *Queries) ApplyProjectMemberProjection(ctx context.Context, arg ApplyProjectMemberProjectionParams) (bool, error)
- func (q *Queries) CreateTeam(ctx context.Context, arg CreateTeamParams) (CreateTeamRow, error)
- func (q *Queries) CreateTeamAPIKey(ctx context.Context, arg CreateTeamAPIKeyParams) (TeamApiKey, error)
- func (q *Queries) CreateTeamMembership(ctx context.Context, arg CreateTeamMembershipParams) error
- func (q *Queries) CreateTeamMembershipIfMissing(ctx context.Context, arg CreateTeamMembershipIfMissingParams) error
- func (q *Queries) DeletePublicUser(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DeleteTeamAPIKey(ctx context.Context, arg DeleteTeamAPIKeyParams) ([]string, error)
- func (q *Queries) DeleteTeamByID(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DeleteTeamMember(ctx context.Context, arg DeleteTeamMemberParams) error
- func (q *Queries) GetAutoJoinTeamsBySSOOrganizationID(ctx context.Context, ssoOrganizationID uuid.UUID) ([]GetAutoJoinTeamsBySSOOrganizationIDRow, error)
- func (q *Queries) GetDefaultTeamByUserID(ctx context.Context, userID uuid.UUID) (GetDefaultTeamByUserIDRow, error)
- func (q *Queries) GetTeamAPIKeyHashes(ctx context.Context, teamID uuid.UUID) ([]string, error)
- func (q *Queries) GetTeamAPIKeysWithCreator(ctx context.Context, teamID uuid.UUID) ([]GetTeamAPIKeysWithCreatorRow, error)
- func (q *Queries) GetTeamMemberIDs(ctx context.Context, teamID uuid.UUID) ([]uuid.UUID, error)
- func (q *Queries) GetTeamWithTierByAPIKey(ctx context.Context, apiKeyHash string) (GetTeamWithTierByAPIKeyRow, error)
- func (q *Queries) GetTeamWithTierByTeamAndUser(ctx context.Context, arg GetTeamWithTierByTeamAndUserParams) (GetTeamWithTierByTeamAndUserRow, error)
- func (q *Queries) GetTeamWithTierByTeamID(ctx context.Context, id uuid.UUID) (GetTeamWithTierByTeamIDRow, error)
- func (q *Queries) GetTeamsWithUsersTeams(ctx context.Context, userID uuid.UUID) ([]GetTeamsWithUsersTeamsRow, error)
- func (q *Queries) GetTeamsWithUsersTeamsWithTier(ctx context.Context, userID uuid.UUID) ([]GetTeamsWithUsersTeamsWithTierRow, error)
- func (q *Queries) GetTeamsWithUsersTeamsWithTierForUpdate(ctx context.Context, userID uuid.UUID) ([]GetTeamsWithUsersTeamsWithTierForUpdateRow, error)
- func (q *Queries) GetUserIdentitiesBySubjects(ctx context.Context, arg GetUserIdentitiesBySubjectsParams) ([]GetUserIdentitiesBySubjectsRow, error)
- func (q *Queries) GetUserIdentitiesByUserIDsAndIssuers(ctx context.Context, arg GetUserIdentitiesByUserIDsAndIssuersParams) ([]GetUserIdentitiesByUserIDsAndIssuersRow, error)
- func (q *Queries) GetUserIdentity(ctx context.Context, arg GetUserIdentityParams) (GetUserIdentityRow, error)
- func (q *Queries) InsertManagedTeam(ctx context.Context, arg InsertManagedTeamParams) (InsertManagedTeamRow, error)
- func (q *Queries) LockManagedTeam(ctx context.Context, id uuid.UUID) (uuid.UUID, error)
- func (q *Queries) LockPublicUserForUpdate(ctx context.Context, id uuid.UUID) (uuid.UUID, error)
- func (q *Queries) UpdateLastTimeUsed(ctx context.Context, apiKeyHash string) error
- func (q *Queries) UpdateManagedTeam(ctx context.Context, arg UpdateManagedTeamParams) (UpdateManagedTeamRow, error)
- func (q *Queries) UpdateTeamApiKey(ctx context.Context, arg UpdateTeamApiKeyParams) (uuid.UUID, error)
- func (q *Queries) UpsertPublicIdentity(ctx context.Context, arg UpsertPublicIdentityParams) (uuid.UUID, error)
- func (q *Queries) UpsertPublicUser(ctx context.Context, id uuid.UUID) error
- func (q *Queries) UpsertTeamMember(ctx context.Context, arg UpsertTeamMemberParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type Team
- type TeamApiKey
- type TeamLimit
- type UpdateManagedTeamParams
- type UpdateManagedTeamRow
- type UpdateTeamApiKeyParams
- type UpsertPublicIdentityParams
- type UpsertTeamMemberParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateTeamAPIKeyParams ¶
type CreateTeamParams ¶
type CreateTeamRow ¶
type DeleteTeamMemberParams ¶
type GetAutoJoinTeamsBySSOOrganizationIDRow ¶
type GetAutoJoinTeamsBySSOOrganizationIDRow struct {
Team Team
}
type GetTeamsWithUsersTeamsWithTierForUpdateRow ¶
type GetTeamsWithUsersTeamsWithTierForUpdateRow struct {
ID uuid.UUID
CreatedAt time.Time
IsBlocked bool
Name string
Tier string
Email string
IsBanned bool
BlockedReason *string
ClusterID *uuid.UUID
SandboxSchedulingLabels []string
Slug string
IsDefault bool
ID_2 uuid.UUID
MaxLengthHours int64
ConcurrentSandboxes int64
ConcurrentTemplateBuilds int64
MaxVcpu int64
MaxRamMb int64
DiskMb int64
EventsTtlDays int64
}
type GetUserIdentityParams ¶
type GetUserIdentityRow ¶
type InsertManagedTeamParams ¶
type InsertManagedTeamRow ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) ApplyProjectMemberProjection ¶
func (*Queries) CreateTeam ¶
func (q *Queries) CreateTeam(ctx context.Context, arg CreateTeamParams) (CreateTeamRow, error)
func (*Queries) CreateTeamAPIKey ¶
func (q *Queries) CreateTeamAPIKey(ctx context.Context, arg CreateTeamAPIKeyParams) (TeamApiKey, error)
func (*Queries) CreateTeamMembership ¶
func (q *Queries) CreateTeamMembership(ctx context.Context, arg CreateTeamMembershipParams) error
func (*Queries) CreateTeamMembershipIfMissing ¶
func (q *Queries) CreateTeamMembershipIfMissing(ctx context.Context, arg CreateTeamMembershipIfMissingParams) error
func (*Queries) DeletePublicUser ¶
func (*Queries) DeleteTeamAPIKey ¶
func (*Queries) DeleteTeamByID ¶
func (*Queries) DeleteTeamMember ¶
func (q *Queries) DeleteTeamMember(ctx context.Context, arg DeleteTeamMemberParams) error
func (*Queries) GetAutoJoinTeamsBySSOOrganizationID ¶
func (*Queries) GetDefaultTeamByUserID ¶
func (*Queries) GetTeamAPIKeyHashes ¶
func (*Queries) GetTeamAPIKeysWithCreator ¶
func (*Queries) GetTeamMemberIDs ¶
GetTeamMemberIDs lists the users whose cached auth entry carries this team's data, so invalidating the team can reach all of them.
func (*Queries) GetTeamWithTierByAPIKey ¶
func (*Queries) GetTeamWithTierByTeamAndUser ¶
func (q *Queries) GetTeamWithTierByTeamAndUser(ctx context.Context, arg GetTeamWithTierByTeamAndUserParams) (GetTeamWithTierByTeamAndUserRow, error)
func (*Queries) GetTeamWithTierByTeamID ¶
func (*Queries) GetTeamsWithUsersTeams ¶
func (*Queries) GetTeamsWithUsersTeamsWithTier ¶
func (*Queries) GetTeamsWithUsersTeamsWithTierForUpdate ¶
func (*Queries) GetUserIdentitiesBySubjects ¶
func (q *Queries) GetUserIdentitiesBySubjects(ctx context.Context, arg GetUserIdentitiesBySubjectsParams) ([]GetUserIdentitiesBySubjectsRow, error)
func (*Queries) GetUserIdentitiesByUserIDsAndIssuers ¶
func (q *Queries) GetUserIdentitiesByUserIDsAndIssuers(ctx context.Context, arg GetUserIdentitiesByUserIDsAndIssuersParams) ([]GetUserIdentitiesByUserIDsAndIssuersRow, error)
func (*Queries) GetUserIdentity ¶
func (q *Queries) GetUserIdentity(ctx context.Context, arg GetUserIdentityParams) (GetUserIdentityRow, error)
func (*Queries) InsertManagedTeam ¶
func (q *Queries) InsertManagedTeam(ctx context.Context, arg InsertManagedTeamParams) (InsertManagedTeamRow, error)
Tier is assigned here and only here. DO NOTHING covers the case where the lock above found nothing and another request inserted the same id before this ran: no row means that happened. A slug collision is a different constraint and still raises.
func (*Queries) LockManagedTeam ¶
Project reconciliation for the control-plane management interface. The caller supplies the id, so create and reconcile are one request and these are its branches. Taken first, so the branch is decided by whether the project exists rather than by an insert failing.
func (*Queries) LockPublicUserForUpdate ¶
func (*Queries) UpdateLastTimeUsed ¶
func (*Queries) UpdateManagedTeam ¶
func (q *Queries) UpdateManagedTeam(ctx context.Context, arg UpdateManagedTeamParams) (UpdateManagedTeamRow, error)
Touches only the properties the caller synchronizes. Tier stays because it is this side's to assign; is_blocked stays because an operator's decision must outlive a routine push.
func (*Queries) UpdateTeamApiKey ¶
func (*Queries) UpsertPublicIdentity ¶
func (*Queries) UpsertPublicUser ¶
func (*Queries) UpsertTeamMember ¶
func (q *Queries) UpsertTeamMember(ctx context.Context, arg UpsertTeamMemberParams) error
type TeamApiKey ¶
type UpdateManagedTeamParams ¶
type UpdateManagedTeamRow ¶
type UpdateTeamApiKeyParams ¶
Source Files
¶
- create_team_api_key.sql.go
- db.go
- delete_public_user.sql.go
- delete_team_api_key.sql.go
- get_api_keys.sql.go
- get_team.sql.go
- get_team_api_key_hashes.sql.go
- get_team_member_ids.sql.go
- get_user_identities_by_subjects.sql.go
- get_user_identities_by_user_ids.sql.go
- get_user_identity.sql.go
- lock_public_user_for_update.sql.go
- models.go
- project_member_projections.sql.go
- team_creation_guard.sql.go
- team_lifecycle.sql.go
- team_management.sql.go
- team_membership_sync.sql.go
- teams_usersteams_join.sql.go
- update_last_time_used.sql.go
- update_team_api_key.sql.go
- upsert_public_identity.sql.go
- upsert_public_user.sql.go