sql

package
v0.0.0-...-3bd6fd8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderKey = "sql"

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	PrimaryDSN string `json:"primaryDsn"` // user:password@tcp(hostname:port)
	Database   string `json:"database"`
	SqlLite    bool   `json:"sqlLite"`
	// contains filtered or unexported fields
}

func FromJson

func FromJson(data []byte) (*Provider, error)

func (*Provider) AddRoleResources

func (p *Provider) AddRoleResources(workspace, role string, resources ...rubix.RoleResource) error

func (*Provider) AddSCIMActivityLog

func (p *Provider) AddSCIMActivityLog(workspace string, entry rubix.SCIMActivityLog) error

func (*Provider) AddUserToWorkspace

func (p *Provider) AddUserToWorkspace(workspaceID, userID string, as rubix.MembershipType, partnerId string, source ...rubix.MembershipSource) error

func (*Provider) AfterUpdate

func (p *Provider) AfterUpdate(exec func()) error

func (*Provider) ClearUserStatusID

func (p *Provider) ClearUserStatusID(workspaceUuid, userUuid, statusID string) error

func (*Provider) ClearUserStatusLogout

func (p *Provider) ClearUserStatusLogout(workspaceUuid, userUuid string) error

func (*Provider) Close

func (p *Provider) Close() error

func (*Provider) CompleteActivationStep

func (p *Provider) CompleteActivationStep(workspace, user, vendor, app, stepID string) error

func (*Provider) Connect

func (p *Provider) Connect() error

func (*Provider) ConnectionPing

func (p *Provider) ConnectionPing() error

func (*Provider) ConnectionStats

func (p *Provider) ConnectionStats() sql.DBStats

func (*Provider) CreateBPO

func (p *Provider) CreateBPO(workspace, bpo, name, description string) error

func (*Provider) CreateBrand

func (p *Provider) CreateBrand(workspace, brand, name, description string) error

func (*Provider) CreateChannel

func (p *Provider) CreateChannel(workspace, channel, department, name, description string) error

func (*Provider) CreateDepartment

func (p *Provider) CreateDepartment(workspace, department, name, description string) error

func (*Provider) CreateDistributor

func (p *Provider) CreateDistributor(workspace, distributor, name, description string) error

func (*Provider) CreateIPGroup

func (p *Provider) CreateIPGroup(workspace string, group rubix.IPGroup) error

func (*Provider) CreateOIDCProvider

func (p *Provider) CreateOIDCProvider(workspace string, provider rubix.OIDCProvider) error

func (*Provider) CreateRole

func (p *Provider) CreateRole(workspace, role, name, description string, permissions, users []string, conditions rubix.Condition, scimManaged bool) error

func (*Provider) CreateServiceProvider

func (p *Provider) CreateServiceProvider(workspace string, sp rubix.ServiceProvider) error

func (*Provider) CreateTeam

func (p *Provider) CreateTeam(workspace, team, name, description string, users map[string]rubix.TeamLevel, scimManaged bool) error

func (*Provider) CreateUser

func (p *Provider) CreateUser(userID, name, email string) error

func (*Provider) CreateWorkspace

func (p *Provider) CreateWorkspace(workspaceUuid, name, alias, domain string) error

func (*Provider) CreateWorkspaceUser

func (p *Provider) CreateWorkspaceUser(workspace string, user rubix.WorkspaceUser) error

func (*Provider) DatabaseName

func (p *Provider) DatabaseName() string

func (*Provider) DeleteIPGroup

func (p *Provider) DeleteIPGroup(workspace, groupID string) error

func (*Provider) DeleteOIDCProvider

func (p *Provider) DeleteOIDCProvider(workspace, uuid string) error

func (*Provider) DeleteRole

func (p *Provider) DeleteRole(workspace, role string) error

func (*Provider) DeleteServiceProvider

func (p *Provider) DeleteServiceProvider(workspace, serviceID string) error

func (*Provider) DeleteTeam

func (p *Provider) DeleteTeam(workspace, team string) error

func (*Provider) DeleteWorkspaceUser

