openapi

package
v0.46.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package openapi provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.

Index

Constants

View Source
const (
	ApiKeyAuthScopes = "ApiKeyAuth.Scopes"
)
View Source
const HeaderApiKey = "X-API-KEY"

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

Types

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type DeleteRunV1200JSONResponse

type DeleteRunV1200JSONResponse DeleteRunV1Response

func (DeleteRunV1200JSONResponse) VisitDeleteRunV1Response

func (response DeleteRunV1200JSONResponse) VisitDeleteRunV1Response(w http.ResponseWriter) error

type DeleteRunV1400JSONResponse

type DeleteRunV1400JSONResponse Error

func (DeleteRunV1400JSONResponse) VisitDeleteRunV1Response

func (response DeleteRunV1400JSONResponse) VisitDeleteRunV1Response(w http.ResponseWriter) error

type DeleteRunV1401JSONResponse

type DeleteRunV1401JSONResponse struct{ UnauthorizedJSONResponse }

func (DeleteRunV1401JSONResponse) VisitDeleteRunV1Response

func (response DeleteRunV1401JSONResponse) VisitDeleteRunV1Response(w http.ResponseWriter) error

type DeleteRunV1404JSONResponse

type DeleteRunV1404JSONResponse Error

func (DeleteRunV1404JSONResponse) VisitDeleteRunV1Response

func (response DeleteRunV1404JSONResponse) VisitDeleteRunV1Response(w http.ResponseWriter) error

type DeleteRunV1RequestObject

type DeleteRunV1RequestObject struct {
	RunId int `json:"runId"`
}

type DeleteRunV1Response

type DeleteRunV1Response = map[string]interface{}

DeleteRunV1Response defines model for DeleteRunV1Response.

type DeleteRunV1ResponseObject

type DeleteRunV1ResponseObject interface {
	VisitDeleteRunV1Response(w http.ResponseWriter) error
}

type Error

type Error struct {
	// Errors A list of errors.
	Errors []ErrorDetail `json:"errors"`
}

Error defines model for Error.

type ErrorDetail

type ErrorDetail struct {
	// Detail A human-readable message that provides more details about the error.
	Detail *string `json:"detail,omitempty"`

	// Error Internal identifier of the error.
	Error int `json:"error"`

	// Message A short, human-readable error message.
	Message string `json:"message"`
}

ErrorDetail defines model for ErrorDetail.

type GetRunV1200JSONResponse

type GetRunV1200JSONResponse GetRunV1Response

func (GetRunV1200JSONResponse) VisitGetRunV1Response

func (response GetRunV1200JSONResponse) VisitGetRunV1Response(w http.ResponseWriter) error

type GetRunV1401JSONResponse

type GetRunV1401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetRunV1401JSONResponse) VisitGetRunV1Response

func (response GetRunV1401JSONResponse) VisitGetRunV1Response(w http.ResponseWriter) error

type GetRunV1404JSONResponse

type GetRunV1404JSONResponse Error

func (GetRunV1404JSONResponse) VisitGetRunV1Response

func (response GetRunV1404JSONResponse) VisitGetRunV1Response(w http.ResponseWriter) error

type GetRunV1RequestObject

type GetRunV1RequestObject struct {
	RunId int `json:"runId"`
}

type GetRunV1Response

type GetRunV1Response struct {
	Run RunV1 `json:"run"`
}

GetRunV1Response defines model for GetRunV1Response.

type GetRunV1ResponseObject

type GetRunV1ResponseObject interface {
	VisitGetRunV1Response(w http.ResponseWriter) error
}

type GetTaskV1200JSONResponse

type GetTaskV1200JSONResponse GetTaskV1Response

func (GetTaskV1200JSONResponse) VisitGetTaskV1Response

func (response GetTaskV1200JSONResponse) VisitGetTaskV1Response(w http.ResponseWriter) error

type GetTaskV1401JSONResponse

type GetTaskV1401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetTaskV1401JSONResponse) VisitGetTaskV1Response

func (response GetTaskV1401JSONResponse) VisitGetTaskV1Response(w http.ResponseWriter) error

type GetTaskV1404JSONResponse

type GetTaskV1404JSONResponse Error

func (GetTaskV1404JSONResponse) VisitGetTaskV1Response

