Documentation ¶
Index ¶
- Constants
- type ArchivesHandler
- type CacheCreateHandler
- type CacheHandler
- type ChangeGroupsUpdateTokensHandler
- type Client
- func (c *Client) ApproveRunTask(ctx context.Context, runID, taskID string, changeGroupsUpdateToken string) (*http.Response, error)
- func (c *Client) CheckCache(ctx context.Context, key string, prefix bool) (*http.Response, error)
- func (c *Client) CreateRun(ctx context.Context, req *RunCreateRequest) (*RunResponse, *http.Response, error)
- func (c *Client) GetArchive(ctx context.Context, taskID string, step int) (*http.Response, error)
- func (c *Client) GetCache(ctx context.Context, key string, prefix bool) (*http.Response, error)
- func (c *Client) GetExecutorTask(ctx context.Context, executorID, etID string) (*rstypes.ExecutorTask, *http.Response, error)
- func (c *Client) GetExecutorTasks(ctx context.Context, executorID string) ([]*rstypes.ExecutorTask, *http.Response, error)
- func (c *Client) GetGroupFirstQueuedRuns(ctx context.Context, group string, changeGroups []string) (*GetRunsResponse, *http.Response, error)
- func (c *Client) GetGroupLastRun(ctx context.Context, group string, changeGroups []string) (*GetRunsResponse, *http.Response, error)
- func (c *Client) GetGroupQueuedRuns(ctx context.Context, group string, limit int, changeGroups []string) (*GetRunsResponse, *http.Response, error)
- func (c *Client) GetGroupRunningRuns(ctx context.Context, group string, limit int, changeGroups []string) (*GetRunsResponse, *http.Response, error)
- func (c *Client) GetLogs(ctx context.Context, runID, taskID string, setup bool, step int, follow bool) (*http.Response, error)
- func (c *Client) GetQueuedRuns(ctx context.Context, start string, limit int, changeGroups []string) (*GetRunsResponse, *http.Response, error)
- func (c *Client) GetRun(ctx context.Context, runID string, changeGroups []string) (*RunResponse, *http.Response, error)
- func (c *Client) GetRunEvents(ctx context.Context, startRunEventID string) (*http.Response, error)
- func (c *Client) GetRunningRuns(ctx context.Context, start string, limit int, changeGroups []string) (*GetRunsResponse, *http.Response, error)
- func (c *Client) GetRuns(ctx context.Context, phaseFilter, resultFilter, groups []string, lastRun bool, ...) (*GetRunsResponse, *http.Response, error)
- func (c *Client) PutCache(ctx context.Context, key string, size int64, r io.Reader) (*http.Response, error)
- func (c *Client) RunActions(ctx context.Context, runID string, req *RunActionsRequest) (*http.Response, error)
- func (c *Client) RunTaskActions(ctx context.Context, runID, taskID string, req *RunTaskActionsRequest) (*http.Response, error)
- func (c *Client) RunTaskSetAnnotations(ctx context.Context, runID, taskID string, annotations map[string]string, ...) (*http.Response, error)
- func (c *Client) SendExecutorStatus(ctx context.Context, executor *rstypes.Executor) (*http.Response, error)
- func (c *Client) SendExecutorTaskStatus(ctx context.Context, executorID string, et *rstypes.ExecutorTask) (*http.Response, error)
- func (c *Client) SetHTTPClient(client *http.Client)
- func (c *Client) StartRun(ctx context.Context, runID string, changeGroupsUpdateToken string) (*http.Response, error)
- type ErrorResponse
- type ExecutorDeleteHandler
- type ExecutorStatusHandler
- type ExecutorTaskHandler
- type ExecutorTaskStatusHandler
- type ExecutorTasksHandler
- type GetRunsResponse
- type LogsHandler
- type RunActionType
- type RunActionsHandler
- type RunActionsRequest
- type RunCreateHandler
- type RunCreateRequest
- type RunEventsHandler
- type RunHandler
- type RunResponse
- type RunTaskActionType
- type RunTaskActionsHandler
- type RunTaskActionsRequest
- type RunsHandler
Constants ¶
View Source
const ( DefaultRunsLimit = 25 MaxRunsLimit = 40 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchivesHandler ¶
type ArchivesHandler struct {
// contains filtered or unexported fields
}
func NewArchivesHandler ¶
func NewArchivesHandler(logger *zap.Logger, ost *objectstorage.ObjStorage) *ArchivesHandler
func (*ArchivesHandler) ServeHTTP ¶
func (h *ArchivesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type CacheCreateHandler ¶
type CacheCreateHandler struct {
// contains filtered or unexported fields
}
func NewCacheCreateHandler ¶
func NewCacheCreateHandler(logger *zap.Logger, ost *objectstorage.ObjStorage) *CacheCreateHandler
func (*CacheCreateHandler) ServeHTTP ¶
func (h *CacheCreateHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type CacheHandler ¶
type CacheHandler struct {
// contains filtered or unexported fields
}
func NewCacheHandler ¶
func NewCacheHandler(logger *zap.Logger, ost *objectstorage.ObjStorage) *CacheHandler
func (*CacheHandler) ServeHTTP ¶
func (h *CacheHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ChangeGroupsUpdateTokensHandler ¶
type ChangeGroupsUpdateTokensHandler struct {
// contains filtered or unexported fields
}
func NewChangeGroupsUpdateTokensHandler ¶
func NewChangeGroupsUpdateTokensHandler(logger *zap.Logger, readDB *readdb.ReadDB) *ChangeGroupsUpdateTokensHandler
func (*ChangeGroupsUpdateTokensHandler) ServeHTTP ¶
func (h *ChangeGroupsUpdateTokensHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a Gogs API client.
func (*Client) ApproveRunTask ¶
func (*Client) CheckCache ¶
func (*Client) CreateRun ¶
func (c *Client) CreateRun(ctx context.Context, req *RunCreateRequest) (*RunResponse, *http.Response, error)
func (*Client) GetArchive ¶
func (*Client) GetExecutorTask ¶
func (*Client) GetExecutorTasks ¶
func (*Client) GetGroupFirstQueuedRuns ¶
func (*Client) GetGroupLastRun ¶
func (*Client) GetGroupQueuedRuns ¶
func (*Client) GetGroupRunningRuns ¶
func (*Client) GetQueuedRuns ¶
func (*Client) GetRunEvents ¶
func (*Client) GetRunningRuns ¶
func (*Client) RunActions ¶
func (*Client) RunTaskActions ¶
func (*Client) RunTaskSetAnnotations ¶
func (*Client) SendExecutorStatus ¶
func (*Client) SendExecutorTaskStatus ¶
func (*Client) SetHTTPClient ¶
SetHTTPClient replaces default http.Client with user given one.
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
func ErrorResponseFromError ¶
func ErrorResponseFromError(err error) *ErrorResponse
type ExecutorDeleteHandler ¶
type ExecutorDeleteHandler struct {
// contains filtered or unexported fields
}
func NewExecutorDeleteHandler ¶
func NewExecutorDeleteHandler(logger *zap.Logger, ah *action.ActionHandler) *ExecutorDeleteHandler
func (*ExecutorDeleteHandler) ServeHTTP ¶
func (h *ExecutorDeleteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ExecutorStatusHandler ¶
type ExecutorStatusHandler struct {
// contains filtered or unexported fields
}
func NewExecutorStatusHandler ¶
func NewExecutorStatusHandler(logger *zap.Logger, e *etcd.Store, ah *action.ActionHandler) *ExecutorStatusHandler
func (*ExecutorStatusHandler) ServeHTTP ¶
func (h *ExecutorStatusHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ExecutorTaskHandler ¶
type ExecutorTaskHandler struct {
// contains filtered or unexported fields
}
func NewExecutorTaskHandler ¶
func NewExecutorTaskHandler(e *etcd.Store) *ExecutorTaskHandler
func (*ExecutorTaskHandler) ServeHTTP ¶
func (h *ExecutorTaskHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ExecutorTaskStatusHandler ¶
type ExecutorTaskStatusHandler struct {
// contains filtered or unexported fields
}
func NewExecutorTaskStatusHandler ¶
func NewExecutorTaskStatusHandler(e *etcd.Store, c chan<- *types.ExecutorTask) *ExecutorTaskStatusHandler
func (*ExecutorTaskStatusHandler) ServeHTTP ¶
func (h *ExecutorTaskStatusHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ExecutorTasksHandler ¶
type ExecutorTasksHandler struct {
// contains filtered or unexported fields
}
func NewExecutorTasksHandler ¶
func NewExecutorTasksHandler(e *etcd.Store) *ExecutorTasksHandler
func (*ExecutorTasksHandler) ServeHTTP ¶
func (h *ExecutorTasksHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetRunsResponse ¶
type LogsHandler ¶
type LogsHandler struct {
// contains filtered or unexported fields
}
func NewLogsHandler ¶
func NewLogsHandler(logger *zap.Logger, e *etcd.Store, ost *objectstorage.ObjStorage, dm *datamanager.DataManager) *LogsHandler
func (*LogsHandler) ServeHTTP ¶
func (h *LogsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RunActionType ¶
type RunActionType string
const ( RunActionTypeChangePhase RunActionType = "changephase" RunActionTypeStop RunActionType = "stop" )
type RunActionsHandler ¶
type RunActionsHandler struct {
// contains filtered or unexported fields
}
func NewRunActionsHandler ¶
func NewRunActionsHandler(logger *zap.Logger, ah *action.ActionHandler) *RunActionsHandler
func (*RunActionsHandler) ServeHTTP ¶
func (h *RunActionsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RunActionsRequest ¶
type RunActionsRequest struct { ActionType RunActionType `json:"action_type"` Phase types.RunPhase `json:"phase"` ChangeGroupsUpdateToken string `json:"change_groups_update_tokens"` }
type RunCreateHandler ¶
type RunCreateHandler struct {
// contains filtered or unexported fields
}
func NewRunCreateHandler ¶
func NewRunCreateHandler(logger *zap.Logger, ah *action.ActionHandler) *RunCreateHandler
func (*RunCreateHandler) ServeHTTP ¶
func (h *RunCreateHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RunCreateRequest ¶
type RunCreateRequest struct { // new run fields RunConfigTasks map[string]*types.RunConfigTask `json:"run_config_tasks"` Name string `json:"name"` Group string `json:"group"` SetupErrors []string `json:"setup_errors"` StaticEnvironment map[string]string `json:"static_environment"` CacheGroup string `json:"cache_group"` // existing run fields RunID string `json:"run_id"` FromStart bool `json:"from_start"` ResetTasks []string `json:"reset_tasks"` // common fields Environment map[string]string `json:"environment"` Annotations map[string]string `json:"annotations"` ChangeGroupsUpdateToken string `json:"changeup_update_tokens"` }
type RunEventsHandler ¶
type RunEventsHandler struct {
// contains filtered or unexported fields
}
func NewRunEventsHandler ¶
func NewRunEventsHandler(logger *zap.Logger, e *etcd.Store, ost *objectstorage.ObjStorage, dm *datamanager.DataManager) *RunEventsHandler
func (*RunEventsHandler) ServeHTTP ¶
func (h *RunEventsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RunHandler ¶
type RunHandler struct {
// contains filtered or unexported fields
}
func NewRunHandler ¶
func NewRunHandler(logger *zap.Logger, e *etcd.Store, dm *datamanager.DataManager, readDB *readdb.ReadDB) *RunHandler
func (*RunHandler) ServeHTTP ¶
func (h *RunHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RunResponse ¶
type RunTaskActionType ¶
type RunTaskActionType string
const ( RunTaskActionTypeSetAnnotations RunTaskActionType = "setannotations" RunTaskActionTypeApprove RunTaskActionType = "approve" )
type RunTaskActionsHandler ¶
type RunTaskActionsHandler struct {
// contains filtered or unexported fields
}
func NewRunTaskActionsHandler ¶
func NewRunTaskActionsHandler(logger *zap.Logger, ah *action.ActionHandler) *RunTaskActionsHandler
func (*RunTaskActionsHandler) ServeHTTP ¶
func (h *RunTaskActionsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RunTaskActionsRequest ¶
type RunTaskActionsRequest struct { ActionType RunTaskActionType `json:"action_type"` // set Annotations fields Annotations map[string]string `json:"annotations,omitempty"` // global fields ChangeGroupsUpdateToken string `json:"change_groups_update_tokens"` }
type RunsHandler ¶
type RunsHandler struct {
// contains filtered or unexported fields
}
func NewRunsHandler ¶
func NewRunsHandler(logger *zap.Logger, readDB *readdb.ReadDB) *RunsHandler
func (*RunsHandler) ServeHTTP ¶
func (h *RunsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.