manager

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBLogin

type DBLogin struct {
	LoginName   string
	PrincipalID string
}

type DBLoginUser

type DBLoginUser struct {
	LoginName string
	Database  string
}

type DBServerRole added in v0.2.0

type DBServerRole struct {
	Name string
	Role string
}

type DBUserRole

type DBUserRole struct {
	Name     string
	Database string
	Role     string
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func GetManager

func GetManager(connectionString string) Manager

func (*Manager) AddRole

func (manager *Manager) AddRole(context context.Context, username string, role string, database string) error

func (*Manager) CreateAADLogin

func (manager *Manager) CreateAADLogin(context context.Context, username string) error

func (*Manager) CreateExternalUser

func (manager *Manager) CreateExternalUser(context context.Context, username string, database string) error

func (*Manager) CreateLogin

func (manager *Manager) CreateLogin(context context.Context, username string, password string) error

func (*Manager) CreateLoginUser

func (manager *Manager) CreateLoginUser(context context.Context, username string, database string) error

func (*Manager) CreateUser

func (manager *Manager) CreateUser(context context.Context, username string, password string, database string) error

func (*Manager) DeleteLogin

func (manager *Manager) DeleteLogin(context context.Context, username string) error

func (*Manager) DeleteLoginUser

func (manager *Manager) DeleteLoginUser(context context.Context, username string, database string) error

func (*Manager) GetAADLogin

func (manager *Manager) GetAADLogin(context context.Context, username string) (*DBLogin, error)

func (*Manager) GetLogin

func (manager *Manager) GetLogin(context context.Context, username string) (*DBLogin, error)

func (*Manager) GetLoginUser

func (manager *Manager) GetLoginUser(context context.Context, username string, database string) (*DBLoginUser, error)

func (*Manager) GetServerRole added in v0.2.0

func (manager *Manager) GetServerRole(context context.Context, username string, role string) (*DBServerRole, error)

func (*Manager) GetUserWithRole

func (manager *Manager) GetUserWithRole(context context.Context, username string, role string, database string) (*DBUserRole, error)

func (*Manager) GrantServerRole added in v0.2.0

func (manager *Manager) GrantServerRole(context context.Context, username string, role string) error

func (*Manager) RemoveRole

func (manager *Manager) RemoveRole(context context.Context, username string, role string, database string) error

func (*Manager) RevokeServerRole added in v0.2.0

func (manager *Manager) RevokeServerRole(context context.Context, username string, role string) error

func (*Manager) UpdateLogin

func (manager *Manager) UpdateLogin(context context.Context, username string, password string) error

func (*Manager) UpdateUser added in v0.2.0

func (manager *Manager) UpdateUser(context context.Context, username string, password string, database string) error

Jump to

Keyboard shortcuts

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