func (response GetTaskV1404JSONResponse) VisitGetTaskV1Response(w http.ResponseWriter) error

type GetTaskV1500JSONResponse

type GetTaskV1500JSONResponse Error

func (GetTaskV1500JSONResponse) VisitGetTaskV1Response

func (response GetTaskV1500JSONResponse) VisitGetTaskV1Response(w http.ResponseWriter) error

type GetTaskV1RequestObject

type GetTaskV1RequestObject struct {
	Task string `json:"task"`
}

type GetTaskV1Response

type GetTaskV1Response struct {
	Content string         `json:"content"`
	Hash    string         `json:"hash"`
	Inputs  *[]TaskV1Input `json:"inputs,omitempty"`
	Name    string         `json:"name"`
}

GetTaskV1Response defines model for GetTaskV1Response.

type GetTaskV1ResponseObject

type GetTaskV1ResponseObject interface {
	VisitGetTaskV1Response(w http.ResponseWriter) error
}

type GetWorkV1200JSONResponse

type GetWorkV1200JSONResponse GetWorkV1Response

func (GetWorkV1200JSONResponse) VisitGetWorkV1Response

func (response GetWorkV1200JSONResponse) VisitGetWorkV1Response(w http.ResponseWriter) error

type GetWorkV1401JSONResponse

type GetWorkV1401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetWorkV1401JSONResponse) VisitGetWorkV1Response

func (response GetWorkV1401JSONResponse) VisitGetWorkV1Response(w http.ResponseWriter) error

type GetWorkV1RequestObject

type GetWorkV1RequestObject struct {
}

type GetWorkV1Response

type GetWorkV1Response struct {
	// Repositories Names of repositories for which to apply the tasks.
	Repositories *[]string `json:"repositories,omitempty"`

	// RunData Run data.
	RunData *map[string]string `json:"runData,omitempty"`

	// RunID Internal identifier of the unit of work.
	RunID int `json:"runID"`

	// Task The task to execute.
	Task WorkTaskV1 `json:"task"`
}

GetWorkV1Response defines model for GetWorkV1Response.

type GetWorkV1ResponseObject

type GetWorkV1ResponseObject interface {
	VisitGetWorkV1Response(w http.ResponseWriter) error
}

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type ListOptions

type ListOptions struct {
	Limit int `json:"limit"`
	Page  int `json:"page"`
}

ListOptions defines model for ListOptions.

type ListRunsV1200JSONResponse

type ListRunsV1200JSONResponse ListRunsV1Response

func (ListRunsV1200JSONResponse) VisitListRunsV1Response

func (response ListRunsV1200JSONResponse) VisitListRunsV1Response(w http.ResponseWriter) error

type ListRunsV1401JSONResponse

type ListRunsV1401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListRunsV1401JSONResponse) VisitListRunsV1Response

func (response ListRunsV1401JSONResponse) VisitListRunsV1Response(w http.ResponseWriter) error

type ListRunsV1Params

type ListRunsV1Params struct {
	// Task Name of the task to filter by.
	Task        *string        `form:"task,omitempty" json:"task,omitempty"`
	ListOptions *ListOptions   `form:"listOptions,omitempty" json:"listOptions,omitempty"`
	Status      *[]RunStatusV1 `form:"status,omitempty" json:"status,omitempty"`
}

ListRunsV1Params defines parameters for ListRunsV1.

type ListRunsV1RequestObject

type ListRunsV1RequestObject struct {
	Params ListRunsV1Params
}

type ListRunsV1Response

type ListRunsV1Response struct {
	Page Page `json:"page"`

	// Result List of runs.
	Result []RunV1 `json:"result"`
}

ListRunsV1Response defines model for ListRunsV1Response.

type ListRunsV1ResponseObject

type ListRunsV1ResponseObject interface {
	VisitListRunsV1Response(w http.ResponseWriter) error
}

type ListTaskRecentTaskResultsV1200JSONResponse

type ListTaskRecentTaskResultsV1200JSONResponse ListTaskRecentTaskResultsV1Response

func (ListTaskRecentTaskResultsV1200JSONResponse) VisitListTaskRecentTaskResultsV1Response

