sql

package
v0.0.0-...-f66e58f Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 13 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) 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) CreateRole

func (p *Provider) CreateRole(workspace, role, name, description string, permissions, users []string) 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) GetAuthData

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

func (p *Provider) GetRoles(workspace string) ([]rubix.Role, 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) 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) MutateRole

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

func (*Provider) MutateUser

func (p *Provider) MutateUser(workspace, user string, options ...rubix.MutateUserOption) 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) 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