uiapi

package
v0.44.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package uiapi holds the generated OpenAPI artifacts for the central UI's backend API (api/ui.openapi.yaml): the std-http router and models. The tier-proxied schemas are x-go-type-bound to internal/api, so the UI contract re-exposes the tier contract's shapes rather than duplicating them. The SPA is the intended consumer; its TypeScript types are generated from the same document. Generated code is committed; CI verifies it is in sync.

Package uiapi 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.

Index

Constants

View Source
const (
	SessionScopes sessionContextKey = "session.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

Types

type ExecutionDetail

type ExecutionDetail = api.ExecutionDetail

ExecutionDetail The tier contract's ExecutionDetail, proxied verbatim.

type ExecutionSummary

type ExecutionSummary = api.ExecutionSummary

ExecutionSummary The tier contract's ExecutionSummary, proxied verbatim.

type GetTierLifecycleParams added in v0.37.0

type GetTierLifecycleParams struct {
	Pr int `form:"pr" json:"pr"`
}

GetTierLifecycleParams defines parameters for GetTierLifecycle.

type InspectPoolSet added in v0.37.0

type InspectPoolSet = api.InspectPoolSet

InspectPoolSet The tier contract's InspectPoolSet, proxied verbatim.

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 LifecyclePhase added in v0.37.0

type LifecyclePhase = api.LifecyclePhase

LifecyclePhase The tier contract's LifecyclePhase, proxied verbatim.

type ListTierExecutionsParams

type ListTierExecutionsParams struct {
	Pr    *int `form:"pr,omitempty" json:"pr,omitempty"`
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

ListTierExecutionsParams defines parameters for ListTierExecutions.

type Me

type Me struct {
	// Email The verified Google identity of the session.
	Email string `json:"email"`
}

Me defines model for Me.

type MergeQueue added in v0.37.0

type MergeQueue = api.MergeQueue

MergeQueue The tier contract's MergeQueue, proxied verbatim.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type PRView added in v0.27.0

type PRView = api.PRView

PRView The tier contract's PRView, proxied verbatim.

type PendingApproval

type PendingApproval = api.PendingApproval

PendingApproval The tier contract's PendingApproval, proxied verbatim.

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 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 {
	// The logged-in user
	// (GET /api/me)
	GetMe(w http.ResponseWriter, r *http.Request)
	// The configured tier serves
	// (GET /api/tiers)
	ListTiers(w http.ResponseWriter, r *http.Request)
	// One tier's pending approvals (proxied)
	// (GET /api/tiers/{tier}/approvals)
	ListTierApprovals(w http.ResponseWriter, r *http.Request, tier Tier)
	// One tier's executions (proxied)
	// (GET /api/tiers/{tier}/executions)
	ListTierExecutions(w http.ResponseWriter, r *http.Request, tier Tier, params ListTierExecutionsParams)
	// One tier execution's full state (proxied)
	// (GET /api/tiers/{tier}/executions/{id})
	GetTierExecution(w http.ResponseWriter, r *http.Request, tier Tier, id string)
	// One tier's applier-pool slot occupancy and waiting list (proxied)
	// (GET /api/tiers/{tier}/inspect/pool)
	GetTierPool(w http.ResponseWriter, r *http.Request, tier Tier)
	// One tier's folded PR lifecycle timeline (proxied)
	// (GET /api/tiers/{tier}/lifecycle)
	GetTierLifecycle(w http.ResponseWriter, r *http.Request, tier Tier, params GetTierLifecycleParams)
	// One tier's view of the repo's GitHub merge queue (proxied)
	// (GET /api/tiers/{tier}/merge-queue)
	GetTierMergeQueue(w http.ResponseWriter, r *http.Request, tier Tier)
	// One tier's view of a PR's identity and merge state (proxied)
	// (GET /api/tiers/{tier}/pr/{n})
	GetTierPR(w http.ResponseWriter, r *http.Request, tier Tier, n int)
}

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) GetMe

GetMe operation middleware

func (*ServerInterfaceWrapper) GetTierExecution

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

GetTierExecution operation middleware

func (*ServerInterfaceWrapper) GetTierLifecycle added in v0.37.0

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

GetTierLifecycle operation middleware

func (*ServerInterfaceWrapper) GetTierMergeQueue added in v0.37.0

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

GetTierMergeQueue operation middleware

func (*ServerInterfaceWrapper) GetTierPR added in v0.27.0

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

GetTierPR operation middleware

func (*ServerInterfaceWrapper) GetTierPool added in v0.37.0

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

GetTierPool operation middleware

func (*ServerInterfaceWrapper) ListTierApprovals

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

ListTierApprovals operation middleware

func (*ServerInterfaceWrapper) ListTierExecutions

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

ListTierExecutions operation middleware

func (*ServerInterfaceWrapper) ListTiers

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

ListTiers operation middleware

type StdHTTPServerOptions

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

type Tier

type Tier = string

Tier defines model for Tier.

type TierInfo

type TierInfo struct {
	Name string `json:"name"`
	Url  string `json:"url"`
}

TierInfo defines model for TierInfo.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) 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 UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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