Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) GetDatabase(ctx context.Context, id int64) (*DbModel, error)
- func (c *Client) GetServer(ctx context.Context) (*ServerModel, error)
- func (c *Client) GetServerPrincipalForDatabasePrincipal(ctx context.Context, dbName string, principalID int64) (*UserModel, error)
- func (c *Client) ListDatabasePermissions(ctx context.Context, dbName string, pager *Pager) ([]*PermissionModel, string, error)
- func (c *Client) ListDatabaseRolePrincipals(ctx context.Context, dbName string, databaseRoleID string, pager *Pager) ([]*RolePrincipalModel, string, error)
- func (c *Client) ListDatabaseRoles(ctx context.Context, dbName string, pager *Pager) ([]*RoleModel, string, error)
- func (c *Client) ListDatabaseUserPrincipals(ctx context.Context, dbName string, pager *Pager) ([]*UserModel, string, error)
- func (c *Client) ListDatabases(ctx context.Context, pager *Pager) ([]*DbModel, string, error)
- func (c *Client) ListGroupPrincipals(ctx context.Context, pager *Pager) ([]*GroupModel, string, error)
- func (c *Client) ListServerPermissions(ctx context.Context, pager *Pager) ([]*PermissionModel, string, error)
- func (c *Client) ListServerRolePrincipals(ctx context.Context, serverRoleID string, pager *Pager) ([]*RolePrincipalModel, string, error)
- func (c *Client) ListServerRoles(ctx context.Context, pager *Pager) ([]*RoleModel, string, error)
- func (c *Client) ListServerUserPrincipals(ctx context.Context, pager *Pager) ([]*UserModel, string, error)
- type DbModel
- type GroupModel
- type Pager
- type PermissionModel
- type RoleModel
- type RolePrincipalModel
- type ServerModel
- type UserModel
Constants ¶
View Source
const ( MaxPageSize = 100 MinPageSize = 10 )
View Source
const ( UserType = "user" DatabaseUserType = "database-user" )
View Source
const DatabaseRoleType = "database-role"
View Source
const DatabaseType = "database"
View Source
const GroupType = "group"
View Source
const ServerRoleType = "server-role"
View Source
const ServerType = "server"
Variables ¶
View Source
var ErrNoServerPrincipal = errors.New("no server principal found")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetDatabase ¶
func (*Client) GetServerPrincipalForDatabasePrincipal ¶
func (c *Client) GetServerPrincipalForDatabasePrincipal(ctx context.Context, dbName string, principalID int64) (*UserModel, error)
GetServerPrincipalForDatabasePrincipal returns the server principal for a given database user. Returns ErrNoServerPrincipal if no server principal is found.
func (*Client) ListDatabasePermissions ¶
func (*Client) ListDatabaseRolePrincipals ¶
func (*Client) ListDatabaseRoles ¶
func (*Client) ListDatabaseUserPrincipals ¶
func (*Client) ListDatabases ¶
func (*Client) ListGroupPrincipals ¶
func (*Client) ListServerPermissions ¶
func (*Client) ListServerRolePrincipals ¶
func (*Client) ListServerRoles ¶
type GroupModel ¶
type PermissionModel ¶
type RolePrincipalModel ¶
type ServerModel ¶
type ServerModel struct {
Name string `db:"ServerName"`
}
Click to show internal directories.
Click to hide internal directories.