func (p *Provider) DeleteWorkspaceUser(workspace, userID string) error

func (*Provider) GetActivationState

func (p *Provider) GetActivationState(workspace, user, vendor, app string) ([]rubix.ActivationState, error)

func (*Provider) GetAuthData

func (p *Provider) GetAuthData(workspaceUuid, userUuid string, appIDs ...app.GlobalAppID) ([]rubix.DataResult, error)

func (*Provider) GetBPO

func (p *Provider) GetBPO(workspace, bpo string) (*rubix.BPO, error)

--- BPOs ---

func (*Provider) GetBPOManagers

func (p *Provider) GetBPOManagers(workspace, bpo string) ([]string, error)

func (*Provider) GetBPORoles

func (p *Provider) GetBPORoles(workspace, bpo string) ([]string, error)

func (*Provider) GetBPOTeams

func (p *Provider) GetBPOTeams(workspace, bpo string) ([]string, error)

func (*Provider) GetBPOs

func (p *Provider) GetBPOs(workspace string) ([]rubix.BPO, error)

func (*Provider) GetBlueprint

func (p *Provider) GetBlueprint(vendorID, appID, blueprintID string) (*rubix.Blueprint, error)

func (*Provider) GetBlueprintVersion

func (p *Provider) GetBlueprintVersion(vendorID, appID, blueprintID, version string) (*rubix.BlueprintVersion, error)

func (*Provider) GetBlueprintVersions

func (p *Provider) GetBlueprintVersions(vendorID, appID, blueprintID string) ([]rubix.BlueprintVersion, error)

func (*Provider) GetBlueprints

func (p *Provider) GetBlueprints() ([]rubix.Blueprint, error)

func (*Provider) GetBrand

func (p *Provider) GetBrand(workspace, brand string) (*rubix.Brand, error)

--- Brands ---

func (*Provider) GetBrands

func (p *Provider) GetBrands(workspace string) ([]rubix.Brand, error)

func (*Provider) GetChannel

func (p *Provider) GetChannel(workspace, channel string) (*rubix.Channel, error)

--- Channels ---

func (*Provider) GetChannels

func (p *Provider) GetChannels(workspace string) ([]rubix.Channel, error)

func (*Provider) GetDepartment

func (p *Provider) GetDepartment(workspace, department string) (*rubix.Department, error)

--- Departments ---

func (*Provider) GetDepartments

func (p *Provider) GetDepartments(workspace string) ([]rubix.Department, error)

func (*Provider) GetDistributor

func (p *Provider) GetDistributor(workspace, distributor string) (*rubix.Distributor, error)

--- Distributors ---

func (*Provider) GetDistributors

func (p *Provider) GetDistributors(workspace string) ([]rubix.Distributor, error)

func (*Provider) GetIPGroup

func (p *Provider) GetIPGroup(workspace, groupID string) (*rubix.IPGroup, error)

--- IP Groups ---

func (*Provider) GetIPGroups

func (p *Provider) GetIPGroups(workspace string) ([]rubix.IPGroup, error)

func (*Provider) GetManagedBPOs

func (p *Provider) GetManagedBPOs(workspace, user string) ([]string, error)

func (*Provider) GetOIDCProvider

func (p *Provider) GetOIDCProvider(workspace, uuid string) (*rubix.OIDCProvider, error)

func (*Provider) GetOIDCProviders

func (p *Provider) GetOIDCProviders(workspace string) ([]rubix.OIDCProvider, error)

--- OIDC Providers ---

func (*Provider) GetPermissionStatements

func (p *Provider) GetPermissionStatements(lookup rubix.Lookup, permissions ...app.ScopedKey) ([]app.PermissionStatement, error)

func (*Provider) GetPlatformApplications

func (p *Provider) GetPlatformApplications() ([]rubix.PlatformApplication, error)

func (*Provider) GetPlatformVendors

func (p *Provider) GetPlatformVendors() ([]rubix.PlatformVendor, error)

func (*Provider) GetResolvedMembers

func (p *Provider) GetResolvedMembers(workspace string, filter rubix.MemberFilter) ([]rubix.ResolvedMember, error)

func (*Provider) GetRole

func (p *Provider) GetRole(workspace, role string) (*rubix.Role, error)

func (*Provider) GetRolePermissions

func (p *Provider) GetRolePermissions(workspace, role string) ([]rubix.RolePermission, error)

func (*Provider) GetRoleResources

func (p *Provider) GetRoleResources(workspace, role string) ([]rubix.RoleResource, error)

--- Role Resources ---

func (*Provider) GetRoles

func (p *Provider) GetRoles(workspace string) ([]rubix.Role, error)

func (*Provider) GetSCIMActivityLog

func (p *Provider) GetSCIMActivityLog(workspace, providerUUID string, limit int) ([]rubix.SCIMActivityLog, error)

--- SCIM Activity Log ---

func (*Provider) GetServiceProvider

func (p *Provider) GetServiceProvider(workspace, serviceID string) (*rubix.ServiceProvider, error)

func (*Provider) GetServiceProviders

func (p *Provider) GetServiceProviders(workspace string) ([]rubix.ServiceProvider, error)

func (*Provider) GetServiceProvidersByType

func (p *Provider) GetServiceProvidersByType(workspace, serviceProvider string) ([]rubix.ServiceProvider, error)

func (*Provider) GetSettings

func (p *Provider) GetSettings(workspace, vendor, app string, keys ...string) ([]rubix.Setting, error)

func (*Provider) GetTeam

func (p *Provider) GetTeam(workspace, team string) (*rubix.Team, error)

func (*Provider) GetTeams

func (p *Provider) GetTeams(workspace string) ([]rubix.Team, error)

func (*Provider) GetUserRoleIDs

func (p *Provider) GetUserRoleIDs(workspace, user string) ([]string, error)

func (*Provider) GetUserRoles

func (p *Provider) GetUserRoles(workspace, user string) ([]rubix.UserRole, error)

func (*Provider) GetUserStatus

func (p *Provider) GetUserStatus(workspaceUuid, userUuid string) (rubix.UserStatus, error)

func (*Provider) GetUserTeams

func (p *Provider) GetUserTeams(workspace, user string) ([]rubix.UserTeam, error)

func (*Provider) GetUserWorkspaceUUIDs

func (p *Provider) GetUserWorkspaceUUIDs(userId string) ([]string, error)

func (*Provider) GetWorkspaceApplications

func (p *Provider) GetWorkspaceApplications(workspaceUuid string) ([]app.ScopedKey, error)

func (*Provider) GetWorkspaceBlueprintResources

func (p *Provider) GetWorkspaceBlueprintResources(workspaceUUID, vendorID, appID, blueprintID string) ([]rubix.WorkspaceBlueprintResource, error)

func (*Provider) GetWorkspaceBlueprints

func (p *Provider) GetWorkspaceBlueprints(workspaceUUID string) ([]rubix.WorkspaceBlueprint, error)

func (*Provider) GetWorkspaceMembers

func (p *Provider) GetWorkspaceMembers(workspaceUuid string, userIDs ...string) ([]rubix.Membership, error)

GetWorkspaceMembers - userID is optional

func (*Provider) GetWorkspaceUUIDByAlias

func (p *Provider) GetWorkspaceUUIDByAlias(alias string) (string, error)

func (*Provider) GetWorkspaceUser

func (p *Provider) GetWorkspaceUser(workspace, userID string) (*rubix.WorkspaceUser, error)

func (*Provider) GetWorkspaceUsersByProvider

func (p *Provider) GetWorkspaceUsersByProvider(workspace, providerUUID string) ([]rubix.WorkspaceUser, error)

func (*Provider) Initialize

func (p *Provider) Initialize() error

func (*Provider) MigrateOIDCUsersToWorkspaceUsers

func (p *Provider) MigrateOIDCUsersToWorkspaceUsers() error

func (*Provider) MigrationCount

func (p *Provider) MigrationCount() (int, error)

func (*Provider) MutateBPO

