Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBAdapter ¶
type DBAdapter interface { //Policy CreatePolicy(ctx *c.Context, pol *model.Policy) (*model.Policy, error) DeletePolicy(ctx *c.Context, id string) error UpdatePolicy(ctx *c.Context, pol *model.Policy) (*model.Policy, error) ListPolicy(ctx *c.Context) ([]model.Policy, error) GetPolicy(ctx *c.Context, id string) (*model.Policy, error) //Plan CreatePlan(ctx *c.Context, conn *model.Plan) (*model.Plan, error) DeletePlan(ctx *c.Context, name string) error UpdatePlan(ctx *c.Context, conn *model.Plan) (*model.Plan, error) ListPlan(ctx *c.Context, limit int, offset int, filter interface{}) ([]model.Plan, error) GetPlan(ctx *c.Context, id string) (*model.Plan, error) GetPlanByPolicy(ctx *c.Context, policyId string, limit int, offset int) ([]model.Plan, error) LockSched(planId string) int UnlockSched(planId string) int //Job CreateJob(ctx *c.Context, job *model.Job) (*model.Job, error) GetJob(ctx *c.Context, id string) (*model.Job, error) ListJob(ctx *c.Context, limit int, offset int, filter interface{}) ([]model.Job, error) }
var DbAdapter DBAdapter
C is a global variable that controls database module.
Click to show internal directories.
Click to hide internal directories.