Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.2 DO NOT EDIT.
Package api holds the generated OpenAPI artifacts for the /api surface: request/response models (bound to internal/events via x-go-type — the events package stays the one canonical protocol definition), the std-http server router (ServerInterface + HandlerFromMux), and the typed Go client.
The hand-written contract is api/openapi.yaml at the repo root; the generated code is committed and CI verifies it is in sync. Wire-level compatibility is pinned by internal/server/testdata/wire.
Index ¶
- Constants
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
- func NewAppendLogsRequest(server string, body AppendLogsJSONRequestBody) (*http.Request, error)
- func NewAppendLogsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCheckGateRequest(server string, body CheckGateJSONRequestBody) (*http.Request, error)
- func NewCheckGateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewFinalizeExecutionRequest(server string, body FinalizeExecutionJSONRequestBody) (*http.Request, error)
- func NewFinalizeExecutionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetExecutionRequest(server string, id string) (*http.Request, error)
- func NewGetPRRequest(server string, n int) (*http.Request, error)
- func NewInitExecutionRequest(server string, body InitExecutionJSONRequestBody) (*http.Request, error)
- func NewInitExecutionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewListApprovalsRequest(server string) (*http.Request, error)
- func NewListClaimsRequest(server string, body ListClaimsJSONRequestBody) (*http.Request, error)
- func NewListClaimsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewListExecutionsRequest(server string, params *ListExecutionsParams) (*http.Request, error)
- func NewReleaseClaimsRequest(server string, body ReleaseClaimsJSONRequestBody) (*http.Request, error)
- func NewReleaseClaimsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewReportPhaseRequest(server string, body ReportPhaseJSONRequestBody) (*http.Request, error)
- func NewReportPhaseRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewRevokeGateRequest(server string, body RevokeGateJSONRequestBody) (*http.Request, error)
- func NewRevokeGateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateStackRequest(server string, body UpdateStackJSONRequestBody) (*http.Request, error)
- func NewUpdateStackRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type AppendLogsJSONRequestBody
- type AppendLogsResponse
- type Category
- type CheckGateJSONRequestBody
- type CheckGateResponse
- type Claim
- type ClaimsListRequest
- type ClaimsReleaseRequest
- type Client
- func (c *Client) AppendLogs(ctx context.Context, body AppendLogsJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) AppendLogsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CheckGate(ctx context.Context, body CheckGateJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CheckGateWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) FinalizeExecution(ctx context.Context, body FinalizeExecutionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) FinalizeExecutionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) GetExecution(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetPR(ctx context.Context, n int, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) InitExecution(ctx context.Context, body InitExecutionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) InitExecutionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ListApprovals(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListClaims(ctx context.Context, body ListClaimsJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ListClaimsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ListExecutions(ctx context.Context, params *ListExecutionsParams, ...) (*http.Response, error)
- func (c *Client) ReleaseClaims(ctx context.Context, body ReleaseClaimsJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ReleaseClaimsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ReportPhase(ctx context.Context, body ReportPhaseJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ReportPhaseWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) RevokeGate(ctx context.Context, body RevokeGateJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) RevokeGateWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateStack(ctx context.Context, body UpdateStackJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateStackWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) AppendLogsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*AppendLogsResponse, error)
- func (c *ClientWithResponses) AppendLogsWithResponse(ctx context.Context, body AppendLogsJSONRequestBody, ...) (*AppendLogsResponse, error)
- func (c *ClientWithResponses) CheckGateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CheckGateResponse, error)
- func (c *ClientWithResponses) CheckGateWithResponse(ctx context.Context, body CheckGateJSONRequestBody, ...) (*CheckGateResponse, error)
- func (c *ClientWithResponses) FinalizeExecutionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*FinalizeExecutionResponse, error)
- func (c *ClientWithResponses) FinalizeExecutionWithResponse(ctx context.Context, body FinalizeExecutionJSONRequestBody, ...) (*FinalizeExecutionResponse, error)
- func (c *ClientWithResponses) GetExecutionWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetExecutionResponse, error)
- func (c *ClientWithResponses) GetPRWithResponse(ctx context.Context, n int, reqEditors ...RequestEditorFn) (*GetPRResponse, error)
- func (c *ClientWithResponses) InitExecutionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*InitExecutionResponse, error)
- func (c *ClientWithResponses) InitExecutionWithResponse(ctx context.Context, body InitExecutionJSONRequestBody, ...) (*InitExecutionResponse, error)
- func (c *ClientWithResponses) ListApprovalsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListApprovalsResponse, error)
- func (c *ClientWithResponses) ListClaimsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ListClaimsResponse, error)
- func (c *ClientWithResponses) ListClaimsWithResponse(ctx context.Context, body ListClaimsJSONRequestBody, ...) (*ListClaimsResponse, error)
- func (c *ClientWithResponses) ListExecutionsWithResponse(ctx context.Context, params *ListExecutionsParams, ...) (*ListExecutionsResponse, error)
- func (c *ClientWithResponses) ReleaseClaimsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ReleaseClaimsResponse, error)
- func (c *ClientWithResponses) ReleaseClaimsWithResponse(ctx context.Context, body ReleaseClaimsJSONRequestBody, ...) (*ReleaseClaimsResponse, error)
- func (c *ClientWithResponses) ReportPhaseWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ReportPhaseResponse, error)
- func (c *ClientWithResponses) ReportPhaseWithResponse(ctx context.Context, body ReportPhaseJSONRequestBody, ...) (*ReportPhaseResponse, error)
- func (c *ClientWithResponses) RevokeGateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*RevokeGateResponse, error)
- func (c *ClientWithResponses) RevokeGateWithResponse(ctx context.Context, body RevokeGateJSONRequestBody, ...) (*RevokeGateResponse, error)
- func (c *ClientWithResponses) UpdateStackWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*UpdateStackResponse, error)
- func (c *ClientWithResponses) UpdateStackWithResponse(ctx context.Context, body UpdateStackJSONRequestBody, ...) (*UpdateStackResponse, error)
- type ClientWithResponsesInterface
- type CodedError
- type Counts
- type Edge
- type ExecutionDetail
- type ExecutionSummary
- type Finalize
- type FinalizeExecutionJSONRequestBody
- type FinalizeExecutionResponse
- type GateCheck
- type GateCheckOK
- type GateRevoke
- type GateTarget
- type GetExecutionResponse
- type GetPRResponse
- type Graph
- type HttpRequestDoer
- type Init
- type InitExecutionJSONRequestBody
- type InitExecutionResponse
- type InvalidParamFormatError
- type ListApprovalsResponse
- type ListClaimsJSONRequestBody
- type ListClaimsResponse
- type ListExecutionsParams
- type ListExecutionsResponse
- type LogChunk
- type MiddlewareFunc
- type NullInt64
- type PRMergeState
- type PRMeta
- type PRView
- type PendingApproval
- type Phase
- type PhaseEvent
- type ReleaseClaimsJSONRequestBody
- type ReleaseClaimsResponse
- type ReportPhaseJSONRequestBody
- type ReportPhaseResponse
- type RequestEditorFn
- type RequiredHeaderError
- type RequiredParamError
- type RevokeGateJSONRequestBody
- type RevokeGateResponse
- type ServeMux
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) AppendLogs(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CheckGate(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) FinalizeExecution(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetExecution(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetPR(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) InitExecution(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListApprovals(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListClaims(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListExecutions(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReleaseClaims(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ReportPhase(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RevokeGate(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateStack(w http.ResponseWriter, r *http.Request)
- type StackState
- type Status
- type StdHTTPServerOptions
- type StoredGateTarget
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshalingParamError
- type Update
- type UpdateStackJSONRequestBody
- type UpdateStackResponse
Constants ¶
const (
OidcScopes oidcContextKey = "oidc.Scopes"
)
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, m ServeMux) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewAppendLogsRequest ¶
func NewAppendLogsRequest(server string, body AppendLogsJSONRequestBody) (*http.Request, error)
NewAppendLogsRequest calls the generic AppendLogs builder with application/json body
func NewAppendLogsRequestWithBody ¶
func NewAppendLogsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewAppendLogsRequestWithBody generates requests for AppendLogs with any type of body
func NewCheckGateRequest ¶
func NewCheckGateRequest(server string, body CheckGateJSONRequestBody) (*http.Request, error)
NewCheckGateRequest calls the generic CheckGate builder with application/json body
func NewCheckGateRequestWithBody ¶
func NewCheckGateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCheckGateRequestWithBody generates requests for CheckGate with any type of body
func NewFinalizeExecutionRequest ¶
func NewFinalizeExecutionRequest(server string, body FinalizeExecutionJSONRequestBody) (*http.Request, error)
NewFinalizeExecutionRequest calls the generic FinalizeExecution builder with application/json body
func NewFinalizeExecutionRequestWithBody ¶
func NewFinalizeExecutionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewFinalizeExecutionRequestWithBody generates requests for FinalizeExecution with any type of body
func NewGetExecutionRequest ¶
NewGetExecutionRequest generates requests for GetExecution
func NewGetPRRequest ¶ added in v0.27.0
NewGetPRRequest generates requests for GetPR
func NewInitExecutionRequest ¶
func NewInitExecutionRequest(server string, body InitExecutionJSONRequestBody) (*http.Request, error)
NewInitExecutionRequest calls the generic InitExecution builder with application/json body
func NewInitExecutionRequestWithBody ¶
func NewInitExecutionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewInitExecutionRequestWithBody generates requests for InitExecution with any type of body
func NewListApprovalsRequest ¶
NewListApprovalsRequest generates requests for ListApprovals
func NewListClaimsRequest ¶
func NewListClaimsRequest(server string, body ListClaimsJSONRequestBody) (*http.Request, error)
NewListClaimsRequest calls the generic ListClaims builder with application/json body
func NewListClaimsRequestWithBody ¶
func NewListClaimsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewListClaimsRequestWithBody generates requests for ListClaims with any type of body
func NewListExecutionsRequest ¶
func NewListExecutionsRequest(server string, params *ListExecutionsParams) (*http.Request, error)
NewListExecutionsRequest generates requests for ListExecutions
func NewReleaseClaimsRequest ¶
func NewReleaseClaimsRequest(server string, body ReleaseClaimsJSONRequestBody) (*http.Request, error)
NewReleaseClaimsRequest calls the generic ReleaseClaims builder with application/json body
func NewReleaseClaimsRequestWithBody ¶
func NewReleaseClaimsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewReleaseClaimsRequestWithBody generates requests for ReleaseClaims with any type of body
func NewReportPhaseRequest ¶
func NewReportPhaseRequest(server string, body ReportPhaseJSONRequestBody) (*http.Request, error)
NewReportPhaseRequest calls the generic ReportPhase builder with application/json body
func NewReportPhaseRequestWithBody ¶
func NewReportPhaseRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewReportPhaseRequestWithBody generates requests for ReportPhase with any type of body
func NewRevokeGateRequest ¶
func NewRevokeGateRequest(server string, body RevokeGateJSONRequestBody) (*http.Request, error)
NewRevokeGateRequest calls the generic RevokeGate builder with application/json body
func NewRevokeGateRequestWithBody ¶
func NewRevokeGateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewRevokeGateRequestWithBody generates requests for RevokeGate with any type of body
func NewUpdateStackRequest ¶
func NewUpdateStackRequest(server string, body UpdateStackJSONRequestBody) (*http.Request, error)
NewUpdateStackRequest calls the generic UpdateStack builder with application/json body
Types ¶
type AppendLogsJSONRequestBody ¶
type AppendLogsJSONRequestBody = LogChunk
AppendLogsJSONRequestBody defines body for AppendLogs for application/json ContentType.
type AppendLogsResponse ¶
func ParseAppendLogsResponse ¶
func ParseAppendLogsResponse(rsp *http.Response) (*AppendLogsResponse, error)
ParseAppendLogsResponse parses an HTTP response from a AppendLogsWithResponse call
func (AppendLogsResponse) ContentType ¶
func (r AppendLogsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (AppendLogsResponse) Status ¶
func (r AppendLogsResponse) Status() string
Status returns HTTPResponse.Status
func (AppendLogsResponse) StatusCode ¶
func (r AppendLogsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CheckGateJSONRequestBody ¶
type CheckGateJSONRequestBody = GateCheck
CheckGateJSONRequestBody defines body for CheckGate for application/json ContentType.
type CheckGateResponse ¶
type CheckGateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GateCheckOK
JSON409 *CodedError
JSON500 *CodedError
JSON503 *CodedError
}
func ParseCheckGateResponse ¶
func ParseCheckGateResponse(rsp *http.Response) (*CheckGateResponse, error)
ParseCheckGateResponse parses an HTTP response from a CheckGateWithResponse call
func (CheckGateResponse) ContentType ¶
func (r CheckGateResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CheckGateResponse) Status ¶
func (r CheckGateResponse) Status() string
Status returns HTTPResponse.Status
func (CheckGateResponse) StatusCode ¶
func (r CheckGateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ClaimsListRequest ¶
type ClaimsListRequest struct {
Environment string `json:"environment"`
}
ClaimsListRequest defines model for ClaimsListRequest.
type ClaimsReleaseRequest ¶
type ClaimsReleaseRequest struct {
Environment string `json:"environment"`
Pr int `json:"pr"`
// Stack Empty releases all of the PR's claims in the environment.
Stack string `json:"stack"`
}
ClaimsReleaseRequest defines model for ClaimsReleaseRequest.
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) AppendLogs ¶
func (c *Client) AppendLogs(ctx context.Context, body AppendLogsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) AppendLogsWithBody ¶
func (*Client) CheckGate ¶
func (c *Client) CheckGate(ctx context.Context, body CheckGateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CheckGateWithBody ¶
func (*Client) FinalizeExecution ¶
func (c *Client) FinalizeExecution(ctx context.Context, body FinalizeExecutionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) FinalizeExecutionWithBody ¶
func (*Client) GetExecution ¶
func (*Client) InitExecution ¶
func (c *Client) InitExecution(ctx context.Context, body InitExecutionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) InitExecutionWithBody ¶
func (*Client) ListApprovals ¶
func (*Client) ListClaims ¶
func (c *Client) ListClaims(ctx context.Context, body ListClaimsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListClaimsWithBody ¶
func (*Client) ListExecutions ¶
func (c *Client) ListExecutions(ctx context.Context, params *ListExecutionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ReleaseClaims ¶
func (c *Client) ReleaseClaims(ctx context.Context, body ReleaseClaimsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ReleaseClaimsWithBody ¶
func (*Client) ReportPhase ¶
func (c *Client) ReportPhase(ctx context.Context, body ReportPhaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ReportPhaseWithBody ¶
func (*Client) RevokeGate ¶
func (c *Client) RevokeGate(ctx context.Context, body RevokeGateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RevokeGateWithBody ¶
func (*Client) UpdateStack ¶
func (c *Client) UpdateStack(ctx context.Context, body UpdateStackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// ListApprovals request
ListApprovals(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListClaimsWithBody request with any body
ListClaimsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ListClaims(ctx context.Context, body ListClaimsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReleaseClaimsWithBody request with any body
ReleaseClaimsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ReleaseClaims(ctx context.Context, body ReleaseClaimsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetExecution request
GetExecution(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListExecutions request
ListExecutions(ctx context.Context, params *ListExecutionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// FinalizeExecutionWithBody request with any body
FinalizeExecutionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
FinalizeExecution(ctx context.Context, body FinalizeExecutionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CheckGateWithBody request with any body
CheckGateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CheckGate(ctx context.Context, body CheckGateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RevokeGateWithBody request with any body
RevokeGateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RevokeGate(ctx context.Context, body RevokeGateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// InitExecutionWithBody request with any body
InitExecutionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
InitExecution(ctx context.Context, body InitExecutionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// AppendLogsWithBody request with any body
AppendLogsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AppendLogs(ctx context.Context, body AppendLogsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReportPhaseWithBody request with any body
ReportPhaseWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ReportPhase(ctx context.Context, body ReportPhaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetPR request
GetPR(ctx context.Context, n int, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateStackWithBody request with any body
UpdateStackWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateStack(ctx context.Context, body UpdateStackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) AppendLogsWithBodyWithResponse ¶
func (c *ClientWithResponses) AppendLogsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AppendLogsResponse, error)
AppendLogsWithBodyWithResponse request with arbitrary body returning *AppendLogsResponse
func (*ClientWithResponses) AppendLogsWithResponse ¶
func (c *ClientWithResponses) AppendLogsWithResponse(ctx context.Context, body AppendLogsJSONRequestBody, reqEditors ...RequestEditorFn) (*AppendLogsResponse, error)
func (*ClientWithResponses) CheckGateWithBodyWithResponse ¶
func (c *ClientWithResponses) CheckGateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CheckGateResponse, error)
CheckGateWithBodyWithResponse request with arbitrary body returning *CheckGateResponse
func (*ClientWithResponses) CheckGateWithResponse ¶
func (c *ClientWithResponses) CheckGateWithResponse(ctx context.Context, body CheckGateJSONRequestBody, reqEditors ...RequestEditorFn) (*CheckGateResponse, error)
func (*ClientWithResponses) FinalizeExecutionWithBodyWithResponse ¶
func (c *ClientWithResponses) FinalizeExecutionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FinalizeExecutionResponse, error)
FinalizeExecutionWithBodyWithResponse request with arbitrary body returning *FinalizeExecutionResponse
func (*ClientWithResponses) FinalizeExecutionWithResponse ¶
func (c *ClientWithResponses) FinalizeExecutionWithResponse(ctx context.Context, body FinalizeExecutionJSONRequestBody, reqEditors ...RequestEditorFn) (*FinalizeExecutionResponse, error)
func (*ClientWithResponses) GetExecutionWithResponse ¶
func (c *ClientWithResponses) GetExecutionWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetExecutionResponse, error)
GetExecutionWithResponse request returning *GetExecutionResponse
func (*ClientWithResponses) GetPRWithResponse ¶ added in v0.27.0
func (c *ClientWithResponses) GetPRWithResponse(ctx context.Context, n int, reqEditors ...RequestEditorFn) (*GetPRResponse, error)
GetPRWithResponse request returning *GetPRResponse
func (*ClientWithResponses) InitExecutionWithBodyWithResponse ¶
func (c *ClientWithResponses) InitExecutionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*InitExecutionResponse, error)
InitExecutionWithBodyWithResponse request with arbitrary body returning *InitExecutionResponse
func (*ClientWithResponses) InitExecutionWithResponse ¶
func (c *ClientWithResponses) InitExecutionWithResponse(ctx context.Context, body InitExecutionJSONRequestBody, reqEditors ...RequestEditorFn) (*InitExecutionResponse, error)
func (*ClientWithResponses) ListApprovalsWithResponse ¶
func (c *ClientWithResponses) ListApprovalsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListApprovalsResponse, error)
ListApprovalsWithResponse request returning *ListApprovalsResponse
func (*ClientWithResponses) ListClaimsWithBodyWithResponse ¶
func (c *ClientWithResponses) ListClaimsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListClaimsResponse, error)
ListClaimsWithBodyWithResponse request with arbitrary body returning *ListClaimsResponse
func (*ClientWithResponses) ListClaimsWithResponse ¶
func (c *ClientWithResponses) ListClaimsWithResponse(ctx context.Context, body ListClaimsJSONRequestBody, reqEditors ...RequestEditorFn) (*ListClaimsResponse, error)
func (*ClientWithResponses) ListExecutionsWithResponse ¶
func (c *ClientWithResponses) ListExecutionsWithResponse(ctx context.Context, params *ListExecutionsParams, reqEditors ...RequestEditorFn) (*ListExecutionsResponse, error)
ListExecutionsWithResponse request returning *ListExecutionsResponse
func (*ClientWithResponses) ReleaseClaimsWithBodyWithResponse ¶
func (c *ClientWithResponses) ReleaseClaimsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReleaseClaimsResponse, error)
ReleaseClaimsWithBodyWithResponse request with arbitrary body returning *ReleaseClaimsResponse
func (*ClientWithResponses) ReleaseClaimsWithResponse ¶
func (c *ClientWithResponses) ReleaseClaimsWithResponse(ctx context.Context, body ReleaseClaimsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReleaseClaimsResponse, error)
func (*ClientWithResponses) ReportPhaseWithBodyWithResponse ¶
func (c *ClientWithResponses) ReportPhaseWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportPhaseResponse, error)
ReportPhaseWithBodyWithResponse request with arbitrary body returning *ReportPhaseResponse
func (*ClientWithResponses) ReportPhaseWithResponse ¶
func (c *ClientWithResponses) ReportPhaseWithResponse(ctx context.Context, body ReportPhaseJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportPhaseResponse, error)
func (*ClientWithResponses) RevokeGateWithBodyWithResponse ¶
func (c *ClientWithResponses) RevokeGateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeGateResponse, error)
RevokeGateWithBodyWithResponse request with arbitrary body returning *RevokeGateResponse
func (*ClientWithResponses) RevokeGateWithResponse ¶
func (c *ClientWithResponses) RevokeGateWithResponse(ctx context.Context, body RevokeGateJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeGateResponse, error)
func (*ClientWithResponses) UpdateStackWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateStackWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateStackResponse, error)
UpdateStackWithBodyWithResponse request with arbitrary body returning *UpdateStackResponse
func (*ClientWithResponses) UpdateStackWithResponse ¶
func (c *ClientWithResponses) UpdateStackWithResponse(ctx context.Context, body UpdateStackJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateStackResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListApprovalsWithResponse request
ListApprovalsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListApprovalsResponse, error)
// ListClaimsWithBodyWithResponse request with any body
ListClaimsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListClaimsResponse, error)
ListClaimsWithResponse(ctx context.Context, body ListClaimsJSONRequestBody, reqEditors ...RequestEditorFn) (*ListClaimsResponse, error)
// ReleaseClaimsWithBodyWithResponse request with any body
ReleaseClaimsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReleaseClaimsResponse, error)
ReleaseClaimsWithResponse(ctx context.Context, body ReleaseClaimsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReleaseClaimsResponse, error)
// GetExecutionWithResponse request
GetExecutionWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetExecutionResponse, error)
// ListExecutionsWithResponse request
ListExecutionsWithResponse(ctx context.Context, params *ListExecutionsParams, reqEditors ...RequestEditorFn) (*ListExecutionsResponse, error)
// FinalizeExecutionWithBodyWithResponse request with any body
FinalizeExecutionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FinalizeExecutionResponse, error)
FinalizeExecutionWithResponse(ctx context.Context, body FinalizeExecutionJSONRequestBody, reqEditors ...RequestEditorFn) (*FinalizeExecutionResponse, error)
// CheckGateWithBodyWithResponse request with any body
CheckGateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CheckGateResponse, error)
CheckGateWithResponse(ctx context.Context, body CheckGateJSONRequestBody, reqEditors ...RequestEditorFn) (*CheckGateResponse, error)
// RevokeGateWithBodyWithResponse request with any body
RevokeGateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeGateResponse, error)
RevokeGateWithResponse(ctx context.Context, body RevokeGateJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeGateResponse, error)
// InitExecutionWithBodyWithResponse request with any body
InitExecutionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*InitExecutionResponse, error)
InitExecutionWithResponse(ctx context.Context, body InitExecutionJSONRequestBody, reqEditors ...RequestEditorFn) (*InitExecutionResponse, error)
// AppendLogsWithBodyWithResponse request with any body
AppendLogsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AppendLogsResponse, error)
AppendLogsWithResponse(ctx context.Context, body AppendLogsJSONRequestBody, reqEditors ...RequestEditorFn) (*AppendLogsResponse, error)
// ReportPhaseWithBodyWithResponse request with any body
ReportPhaseWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportPhaseResponse, error)
ReportPhaseWithResponse(ctx context.Context, body ReportPhaseJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportPhaseResponse, error)
// GetPRWithResponse request
GetPRWithResponse(ctx context.Context, n int, reqEditors ...RequestEditorFn) (*GetPRResponse, error)
// UpdateStackWithBodyWithResponse request with any body
UpdateStackWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateStackResponse, error)
UpdateStackWithResponse(ctx context.Context, body UpdateStackJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateStackResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CodedError ¶
type CodedError struct {
// Code e.g. GATE-001, GATE-002, GATE-003, SRV-001
Code string `json:"code"`
Message string `json:"message"`
}
CodedError Machine-readable error: HTTP status carries the coarse class, code the precise condition callers switch on.
type ExecutionDetail ¶
type ExecutionDetail struct {
// CheckRunID A database nullable int64, serialized raw (historical accident, preserved for wire compatibility).
CheckRunID NullInt64 `json:"CheckRunID"`
CreatedAt time.Time `json:"CreatedAt"`
Environment string `json:"Environment"`
ID string `json:"ID"`
LogURL string `json:"LogURL"`
PR int `json:"PR"`
Phase string `json:"Phase"`
Repo string `json:"Repo"`
ReportMarkdown string `json:"ReportMarkdown"`
Rev int `json:"Rev"`
SHA string `json:"SHA"`
// Status Execution-level status (in_progress/success/failure).
Status string `json:"Status"`
StatusContext string `json:"StatusContext"`
SupersededBy string `json:"SupersededBy"`
Gates []StoredGateTarget `json:"gates"`
// Graph The changed subgraph for one execution.
Graph Graph `json:"graph"`
// VerifyExecutionId Latest verify execution for the same (pr, environment), "" when none. Additive (2026-07) — snake_case unlike its legacy siblings.
VerifyExecutionId string `json:"verify_execution_id"`
}
ExecutionDetail The full execution read. Top-level and gate keys are PascalCase with a raw NullInt64 (see getExecution).
type ExecutionSummary ¶
type ExecutionSummary struct {
// Context The commit-status context the run drives (e.g. plan/<env>, apply/<env>, verify/<env>).
Context string `json:"context"`
CreatedAt time.Time `json:"created_at"`
Environment string `json:"environment"`
Id string `json:"id"`
LogUrl string `json:"log_url"`
// Phase Current lifecycle phase ("" before the first phase event).
Phase string `json:"phase"`
Pr int `json:"pr"`
Repo string `json:"repo"`
Sha string `json:"sha"`
// Status Execution-level status (in_progress/success/failure).
Status string `json:"status"`
// SupersededBy Id of the execution that superseded this one ("" when live).
SupersededBy string `json:"superseded_by"`
}
ExecutionSummary One execution in a list view — everything but the graph and the rendered report.
type FinalizeExecutionJSONRequestBody ¶
type FinalizeExecutionJSONRequestBody = Finalize
FinalizeExecutionJSONRequestBody defines body for FinalizeExecution for application/json ContentType.
type FinalizeExecutionResponse ¶
func ParseFinalizeExecutionResponse ¶
func ParseFinalizeExecutionResponse(rsp *http.Response) (*FinalizeExecutionResponse, error)
ParseFinalizeExecutionResponse parses an HTTP response from a FinalizeExecutionWithResponse call
func (FinalizeExecutionResponse) ContentType ¶
func (r FinalizeExecutionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (FinalizeExecutionResponse) Status ¶
func (r FinalizeExecutionResponse) Status() string
Status returns HTTPResponse.Status
func (FinalizeExecutionResponse) StatusCode ¶
func (r FinalizeExecutionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GateCheckOK ¶
type GateCheckOK struct {
// Requester Leased requester SA the apply impersonates; empty for a clean/no-gate pass.
Requester string `json:"requester"`
}
GateCheckOK A passing gate check.
type GateTarget ¶
type GateTarget = events.GateTarget
GateTarget One thing that must be approved: a classification class against a target (e.g. a cloud project).
type GetExecutionResponse ¶
type GetExecutionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ExecutionDetail
}
func ParseGetExecutionResponse ¶
func ParseGetExecutionResponse(rsp *http.Response) (*GetExecutionResponse, error)
ParseGetExecutionResponse parses an HTTP response from a GetExecutionWithResponse call
func (GetExecutionResponse) ContentType ¶
func (r GetExecutionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetExecutionResponse) Status ¶
func (r GetExecutionResponse) Status() string
Status returns HTTPResponse.Status
func (GetExecutionResponse) StatusCode ¶
func (r GetExecutionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPRResponse ¶ added in v0.27.0
func ParseGetPRResponse ¶ added in v0.27.0
func ParseGetPRResponse(rsp *http.Response) (*GetPRResponse, error)
ParseGetPRResponse parses an HTTP response from a GetPRWithResponse call
func (GetPRResponse) ContentType ¶ added in v0.27.0
func (r GetPRResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetPRResponse) Status ¶ added in v0.27.0
func (r GetPRResponse) Status() string
Status returns HTTPResponse.Status
func (GetPRResponse) StatusCode ¶ added in v0.27.0
func (r GetPRResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InitExecutionJSONRequestBody ¶
type InitExecutionJSONRequestBody = Init
InitExecutionJSONRequestBody defines body for InitExecution for application/json ContentType.
type InitExecutionResponse ¶
func ParseInitExecutionResponse ¶
func ParseInitExecutionResponse(rsp *http.Response) (*InitExecutionResponse, error)
ParseInitExecutionResponse parses an HTTP response from a InitExecutionWithResponse call
func (InitExecutionResponse) ContentType ¶
func (r InitExecutionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (InitExecutionResponse) Status ¶
func (r InitExecutionResponse) Status() string
Status returns HTTPResponse.Status
func (InitExecutionResponse) StatusCode ¶
func (r InitExecutionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type ListApprovalsResponse ¶
type ListApprovalsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]PendingApproval
}
func ParseListApprovalsResponse ¶
func ParseListApprovalsResponse(rsp *http.Response) (*ListApprovalsResponse, error)
ParseListApprovalsResponse parses an HTTP response from a ListApprovalsWithResponse call
func (ListApprovalsResponse) ContentType ¶
func (r ListApprovalsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListApprovalsResponse) Status ¶
func (r ListApprovalsResponse) Status() string
Status returns HTTPResponse.Status
func (ListApprovalsResponse) StatusCode ¶
func (r ListApprovalsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListClaimsJSONRequestBody ¶
type ListClaimsJSONRequestBody = ClaimsListRequest
ListClaimsJSONRequestBody defines body for ListClaims for application/json ContentType.
type ListClaimsResponse ¶
func ParseListClaimsResponse ¶
func ParseListClaimsResponse(rsp *http.Response) (*ListClaimsResponse, error)
ParseListClaimsResponse parses an HTTP response from a ListClaimsWithResponse call
func (ListClaimsResponse) ContentType ¶
func (r ListClaimsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListClaimsResponse) Status ¶
func (r ListClaimsResponse) Status() string
Status returns HTTPResponse.Status
func (ListClaimsResponse) StatusCode ¶
func (r ListClaimsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListExecutionsParams ¶
type ListExecutionsParams struct {
// Pr Only executions for this pull request.
Pr *int `form:"pr,omitempty" json:"pr,omitempty"`
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
ListExecutionsParams defines parameters for ListExecutions.
type ListExecutionsResponse ¶
type ListExecutionsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]ExecutionSummary
}
func ParseListExecutionsResponse ¶
func ParseListExecutionsResponse(rsp *http.Response) (*ListExecutionsResponse, error)
ParseListExecutionsResponse parses an HTTP response from a ListExecutionsWithResponse call
func (ListExecutionsResponse) ContentType ¶
func (r ListExecutionsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListExecutionsResponse) Status ¶
func (r ListExecutionsResponse) Status() string
Status returns HTTPResponse.Status
func (ListExecutionsResponse) StatusCode ¶
func (r ListExecutionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type NullInt64 ¶
NullInt64 A database nullable int64, serialized raw (historical accident, preserved for wire compatibility).
type PRMergeState ¶ added in v0.27.0
type PRMergeState struct {
// Blocker Short human-readable blocker reason ("" when not blocked).
Blocker string `json:"blocker"`
// CheckConclusion GitHub check conclusion vocabulary; "" means still in progress.
CheckConclusion string `json:"check_conclusion"`
// Environment This serve's tier (empty when the tier has none configured).
Environment string `json:"environment"`
MergeBlocked bool `json:"merge_blocked"`
// RequiredCheck The check name that gates merge (e.g. apply-lock/<env> or terraform/<env>).
RequiredCheck string `json:"required_check"`
}
PRMergeState A PR's merge-readiness on this serve's tier.
type PRMeta ¶ added in v0.27.0
type PRMeta struct {
AuthorLogin string `json:"author_login"`
AutoMerge bool `json:"auto_merge"`
Body string `json:"body"`
HeadRef string `json:"head_ref"`
Title string `json:"title"`
Url string `json:"url"`
}
PRMeta PR-level identity as last reported by the GitHub webhook (title, author, branch, automerge).
type PRView ¶ added in v0.27.0
type PRView struct {
// Merge A PR's merge-readiness on this serve's tier.
Merge PRMergeState `json:"merge"`
// Meta PR-level identity as last reported by the GitHub webhook (title, author, branch, automerge).
Meta *PRMeta `json:"meta,omitempty"`
Pr int `json:"pr"`
// Repo Repo of the PR's latest execution ("" when none).
Repo string `json:"repo"`
}
PRView A PR's identity and per-tier merge state.
type PendingApproval ¶
type PendingApproval struct {
Class string `json:"class"`
Environment string `json:"environment"`
// GrantName The approval-backend grant resource name ("" until a grant exists).
GrantName string `json:"grant_name"`
Pr int `json:"pr"`
// Repo Repo of the PR's latest execution in this environment ("" when none).
Repo string `json:"repo"`
// Requester Leased requester SA for this grant.
Requester string `json:"requester"`
// State Backend grant state (e.g. AWAITING, ACTIVATING, DENIED, REVOKED).
State string `json:"state"`
Target string `json:"target"`
}
PendingApproval One gate target awaiting human action, with its PR context.
type PhaseEvent ¶
type PhaseEvent = events.PhaseEvent
PhaseEvent Narrates a lifecycle phase transition (may arrive before Init).
type ReleaseClaimsJSONRequestBody ¶
type ReleaseClaimsJSONRequestBody = ClaimsReleaseRequest
ReleaseClaimsJSONRequestBody defines body for ReleaseClaims for application/json ContentType.
type ReleaseClaimsResponse ¶
func ParseReleaseClaimsResponse ¶
func ParseReleaseClaimsResponse(rsp *http.Response) (*ReleaseClaimsResponse, error)
ParseReleaseClaimsResponse parses an HTTP response from a ReleaseClaimsWithResponse call
func (ReleaseClaimsResponse) ContentType ¶
func (r ReleaseClaimsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ReleaseClaimsResponse) Status ¶
func (r ReleaseClaimsResponse) Status() string
Status returns HTTPResponse.Status
func (ReleaseClaimsResponse) StatusCode ¶
func (r ReleaseClaimsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ReportPhaseJSONRequestBody ¶
type ReportPhaseJSONRequestBody = PhaseEvent
ReportPhaseJSONRequestBody defines body for ReportPhase for application/json ContentType.
type ReportPhaseResponse ¶
func ParseReportPhaseResponse ¶
func ParseReportPhaseResponse(rsp *http.Response) (*ReportPhaseResponse, error)
ParseReportPhaseResponse parses an HTTP response from a ReportPhaseWithResponse call
func (ReportPhaseResponse) ContentType ¶
func (r ReportPhaseResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ReportPhaseResponse) Status ¶
func (r ReportPhaseResponse) Status() string
Status returns HTTPResponse.Status
func (ReportPhaseResponse) StatusCode ¶
func (r ReportPhaseResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequiredHeaderError ¶
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 RevokeGateJSONRequestBody ¶
type RevokeGateJSONRequestBody = GateRevoke
RevokeGateJSONRequestBody defines body for RevokeGate for application/json ContentType.
type RevokeGateResponse ¶
func ParseRevokeGateResponse ¶
func ParseRevokeGateResponse(rsp *http.Response) (*RevokeGateResponse, error)
ParseRevokeGateResponse parses an HTTP response from a RevokeGateWithResponse call
func (RevokeGateResponse) ContentType ¶
func (r RevokeGateResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RevokeGateResponse) Status ¶
func (r RevokeGateResponse) Status() string
Status returns HTTPResponse.Status
func (RevokeGateResponse) StatusCode ¶
func (r RevokeGateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ServeMux ¶
type ServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
http.Handler
}
ServeMux is an abstraction of http.ServeMux.
type ServerInterface ¶
type ServerInterface interface {
// List gate targets awaiting human action, across all PRs
// (GET /api/approvals)
ListApprovals(w http.ResponseWriter, r *http.Request)
// List the apply-lock claims for an environment
// (POST /api/claims/list)
ListClaims(w http.ResponseWriter, r *http.Request)
// Admin-release one stack's claim or all of a PR's claims
// (POST /api/claims/release)
ReleaseClaims(w http.ResponseWriter, r *http.Request)
// Read one execution's full state
// (GET /api/execution/{id})
GetExecution(w http.ResponseWriter, r *http.Request, id string)
// List executions, newest first
// (GET /api/executions)
ListExecutions(w http.ResponseWriter, r *http.Request, params ListExecutionsParams)
// Record the terminal plan state
// (POST /api/finalize)
FinalizeExecution(w http.ResponseWriter, r *http.Request)
// Apply-time, fail-closed gate pre-check
// (POST /api/gate/check)
CheckGate(w http.ResponseWriter, r *http.Request)
// Revoke the grants requested for (pr, environment)
// (POST /api/gate/revoke)
RevokeGate(w http.ResponseWriter, r *http.Request)
// Register an execution and its changed subgraph
// (POST /api/init)
InitExecution(w http.ResponseWriter, r *http.Request)
// Ingest a per-stack output chunk
// (POST /api/logs)
AppendLogs(w http.ResponseWriter, r *http.Request)
// Narrate a lifecycle phase transition
// (POST /api/phase)
ReportPhase(w http.ResponseWriter, r *http.Request)
// Read a pull request's identity and per-tier merge state
// (GET /api/pr/{n})
GetPR(w http.ResponseWriter, r *http.Request, n int)
// Tick a single stack's status
// (POST /api/update)
UpdateStack(w http.ResponseWriter, r *http.Request)
}
ServerInterface represents all server handlers.
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) AppendLogs ¶
func (siw *ServerInterfaceWrapper) AppendLogs(w http.ResponseWriter, r *http.Request)
AppendLogs operation middleware
func (*ServerInterfaceWrapper) CheckGate ¶
func (siw *ServerInterfaceWrapper) CheckGate(w http.ResponseWriter, r *http.Request)
CheckGate operation middleware
func (*ServerInterfaceWrapper) FinalizeExecution ¶
func (siw *ServerInterfaceWrapper) FinalizeExecution(w http.ResponseWriter, r *http.Request)
FinalizeExecution operation middleware
func (*ServerInterfaceWrapper) GetExecution ¶
func (siw *ServerInterfaceWrapper) GetExecution(w http.ResponseWriter, r *http.Request)
GetExecution operation middleware
func (*ServerInterfaceWrapper) GetPR ¶ added in v0.27.0
func (siw *ServerInterfaceWrapper) GetPR(w http.ResponseWriter, r *http.Request)
GetPR operation middleware
func (*ServerInterfaceWrapper) InitExecution ¶
func (siw *ServerInterfaceWrapper) InitExecution(w http.ResponseWriter, r *http.Request)
InitExecution operation middleware
func (*ServerInterfaceWrapper) ListApprovals ¶
func (siw *ServerInterfaceWrapper) ListApprovals(w http.ResponseWriter, r *http.Request)
ListApprovals operation middleware
func (*ServerInterfaceWrapper) ListClaims ¶
func (siw *ServerInterfaceWrapper) ListClaims(w http.ResponseWriter, r *http.Request)
ListClaims operation middleware
func (*ServerInterfaceWrapper) ListExecutions ¶
func (siw *ServerInterfaceWrapper) ListExecutions(w http.ResponseWriter, r *http.Request)
ListExecutions operation middleware
func (*ServerInterfaceWrapper) ReleaseClaims ¶
func (siw *ServerInterfaceWrapper) ReleaseClaims(w http.ResponseWriter, r *http.Request)
ReleaseClaims operation middleware
func (*ServerInterfaceWrapper) ReportPhase ¶
func (siw *ServerInterfaceWrapper) ReportPhase(w http.ResponseWriter, r *http.Request)
ReportPhase operation middleware
func (*ServerInterfaceWrapper) RevokeGate ¶
func (siw *ServerInterfaceWrapper) RevokeGate(w http.ResponseWriter, r *http.Request)
RevokeGate operation middleware
func (*ServerInterfaceWrapper) UpdateStack ¶
func (siw *ServerInterfaceWrapper) UpdateStack(w http.ResponseWriter, r *http.Request)
UpdateStack operation middleware
type Status ¶
Status Per-stack lifecycle status. Decoding rejects unknown non-empty values (WIRE-001); an omitted/empty status is tolerated.
type StdHTTPServerOptions ¶
type StdHTTPServerOptions struct {
BaseURL string
BaseRouter ServeMux
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type StoredGateTarget ¶
type StoredGateTarget struct {
Class string `json:"Class"`
// GrantName The approval-backend grant resource name (may be empty).
GrantName string `json:"GrantName"`
// Requester Leased requester SA for this grant.
Requester string `json:"Requester"`
// State Backend grant state (e.g. REQUESTED, ACTIVE, DENIED, REVOKED).
State string `json:"State"`
Target string `json:"Target"`
}
StoredGateTarget A recorded gate target with its grant state (PascalCase keys).
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpdateStackJSONRequestBody ¶
type UpdateStackJSONRequestBody = Update
UpdateStackJSONRequestBody defines body for UpdateStack for application/json ContentType.
type UpdateStackResponse ¶
func ParseUpdateStackResponse ¶
func ParseUpdateStackResponse(rsp *http.Response) (*UpdateStackResponse, error)
ParseUpdateStackResponse parses an HTTP response from a UpdateStackWithResponse call
func (UpdateStackResponse) ContentType ¶
func (r UpdateStackResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateStackResponse) Status ¶
func (r UpdateStackResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateStackResponse) StatusCode ¶
func (r UpdateStackResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode