privilege

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	// Execute executes given command and placeholders on the middleware
	Execute(command string, args ...interface{}) (middleware.Result, error)
	// GetMySQLClusterIDListByLoginName gets mysql cluster id list by login name
	GetMySQLClusterIDListByLoginName(loginName string) ([]int, error)
	// GetMySQLClusterIDByMySQLServerID gets mysql cluster id by mysql server id
	GetMySQLClusterIDByMySQLServerID(mysqlServerID int) (int, error)
	// GetMySQLClusterIDByHostInfo gets mysql cluster id by mysql server host ip and port number
	GetMySQLClusterIDByHostInfo(hostIP string, portNum int) (int, error)
	// GetMySQLClusterIDByDBID gets mysql cluster id by db id
	GetMySQLClusterIDByDBID(dbID int) (int, error)
	// GetUserRoleByLoginName get user role by login name
	GetUserRoleByLoginName(loginName string) (int, error)
}

type Service

type Service interface {
	// GetLoginName returns the login name
	GetLoginName() string
	// CheckMySQLClusterByID checks if given user has privilege to the mysql cluster with mysql cluster id
	CheckMySQLClusterByID(mysqlClusterID int) error
	// CheckMySQLServerByID checks if given user has privilege to the mysql server with mysql server id
	CheckMySQLServerByID(mysqlServerID int) error
	// CheckMySQLServerByHostInfo checks if given user has privilege to the mysql server with host ip and port number
	CheckMySQLServerByHostInfo(hostIP string, portNum int) error
	// CheckDBByID checks if given user has privilege to the database with db id
	CheckDBByID(dbID int) error
}

Jump to

Keyboard shortcuts

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