Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAssignToGroup indicates failure to assign member to a group. ErrAssignToGroup = errors.New("failed to assign member to a group") // ErrUnassignFromGroup indicates failure to unassign member from a group. ErrUnassignFromGroup = errors.New("failed to unassign member from a group") // ErrMissingParent indicates that parent can't be found. ErrMissingParent = errors.New("failed to retrieve parent") // ErrGroupNotEmpty indicates group is not empty, can't be deleted. ErrGroupNotEmpty = errors.New("group is not empty") // ErrMemberAlreadyAssigned indicates that members is already assigned. ErrMemberAlreadyAssigned = errors.New("member is already assigned") // ErrFailedToRetrieveMembers failed to retrieve group members. ErrFailedToRetrieveMembers = errors.New("failed to retrieve group members") // ErrFailedToRetrieveMembership failed to retrieve memberships. ErrFailedToRetrieveMembership = errors.New("failed to retrieve memberships") // ErrFailedToRetrieveAll failed to retrieve groups. ErrFailedToRetrieveAll = errors.New("failed to retrieve all groups") // ErrFailedToRetrieveParents failed to retrieve groups. ErrFailedToRetrieveParents = errors.New("failed to retrieve all groups") // ErrFailedToRetrieveChildren failed to retrieve groups. ErrFailedToRetrieveChildren = errors.New("failed to retrieve all groups") )
Functions ¶
func CreateMetadataQuery ¶
func HandleError ¶
Types ¶
type Database ¶
type Database interface { // NamedQueryContext executes a named query against the database and returns NamedQueryContext(context.Context, string, interface{}) (*sqlx.Rows, error) // NamedExecContext executes a named query against the database and returns NamedExecContext(context.Context, string, interface{}) (sql.Result, error) // QueryRowxContext queries the database and returns an *sqlx.Row. QueryRowxContext(context.Context, string, ...interface{}) *sqlx.Row // QueryxContext queries the database and returns an *sqlx.Rows and an error. QueryxContext(context.Context, string, ...interface{}) (*sqlx.Rows, error) // QueryContext queries the database and returns an *sql.Rows and an error. QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) // ExecContext executes a query without returning any rows. ExecContext(context.Context, string, ...interface{}) (sql.Result, error) // BeginTxx begins a transaction and returns an *sqlx.Tx. BeginTxx(ctx context.Context, opts *sql.TxOptions) (*sqlx.Tx, error) }
Database provides a database interface.
Click to show internal directories.
Click to hide internal directories.