func (response ListTaskRecentTaskResultsV1200JSONResponse) VisitListTaskRecentTaskResultsV1Response(w http.ResponseWriter) error

type ListTaskRecentTaskResultsV1401JSONResponse

type ListTaskRecentTaskResultsV1401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListTaskRecentTaskResultsV1401JSONResponse) VisitListTaskRecentTaskResultsV1Response

func (response ListTaskRecentTaskResultsV1401JSONResponse) VisitListTaskRecentTaskResultsV1Response(w http.ResponseWriter) error

type ListTaskRecentTaskResultsV1404JSONResponse

type ListTaskRecentTaskResultsV1404JSONResponse Error

func (ListTaskRecentTaskResultsV1404JSONResponse) VisitListTaskRecentTaskResultsV1Response

func (response ListTaskRecentTaskResultsV1404JSONResponse) VisitListTaskRecentTaskResultsV1Response(w http.ResponseWriter) error

type ListTaskRecentTaskResultsV1500JSONResponse

type ListTaskRecentTaskResultsV1500JSONResponse Error

func (ListTaskRecentTaskResultsV1500JSONResponse) VisitListTaskRecentTaskResultsV1Response

func (response ListTaskRecentTaskResultsV1500JSONResponse) VisitListTaskRecentTaskResultsV1Response(w http.ResponseWriter) error

type ListTaskRecentTaskResultsV1Params

type ListTaskRecentTaskResultsV1Params struct {
	Status      *[]TaskResultStateV1 `form:"status,omitempty" json:"status,omitempty"`
	ListOptions *ListOptions         `form:"listOptions,omitempty" json:"listOptions,omitempty"`
}

ListTaskRecentTaskResultsV1Params defines parameters for ListTaskRecentTaskResultsV1.

type ListTaskRecentTaskResultsV1RequestObject

type ListTaskRecentTaskResultsV1RequestObject struct {
	Task   string `json:"task"`
	Params ListTaskRecentTaskResultsV1Params
}

type ListTaskRecentTaskResultsV1Response

type ListTaskRecentTaskResultsV1Response struct {
	Page        Page           `json:"page"`
	TaskResults []TaskResultV1 `json:"taskResults"`
}

ListTaskRecentTaskResultsV1Response defines model for ListTaskRecentTaskResultsV1Response.

type ListTaskRecentTaskResultsV1ResponseObject

type ListTaskRecentTaskResultsV1ResponseObject interface {
	VisitListTaskRecentTaskResultsV1Response(w http.ResponseWriter) error
}

type ListTaskResultsV1200JSONResponse

type ListTaskResultsV1200JSONResponse ListTaskResultsV1Response

func (ListTaskResultsV1200JSONResponse) VisitListTaskResultsV1Response

func (response ListTaskResultsV1200JSONResponse) VisitListTaskResultsV1Response(w http.ResponseWriter) error

type ListTaskResultsV1401JSONResponse

type ListTaskResultsV1401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListTaskResultsV1401JSONResponse) VisitListTaskResultsV1Response

func (response ListTaskResultsV1401JSONResponse) VisitListTaskResultsV1Response(w http.ResponseWriter) error

type ListTaskResultsV1Params

type ListTaskResultsV1Params struct {
	// RepositoryName Name of a repository to filter by.
	RepositoryName *string `form:"repositoryName,omitempty" json:"repositoryName,omitempty"`

	// RunId ID of a run to filter by.
	RunId       *int                 `form:"runId,omitempty" json:"runId,omitempty"`
	Status      *[]TaskResultStateV1 `form:"status,omitempty" json:"status,omitempty"`
	ListOptions *ListOptions         `form:"listOptions,omitempty" json:"listOptions,omitempty"`
}

ListTaskResultsV1Params defines parameters for ListTaskResultsV1.

type ListTaskResultsV1RequestObject

type ListTaskResultsV1RequestObject struct {
	Params ListTaskResultsV1Params
}

type ListTaskResultsV1Response

type ListTaskResultsV1Response struct {
	Page        Page           `json:"page"`
	TaskResults []TaskResultV1 `json:"taskResults"`
}

ListTaskResultsV1Response defines model for ListTaskResultsV1Response.

type ListTaskResultsV1ResponseObject

type ListTaskResultsV1ResponseObject interface {
	VisitListTaskResultsV1Response(w http.ResponseWriter) error
}

type ListTasksV1200JSONResponse

type ListTasksV1200JSONResponse ListTasksV1Response

func (ListTasksV1200JSONResponse) VisitListTasksV1Response

func (response ListTasksV1200JSONResponse) VisitListTasksV1Response(w http.ResponseWriter) error

type ListTasksV1401JSONResponse

type ListTasksV1401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListTasksV1401JSONResponse) VisitListTasksV1Response

func (response ListTasksV1401JSONResponse) VisitListTasksV1Response(w http.ResponseWriter) error

type ListTasksV1Params

type ListTasksV1Params struct {
	Active      *bool        `form:"active,omitempty" json:"active,omitempty"`
	ListOptions *ListOptions `form:"listOptions,omitempty" json:"listOptions,omitempty"`
}

ListTasksV1Params defines parameters for ListTasksV1.

type ListTasksV1RequestObject

type ListTasksV1RequestObject struct {
	Params ListTasksV1Params
}

type ListTasksV1Response

type ListTasksV1Response struct {
	Page Page `json:"page"`

	// Results Names of registered tasks.
	Results []ListTasksV1ResponseTask `json:"results"`
}

ListTasksV1Response defines model for ListTasksV1Response.

type ListTasksV1ResponseObject

type ListTasksV1ResponseObject interface {
	VisitListTasksV1Response(w http.ResponseWriter) error
}

type ListTasksV1ResponseTask

type ListTasksV1ResponseTask struct {
	Active   bool   `json:"active"`
	Checksum string `json:"checksum"`
	Name     string `json:"name"`
}

ListTasksV1ResponseTask defines model for ListTasksV1ResponseTask.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type Page

type Page struct {
	// CurrentPage Number of the current page.
	CurrentPage int `json:"currentPage"`

	// ItemsPerPage Count of items per page.
	ItemsPerPage int `json:"itemsPerPage"`

	// NextPage Number of the page with the next results.
	// 0 if there is no next page.
	NextPage int `json:"nextPage"`

	// PreviousPage Number of the previous page.
	// 0 if there is no previous page.
	PreviousPage int `json:"previousPage"`

	// TotalItems Total number of items.
	TotalItems int `json:"totalItems"`

	// TotalPages Total number of pages.
	TotalPages int `json:"totalPages"`
}

Page defines model for Page.

type ReportWorkV1201JSONResponse

type ReportWorkV1201JSONResponse ReportWorkV1Response

func (ReportWorkV1201JSONResponse) VisitReportWorkV1Response

func (response ReportWorkV1201JSONResponse) VisitReportWorkV1Response(w http.ResponseWriter) error

type ReportWorkV1401JSONResponse

type ReportWorkV1401JSONResponse struct{ UnauthorizedJSONResponse }

func (ReportWorkV1401JSONResponse) VisitReportWorkV1Response

func (response ReportWorkV1401JSONResponse) VisitReportWorkV1Response(w http.ResponseWriter) error

type ReportWorkV1JSONRequestBody

type ReportWorkV1JSONRequestBody = ReportWorkV1Request

ReportWorkV1JSONRequestBody defines body for ReportWorkV1 for application/json ContentType.

type ReportWorkV1Request

type ReportWorkV1Request struct {
	// Error General that occurred during the run, if any.
	Error *string `json:"error,omitempty"`

	// RunID Internal identifier of the unit of work.
	RunID int `json:"runID"`

	// Task The task to execute.
	Task WorkTaskV1 `json:"task"`

	// TaskResults Results of each task.
	TaskResults []ReportWorkV1TaskResult `json:"taskResults"`
}

ReportWorkV1Request defines model for ReportWorkV1Request.

type ReportWorkV1RequestObject

type ReportWorkV1RequestObject struct {
	Body *ReportWorkV1JSONRequestBody
}

type ReportWorkV1Response

type ReportWorkV1Response struct {
	// Result Indicator of the result of the operation.
	Result ReportWorkV1ResponseResult `json:"result"`
}

ReportWorkV1Response defines model for ReportWorkV1Response.

type ReportWorkV1ResponseObject

type ReportWorkV1ResponseObject interface {
	VisitReportWorkV1Response(w http.ResponseWriter) error
}

type ReportWorkV1ResponseResult

type ReportWorkV1ResponseResult string

ReportWorkV1ResponseResult Indicator of the result of the operation.

const (
	Ok ReportWorkV1ResponseResult = "ok"
)

Defines values for ReportWorkV1ResponseResult.

type ReportWorkV1TaskResult

type ReportWorkV1TaskResult struct {
	// Error Error encountered during the run, if any.
	Error *string `json:"error,omitempty"`

	// PullRequestUrl URL of the pull request for humans to view.
	PullRequestUrl *string `json:"pullRequestUrl,omitempty"`

	// RepositoryName Name of the repository.
	RepositoryName string `json:"repositoryName"`

	// Result Identifier of the result.
	Result int `json:"result"`

	// State State of the result.
	// `archived` indicates that the repository of a pull request has been archived.
	// `closed` indicates that a pull request existed and has been closed.
	// `error` indicates that an error occurred while applying the task to the repository.
	// `merged` indicates that a pull request has been merged.
	// `open` indicates that a pull request is open and has not been merged yet.
	// `pushed` indicates that changes were pushed to the default branch.
	// `unknown` is a fallback value for any unexpected status.
	State TaskResultStateV1 `json:"state"`
}

ReportWorkV1TaskResult Result of the run of a task.

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type RunStatusV1

type RunStatusV1 string

RunStatusV1 defines model for RunStatusV1.

const (
	Failed   RunStatusV1 = "failed"
	Finished RunStatusV1 = "finished"
	Pending  RunStatusV1 = "pending"
	Running  RunStatusV1 = "running"
	Timeout  RunStatusV1 = "timeout"
)

Defines values for RunStatusV1.

type RunV1

type RunV1 struct {
	Error      *string    `json:"error,omitempty"`
	FinishedAt *time.Time `json:"finishedAt,omitempty"`
	Id         uint       `json:"id"`

	// Reason The reason why a run has been scheduled.
	// The following reasons are deprecated: changed, new, next
	Reason        RunV1Reason        `json:"reason"`
	Repositories  *[]string          `json:"repositories,omitempty"`
	RunData       *map[string]string `json:"runData,omitempty"`
	ScheduleAfter time.Time          `json:"scheduleAfter"`
	StartedAt     *time.Time         `json:"startedAt,omitempty"`
	Status        RunStatusV1        `json:"status"`
	Task          string             `json:"task"`
}

RunV1 defines model for RunV1.

type RunV1Reason

type RunV1Reason string

RunV1Reason The reason why a run has been scheduled. The following reasons are deprecated: changed, new, next

const (
	Changed RunV1Reason = "changed"
	Cron    RunV1Reason = "cron"
	Manual  RunV1Reason = "manual"
	New     RunV1Reason = "new"
	Next    RunV1Reason = "next"
	Webhook RunV1Reason = "webhook"
)

Defines values for RunV1Reason.

type ScheduleRunV1200JSONResponse

type ScheduleRunV1200JSONResponse ScheduleRunV1Response

func (ScheduleRunV1200JSONResponse) VisitScheduleRunV1Response

func (response ScheduleRunV1200JSONResponse) VisitScheduleRunV1Response(w http.ResponseWriter) error

type ScheduleRunV1400JSONResponse

type ScheduleRunV1400JSONResponse Error

func (ScheduleRunV1400JSONResponse) VisitScheduleRunV1Response

func (response ScheduleRunV1400JSONResponse) VisitScheduleRunV1Response(w http.ResponseWriter) error

type ScheduleRunV1401JSONResponse

type ScheduleRunV1401JSONResponse struct{ UnauthorizedJSONResponse }

func (ScheduleRunV1401JSONResponse) VisitScheduleRunV1Response

func (response ScheduleRunV1401JSONResponse) VisitScheduleRunV1Response(w http.ResponseWriter) error

type ScheduleRunV1JSONRequestBody

type ScheduleRunV1JSONRequestBody = ScheduleRunV1Request

ScheduleRunV1JSONRequestBody defines body for ScheduleRunV1 for application/json ContentType.

type ScheduleRunV1Request

