Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigHandler ¶
type ConfigHandler struct { Find web.HandlerFunc `path:"/find" auth:"?" desc:"find config by id"` Save web.HandlerFunc `path:"/save" method:"post" auth:"config.edit" desc:"modify config"` }
ConfigHandler encapsulates config related handlers.
func NewConfig ¶
func NewConfig(store store.ConfigStore) *ConfigHandler
NewConfig creates an instance of ConfigHandler
type JobHandler ¶
type JobHandler struct { Search web.HandlerFunc `path:"/search" auth:"?" desc:"search jobs"` Find web.HandlerFunc `path:"/find" auth:"?" desc:"find job by id"` Retry web.HandlerFunc `path:"/retry" method:"post" auth:"job.exec" desc:"retry job"` }
JobHandler encapsulates job related handlers.
func NewJob ¶
func NewJob(store store.JobStore) *JobHandler
NewJob creates an instance of JobHandler
type RoleHandler ¶
type RoleHandler struct { Find web.HandlerFunc `path:"/find" auth:"?" desc:"find role by id"` Search web.HandlerFunc `path:"/search" auth:"?" desc:"search roles"` Save web.HandlerFunc `path:"/save" method:"post" auth:"role.save" desc:"create or update role"` Delete web.HandlerFunc `path:"/delete" method:"post" auth:"role.delete" desc:"delete role"` }
RoleHandler encapsulates user related handlers.
func NewRole ¶
func NewRole(s store.RoleStore) *RoleHandler
NewRole creates an instance of RoleHandler
type SystemHandler ¶
type SystemHandler struct { CheckState web.HandlerFunc `path:"/check-state" auth:"*" desc:"check system state"` InitDB web.HandlerFunc `path:"/init-db" method:"post" auth:"*" desc:"initialize database"` InitUser web.HandlerFunc `path:"/init-user" method:"post" auth:"*" desc:"initialize administrator account"` Summarize web.HandlerFunc `path:"/summarize" auth:"?" desc:"fetch statistics data"` }
SystemHandler encapsulates system related handlers.
type TaskHandler ¶
type TaskHandler struct { Search web.HandlerFunc `path:"/search" auth:"?" desc:"search tasks"` Find web.HandlerFunc `path:"/find" auth:"?" desc:"find task by name"` Save web.HandlerFunc `path:"/save" method:"post" auth:"task.edit" desc:"create or update task"` Delete web.HandlerFunc `path:"/delete" method:"post" auth:"task.delete" desc:"delete task"` Execute web.HandlerFunc `path:"/execute" method:"post" auth:"task.exec" desc:"execute task"` Notify web.HandlerFunc `path:"/notify" method:"post" auth:"*" desc:"notify execution result"` }
TaskHandler is a controller of task.
type UserHandler ¶
type UserHandler struct { SignIn web.HandlerFunc `path:"/sign-in" method:"post" auth:"*" desc:"user sign in"` Search web.HandlerFunc `path:"/search" auth:"?" desc:"search users"` Find web.HandlerFunc `path:"/find" auth:"?" desc:"find user by id"` Fetch web.HandlerFunc `path:"/fetch" auth:"?" desc:"fetch users by ids"` ModifyPassword web.HandlerFunc `path:"/modify-password" method:"post" auth:"?" desc:"modify password"` ModifyProfile web.HandlerFunc `path:"/modify-profile" method:"post" auth:"?" desc:"modify profile"` Save web.HandlerFunc `path:"/save" method:"post" auth:"user.edit" desc:"create or update user"` SetStatus web.HandlerFunc `path:"/set-status" method:"post" auth:"user.edit" desc:"set user status"` }
UserHandler encapsulates user related handlers.
func NewUser ¶
func NewUser(s store.UserStore) *UserHandler
NewUser creates an instance of UserHandler
Click to show internal directories.
Click to hide internal directories.