sql

package
v0.0.0-...-ac187ea Latest Latest
Warning

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

Go to latest
Published: Jan 6, 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) AddUserToWorkspace

func (p *Provider) AddUserToWorkspace(workspaceID, userID string, as rubix.MembershipType, partnerId string) 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) Connect

func (p *Provider) Connect() 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) CreateRole

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

func (*Provider) CreateTeam

func (p *Provider) CreateTeam(workspace, team, name, description string, users map[string]rubix.TeamLevel) 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) DeleteRole

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

func (*Provider) DeleteTeam

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

func (*Provider) GetAuthData

func (p *Provider) GetAuthData(workspaceUuid, userUuid string, appIDs ...app.GlobalAppID) ([]rubix.DataResult, 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) GetPermissionStatements

func (p *Provider) GetPermissionStatements(lookup rubix.Lookup, permissions ...app.ScopedKey) ([]app.PermissionStatement, 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) 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) 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) Initialize

func (p *Provider) Initialize() 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) MutateRole

func (p *Provider) MutateRole(workspace, role string, options ...rubix.MutateRoleOption) 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) 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) 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) 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) Sync

func (p *Provider) Sync() 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