type ScheduleRunV1Request struct {
	// Assignees List of usernames to set as assignees of pull requests. Optional.
	Assignees *[]string `json:"assignees,omitempty"`

	// RepositoryNames Names of the repositories for which to add a run.
	// Leave empty to schedule a run for all repositories the task matches.
	RepositoryNames *[]string `json:"repositoryNames,omitempty"`

	// Reviewers List of usernames to set as reviewers of pull requests. Optional.
	Reviewers *[]string          `json:"reviewers,omitempty"`
	RunData   *map[string]string `json:"runData,omitempty"`

	// ScheduleAfter Schedule the run after the given time.
	// Uses the current time if empty.
	ScheduleAfter *time.Time `json:"scheduleAfter,omitempty"`

	// TaskName Name of the task for which to add a run.
	TaskName string `json:"taskName"`
}

ScheduleRunV1Request defines model for ScheduleRunV1Request.

type ScheduleRunV1RequestObject

type ScheduleRunV1RequestObject struct {
	Body *ScheduleRunV1JSONRequestBody
}

type ScheduleRunV1Response

type ScheduleRunV1Response struct {
	// RunID Identifier of the newly scheduled run.
	RunID int `json:"runID"`
}

ScheduleRunV1Response defines model for ScheduleRunV1Response.

type ScheduleRunV1ResponseObject

type ScheduleRunV1ResponseObject interface {
	VisitScheduleRunV1Response(w http.ResponseWriter) error
}

type ServerInterface

type ServerInterface interface {
	// List of runs.
	// (GET /api/v1/runs)
	ListRunsV1(w http.ResponseWriter, r *http.Request, params ListRunsV1Params)
	// Schedule a run.
	// (POST /api/v1/runs)
	ScheduleRunV1(w http.ResponseWriter, r *http.Request)
	// Delete a run.
	// (DELETE /api/v1/runs/{runId})
	DeleteRunV1(w http.ResponseWriter, r *http.Request, runId int)
	// View data of a run.
	// (GET /api/v1/runs/{runId})
	GetRunV1(w http.ResponseWriter, r *http.Request, runId int)
	// Task results
	// (GET /api/v1/taskResults)
	ListTaskResultsV1(w http.ResponseWriter, r *http.Request, params ListTaskResultsV1Params)
	// List tasks.
	// (GET /api/v1/tasks)
	ListTasksV1(w http.ResponseWriter, r *http.Request, params ListTasksV1Params)
	// Get information about a task.
	// (GET /api/v1/tasks/{task})
	GetTaskV1(w http.ResponseWriter, r *http.Request, task string)
	// List recent run results of a task by repository.
	// (GET /api/v1/tasks/{task}/results)
	ListTaskRecentTaskResultsV1(w http.ResponseWriter, r *http.Request, task string, params ListTaskRecentTaskResultsV1Params)
	// Get a unit of work.
	// (GET /api/v1/worker/work)
	GetWorkV1(w http.ResponseWriter, r *http.Request)
	// Report the result of a unit of work
	// (POST /api/v1/worker/work)
	ReportWorkV1(w http.ResponseWriter, r *http.Request)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) DeleteRunV1

func (siw *ServerInterfaceWrapper) DeleteRunV1(w http.ResponseWriter, r *http.Request)

DeleteRunV1 operation middleware

func (*ServerInterfaceWrapper) GetRunV1

func (siw *ServerInterfaceWrapper) GetRunV1(w http.ResponseWriter, r *http.Request)

GetRunV1 operation middleware

func (*ServerInterfaceWrapper) GetTaskV1

func (siw *ServerInterfaceWrapper) GetTaskV1(w http.ResponseWriter, r *http.Request)

GetTaskV1 operation middleware

func (*ServerInterfaceWrapper) GetWorkV1

func (siw *ServerInterfaceWrapper) GetWorkV1(w http.ResponseWriter, r *http.Request)

GetWorkV1 operation middleware

func (*ServerInterfaceWrapper) ListRunsV1

func (siw *ServerInterfaceWrapper) ListRunsV1(w http.ResponseWriter, r *http.Request)

ListRunsV1 operation middleware

func (*ServerInterfaceWrapper) ListTaskRecentTaskResultsV1

func (siw *ServerInterfaceWrapper) ListTaskRecentTaskResultsV1(w http.ResponseWriter, r *http.Request)

ListTaskRecentTaskResultsV1 operation middleware

func (*ServerInterfaceWrapper) ListTaskResultsV1

func (siw *ServerInterfaceWrapper) ListTaskResultsV1(w http.ResponseWriter, r *http.Request)

ListTaskResultsV1 operation middleware

func (*ServerInterfaceWrapper) ListTasksV1

func (siw *ServerInterfaceWrapper) ListTasksV1(w http.ResponseWriter, r *http.Request)

ListTasksV1 operation middleware

func (*ServerInterfaceWrapper) ReportWorkV1

func (siw *ServerInterfaceWrapper) ReportWorkV1(w http.ResponseWriter, r *http.Request)

ReportWorkV1 operation middleware

func (*ServerInterfaceWrapper) ScheduleRunV1

func (siw *ServerInterfaceWrapper) ScheduleRunV1(w http.ResponseWriter, r *http.Request)

ScheduleRunV1 operation middleware

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictServerInterface

type StrictServerInterface interface {
	// List of runs.
	// (GET /api/v1/runs)
	ListRunsV1(ctx context.Context, request ListRunsV1RequestObject) (ListRunsV1ResponseObject, error)
	// Schedule a run.
	// (POST /api/v1/runs)
	ScheduleRunV1(ctx context.Context, request ScheduleRunV1RequestObject) (ScheduleRunV1ResponseObject, error)
	// Delete a run.
	// (DELETE /api/v1/runs/{runId})
	DeleteRunV1(ctx context.Context, request DeleteRunV1RequestObject) (DeleteRunV1ResponseObject, error)
	// View data of a run.
	// (GET /api/v1/runs/{runId})
	GetRunV1(ctx context.Context, request GetRunV1RequestObject) (GetRunV1ResponseObject, error)
	// Task results
	// (GET /api/v1/taskResults)
	ListTaskResultsV1(ctx context.Context, request ListTaskResultsV1RequestObject) (ListTaskResultsV1ResponseObject, error)
	// List tasks.
	// (GET /api/v1/tasks)
	ListTasksV1(ctx context.Context, request ListTasksV1RequestObject) (ListTasksV1ResponseObject, error)
	// Get information about a task.
	// (GET /api/v1/tasks/{task})
	GetTaskV1(ctx context.Context, request GetTaskV1RequestObject) (GetTaskV1ResponseObject, error)
	// List recent run results of a task by repository.
	// (GET /api/v1/tasks/{task}/results)
	ListTaskRecentTaskResultsV1(ctx context.Context, request ListTaskRecentTaskResultsV1RequestObject) (ListTaskRecentTaskResultsV1ResponseObject, error)
	// Get a unit of work.
	// (GET /api/v1/worker/work)
	GetWorkV1(ctx context.Context, request GetWorkV1RequestObject) (GetWorkV1ResponseObject, error)
	// Report the result of a unit of work
	// (POST /api/v1/worker/work)
	ReportWorkV1(ctx context.Context, request ReportWorkV1RequestObject) (ReportWorkV1ResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TaskResultStateV1

type TaskResultStateV1 string

TaskResultStateV1 State of the result. `archived` indicates that the repository of a pull request has been archived. `closed` indicates that a pull request existed and has been closed. `error` indicates that an error occurred while applying the task to the repository. `merged` indicates that a pull request has been merged. `open` indicates that a pull request is open and has not been merged yet. `pushed` indicates that changes were pushed to the default branch. `unknown` is a fallback value for any unexpected status.

const (
	TaskResultStateV1Archived TaskResultStateV1 = "archived"
	TaskResultStateV1Closed   TaskResultStateV1 = "closed"
	TaskResultStateV1Error    TaskResultStateV1 = "error"
	TaskResultStateV1Merged   TaskResultStateV1 = "merged"
	TaskResultStateV1Open     TaskResultStateV1 = "open"
	TaskResultStateV1Pushed   TaskResultStateV1 = "pushed"
	TaskResultStateV1Unknown  TaskResultStateV1 = "unknown"
)

Defines values for TaskResultStateV1.

type TaskResultV1

type TaskResultV1 struct {
	// Error Error that occurred while creating the pull request, if any.
	Error *string `json:"error,omitempty"`

	// PullRequestUrl URL of the pull request opened by Saturn.
	PullRequestUrl *string `json:"pullRequestUrl,omitempty"`

	// RepositoryName Name of the repository.
	RepositoryName string `json:"repositoryName"`

	// RunId Numeric identifier of the run this result is a part of.
	RunId int `json:"runId"`

	// Status State of the result.
	// `archived` indicates that the repository of a pull request has been archived.
	// `closed` indicates that a pull request existed and has been closed.
	// `error` indicates that an error occurred while applying the task to the repository.
	// `merged` indicates that a pull request has been merged.
	// `open` indicates that a pull request is open and has not been merged yet.
	// `pushed` indicates that changes were pushed to the default branch.
	// `unknown` is a fallback value for any unexpected status.
	Status TaskResultStateV1 `json:"status"`
}

TaskResultV1 defines model for TaskResultV1.

type TaskV1Input

type TaskV1Input struct {
	// Default Default value to use if no input has been set via the command-line.
	Default *string `json:"default,omitempty"`

	// Description Text that describes the input value.
	Description *string `json:"description,omitempty"`

	// Name Key that identifies the input. Set via the command-line to set the input value.
	Name string `json:"name"`

	// Options If not empty, a list of possible values for the input.
	Options *[]string `json:"options,omitempty"`

	// Validation If not empty, a regular expression that validates the value of the input.
	Validation *string `json:"validation,omitempty"`
}

TaskV1Input defines model for TaskV1Input.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type Unauthorized

type Unauthorized = Error

Unauthorized defines model for Unauthorized.

type UnauthorizedJSONResponse

type UnauthorizedJSONResponse Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) DeleteRunV1

func (_ Unimplemented) DeleteRunV1(w http.ResponseWriter, r *http.Request, runId int)

Delete a run. (DELETE /api/v1/runs/{runId})

func (Unimplemented) GetRunV1

func (_ Unimplemented) GetRunV1(w http.ResponseWriter, r *http.Request, runId int)

View data of a run. (GET /api/v1/runs/{runId})

func (Unimplemented) GetTaskV1

func (_ Unimplemented) GetTaskV1(w http.ResponseWriter, r *http.Request, task string)

Get information about a task. (GET /api/v1/tasks/{task})

func (Unimplemented) GetWorkV1

func (_ Unimplemented) GetWorkV1(w http.ResponseWriter, r *http.Request)

Get a unit of work. (GET /api/v1/worker/work)

func (Unimplemented) ListRunsV1

func (_ Unimplemented) ListRunsV1(w http.ResponseWriter, r *http.Request, params ListRunsV1Params)

List of runs. (GET /api/v1/runs)

func (Unimplemented) ListTaskRecentTaskResultsV1

func (_ Unimplemented) ListTaskRecentTaskResultsV1(w http.ResponseWriter, r *http.Request, task string, params ListTaskRecentTaskResultsV1Params)

List recent run results of a task by repository. (GET /api/v1/tasks/{task}/results)

func (Unimplemented) ListTaskResultsV1

func (_ Unimplemented) ListTaskResultsV1(w http.ResponseWriter, r *http.Request, params ListTaskResultsV1Params)

Task results (GET /api/v1/taskResults)

func (Unimplemented) ListTasksV1

func (_ Unimplemented) ListTasksV1(w http.ResponseWriter, r *http.Request, params ListTasksV1Params)

List tasks. (GET /api/v1/tasks)

func (Unimplemented) ReportWorkV1

func (_ Unimplemented) ReportWorkV1(w http.ResponseWriter, r *http.Request)

Report the result of a unit of work (POST /api/v1/worker/work)

func (Unimplemented) ScheduleRunV1

func (_ Unimplemented) ScheduleRunV1(w http.ResponseWriter, r *http.Request)

Schedule a run. (POST /api/v1/runs)

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type WorkTaskV1

type WorkTaskV1 struct {
	// Hash Hash of the task. Used to detect if server and worker are out of sync.
	Hash string `json:"hash"`

	// Name Name of the task to execute.
	Name string `json:"name"`
}

WorkTaskV1 The task to execute.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL