"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/code.gitea.io/sdk/gitea/admin_cron.go" between
gitea-1.13.1.tar.gz and gitea-1.13.2.tar.gz

About: Gitea allows to set up a self-hosted code hosting Git service (a fork of Gogs).

admin_cron.go  (gitea-1.13.1):admin_cron.go  (gitea-1.13.2)
skipping to change at line 28 skipping to change at line 28
ExecTimes int64 `json:"exec_times"` ExecTimes int64 `json:"exec_times"`
} }
// ListCronTaskOptions list options for ListCronTasks // ListCronTaskOptions list options for ListCronTasks
type ListCronTaskOptions struct { type ListCronTaskOptions struct {
ListOptions ListOptions
} }
// ListCronTasks list available cron tasks // ListCronTasks list available cron tasks
func (c *Client) ListCronTasks(opt ListCronTaskOptions) ([]*CronTask, *Response, error) { func (c *Client) ListCronTasks(opt ListCronTaskOptions) ([]*CronTask, *Response, error) {
if err := c.CheckServerVersionConstraint(">=1.13.0"); err != nil { if err := c.checkServerVersionGreaterThanOrEqual(version1_13_0); err != n il {
return nil, nil, err return nil, nil, err
} }
opt.setDefaults() opt.setDefaults()
ct := make([]*CronTask, 0, opt.PageSize) ct := make([]*CronTask, 0, opt.PageSize)
resp, err := c.getParsedResponse("GET", fmt.Sprintf("/admin/cron?%s", opt .getURLQuery().Encode()), jsonHeader, nil, &ct) resp, err := c.getParsedResponse("GET", fmt.Sprintf("/admin/cron?%s", opt .getURLQuery().Encode()), jsonHeader, nil, &ct)
return ct, resp, err return ct, resp, err
} }
// RunCronTasks run a cron task // RunCronTasks run a cron task
func (c *Client) RunCronTasks(task string) (*Response, error) { func (c *Client) RunCronTasks(task string) (*Response, error) {
if err := c.CheckServerVersionConstraint(">=1.13.0"); err != nil { if err := c.checkServerVersionGreaterThanOrEqual(version1_13_0); err != n il {
return nil, err return nil, err
} }
_, resp, err := c.getResponse("POST", fmt.Sprintf("/admin/cron/%s", task) , jsonHeader, nil) _, resp, err := c.getResponse("POST", fmt.Sprintf("/admin/cron/%s", task) , jsonHeader, nil)
return resp, err return resp, err
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)