Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QueryAuthorizer ¶
type QueryAuthorizer struct {
Client *metaclient.Client
}
QueryAuthorizer determines whether a user is authorized to execute a given query.
func NewQueryAuthorizer ¶
func NewQueryAuthorizer(c *metaclient.Client) *QueryAuthorizer
NewQueryAuthorizer returns a new instance of QueryAuthorizer.
func (*QueryAuthorizer) AuthorizeDatabase ¶
func (*QueryAuthorizer) AuthorizeQuery ¶
AuthorizeQuery authorizes u to execute q on database. Database can be "" for queries that do not require a database. If no user is provided it will return an error unless the query's first statement is to create a root user.
type WriteAuthorizer ¶
type WriteAuthorizer struct {
Client *metaclient.Client
}
func NewWriteAuthorizer ¶
func NewWriteAuthorizer(c *metaclient.Client) *WriteAuthorizer
NewWriteAuthorizer returns a new instance of WriteAuthorizer.
func (WriteAuthorizer) AuthorizeWrite ¶
func (a WriteAuthorizer) AuthorizeWrite(username, database string) error
AuthorizeWrite returns nil if the user has permission to write to the database.
Click to show internal directories.
Click to hide internal directories.