func (p *Provider) MutateBPO(workspace, bpo string, options ...rubix.MutateBPOOption) error

func (*Provider) MutateBrand

func (p *Provider) MutateBrand(workspace, brand string, options ...rubix.MutateBrandOption) error

func (*Provider) MutateChannel

func (p *Provider) MutateChannel(workspace, channel string, options ...rubix.MutateChannelOption) error

func (*Provider) MutateDepartment

func (p *Provider) MutateDepartment(workspace, department string, options ...rubix.MutateDepartmentOption) error

func (*Provider) MutateDistributor

func (p *Provider) MutateDistributor(workspace, distributor string, options ...rubix.MutateDistributorOption) error

func (*Provider) MutateIPGroup

func (p *Provider) MutateIPGroup(workspace, groupID string, options ...rubix.MutateIPGroupOption) error

func (*Provider) MutateOIDCProvider

func (p *Provider) MutateOIDCProvider(workspace, uuid string, options ...rubix.MutateOIDCProviderOption) error

func (*Provider) MutateRole

func (p *Provider) MutateRole(workspace, role string, options ...rubix.MutateRoleOption) error

func (*Provider) MutateServiceProvider

func (p *Provider) MutateServiceProvider(workspace, serviceID string, options ...rubix.MutateServiceProviderOption) error

func (*Provider) MutateTeam

func (p *Provider) MutateTeam(workspace, team string, options ...rubix.MutateTeamOption) error

func (*Provider) MutateUser

func (p *Provider) MutateUser(workspace, user string, options ...rubix.MutateUserOption) error

func (*Provider) RemoveBlueprint

func (p *Provider) RemoveBlueprint(vendorID, appID, blueprintID string) error

func (*Provider) RemovePlatformApplication

func (p *Provider) RemovePlatformApplication(vendorID, appID, releaseChannel string) error

func (*Provider) RemovePlatformVendor

func (p *Provider) RemovePlatformVendor(vendorID string) error

func (*Provider) RemoveRoleResources

func (p *Provider) RemoveRoleResources(workspace, role string, resources ...rubix.RoleResource) error

func (*Provider) RemoveUserFromWorkspace

func (p *Provider) RemoveUserFromWorkspace(workspace, user string) error

func (*Provider) RemoveWorkspaceApplication

func (p *Provider) RemoveWorkspaceApplication(workspaceUuid, vendorID, appID string) error

func (*Provider) RemoveWorkspaceBlueprintResource

func (p *Provider) RemoveWorkspaceBlueprintResource(workspaceUUID, vendorID, appID, blueprintID, resourceType, resourceKey string) error

func (*Provider) ResetActivationSteps

func (p *Provider) ResetActivationSteps(workspace, vendor, app string) error

func (*Provider) RetrieveWorkspace

func (p *Provider) RetrieveWorkspace(workspaceUuid string) (*rubix.Workspace, error)

func (*Provider) RetrieveWorkspaceByDomain

func (p *Provider) RetrieveWorkspaceByDomain(domain string) (*rubix.Workspace, error)

func (*Provider) RetrieveWorkspaces

func (p *Provider) RetrieveWorkspaces(workspaceUuids ...string) (map[string]*rubix.Workspace, error)

func (*Provider) SetAuthData

func (p *Provider) SetAuthData(workspaceUuid, userUuid string, value rubix.DataResult, forceUpdate bool) error

func (*Provider) SetBPOManagers

func (p *Provider) SetBPOManagers(workspace, bpo string, users []string) error

func (*Provider) SetBPORoles

func (p *Provider) SetBPORoles(workspace, bpo string, roles []string) error

func (*Provider) SetBPOTeams

func (p *Provider) SetBPOTeams(workspace, bpo string, teams []string) error

func (*Provider) SetMemberPartnerID

func (p *Provider) SetMemberPartnerID(workspace, user, partnerID string) error

func (*Provider) SetMembershipState

func (p *Provider) SetMembershipState(workspace, user string, userState rubix.MembershipState) error

func (*Provider) SetMembershipType

func (p *Provider) SetMembershipType(workspace, user string, MembershipType rubix.MembershipType) error

func (*Provider) SetSetting

func (p *Provider) SetSetting(workspace, vendor, app, key, value string) error

func (*Provider) SetUserStatus

func (p *Provider) SetUserStatus(workspaceUuid, userUuid string, status rubix.UserStatus) (bool, error)

func (*Provider) SetWorkspaceAccessCondition

func (p *Provider) SetWorkspaceAccessCondition(workspaceUuid string, condition rubix.Condition) error

func (*Provider) SetWorkspaceApplication

func (p *Provider) SetWorkspaceApplication(workspaceUuid, vendorID, appID, releaseChannel string) error

func (*Provider) SetWorkspaceBlueprintResource

func (p *Provider) SetWorkspaceBlueprintResource(resource rubix.WorkspaceBlueprintResource) error

func (*Provider) SetWorkspaceDefaultApp

func (p *Provider) SetWorkspaceDefaultApp(workspaceUuid string, defaultApp string) error

func (*Provider) SetWorkspaceEmailDomainApproval

func (p *Provider) SetWorkspaceEmailDomainApproval(workspaceUuid string, approval map[string]string) error

func (*Provider) SetWorkspaceEmailDomainWhitelist

func (p *Provider) SetWorkspaceEmailDomainWhitelist(workspaceUuid string, domains []string) error

func (*Provider) SetWorkspaceIcon

func (p *Provider) SetWorkspaceIcon(workspaceUuid, icon string) error

func (*Provider) SetWorkspaceInstalledApplications

func (p *Provider) SetWorkspaceInstalledApplications(workspaceUuid string, apps []app.ScopedKey) error

func (*Provider) SetWorkspaceMemberApprovalMode

func (p *Provider) SetWorkspaceMemberApprovalMode(workspaceUuid string, mode string) error

func (*Provider) SetWorkspaceMetricTickers

func (p *Provider) SetWorkspaceMetricTickers(workspaceUuid string, tickers rubix.MetricTickers) error

func (*Provider) SetWorkspaceName

func (p *Provider) SetWorkspaceName(workspaceUuid, name string) error

func (*Provider) SetWorkspaceSystemVendors

func (p *Provider) SetWorkspaceSystemVendors(workspaceUuid string, vendors []string) error

func (*Provider) StorageType

func (p *Provider) StorageType() string

func (*Provider) StoreBlueprint

func (p *Provider) StoreBlueprint(blueprint rubix.Blueprint) error

func (*Provider) StoreBlueprintVersion

func (p *Provider) StoreBlueprintVersion(version rubix.BlueprintVersion) error

func (*Provider) StorePlatformApplication

func (p *Provider) StorePlatformApplication(application rubix.PlatformApplication) error

func (*Provider) StorePlatformVendor

func (p *Provider) StorePlatformVendor(vendor rubix.PlatformVendor) error

func (*Provider) SubscribeWorkspaceBlueprint

func (p *Provider) SubscribeWorkspaceBlueprint(sub rubix.WorkspaceBlueprint) error

func (*Provider) Sync

func (p *Provider) Sync() error

func (*Provider) UnsubscribeWorkspaceBlueprint

func (p *Provider) UnsubscribeWorkspaceBlueprint(workspaceUUID, vendorID, appID, blueprintID string) error

func (*Provider) UpdateWorkspaceBlueprintStatus

func (p *Provider) UpdateWorkspaceBlueprintStatus(workspaceUUID, vendorID, appID, blueprintID, status string) error

func (*Provider) UpdateWorkspaceBlueprintVersion

func (p *Provider) UpdateWorkspaceBlueprintVersion(workspaceUUID, vendorID, appID, blueprintID, version string) error

func (*Provider) UpdateWorkspaceUser

func (p *Provider) UpdateWorkspaceUser(workspace, userID string, opts ...rubix.MutateWorkspaceUserOption) error

func (*Provider) UserHasPermission

func (p *Provider) UserHasPermission(lookup rubix.Lookup, permissions ...app.ScopedKey) (bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL