version

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const GetVersionOKCode int = 200

GetVersionOKCode is the HTTP code returned for type GetVersionOK

Variables

This section is empty.

Functions

This section is empty.

Types

type GetVersion

type GetVersion struct {
	Context *middleware.Context
	Handler GetVersionHandler
}

GetVersion swagger:route GET /version version getVersion

Get the build this server is running

Reports the scorecard-infra release and commit this server was built from, and the workflow parser that verifies uploads. Cached by the CDN for the TTL in the response's Surrogate-Control header.

func NewGetVersion

func NewGetVersion(ctx *middleware.Context, handler GetVersionHandler) *GetVersion

NewGetVersion creates a new http.Handler for the get version operation

func (*GetVersion) ServeHTTP

func (o *GetVersion) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetVersionHandler

type GetVersionHandler interface {
	Handle(GetVersionParams) middleware.Responder
}

GetVersionHandler interface for that can handle valid get version params

type GetVersionHandlerFunc

type GetVersionHandlerFunc func(GetVersionParams) middleware.Responder

GetVersionHandlerFunc turns a function with the right signature into a get version handler

func (GetVersionHandlerFunc) Handle

Handle executing the request and returning a response

type GetVersionOK

type GetVersionOK struct {

	// TTL for browser caching. Example: max-age=3600
	CacheControl string `json:"Cache-Control"`

	// TTL for Fastly CDN caching. Example: max-age=3600
	SurrogateControl string `json:"Surrogate-Control"`

	// Surrogate key for Fastly CDN purging.
	SurrogateKey string `json:"Surrogate-Key"`

	// In: Body
	Payload *models.VersionInfo `json:"body,omitempty"`
}

GetVersionOK The server's build information

swagger:response getVersionOK

func NewGetVersionOK

func NewGetVersionOK() *GetVersionOK

NewGetVersionOK creates GetVersionOK with default headers values

func (*GetVersionOK) SetCacheControl

func (o *GetVersionOK) SetCacheControl(cacheControl string)

SetCacheControl sets the cacheControl to the get version o k response

func (*GetVersionOK) SetPayload

func (o *GetVersionOK) SetPayload(payload *models.VersionInfo)

SetPayload sets the payload to the get version o k response

func (*GetVersionOK) SetSurrogateControl

func (o *GetVersionOK) SetSurrogateControl(surrogateControl string)

SetSurrogateControl sets the surrogateControl to the get version o k response

func (*GetVersionOK) SetSurrogateKey

func (o *GetVersionOK) SetSurrogateKey(surrogateKey string)

SetSurrogateKey sets the surrogateKey to the get version o k response

func (*GetVersionOK) WithCacheControl

func (o *GetVersionOK) WithCacheControl(cacheControl string) *GetVersionOK

WithCacheControl adds the cacheControl to the get version o k response

func (*GetVersionOK) WithPayload

func (o *GetVersionOK) WithPayload(payload *models.VersionInfo) *GetVersionOK

WithPayload adds the payload to the get version o k response

func (*GetVersionOK) WithSurrogateControl

func (o *GetVersionOK) WithSurrogateControl(surrogateControl string) *GetVersionOK

WithSurrogateControl adds the surrogateControl to the get version o k response

func (*GetVersionOK) WithSurrogateKey

func (o *GetVersionOK) WithSurrogateKey(surrogateKey string) *GetVersionOK

WithSurrogateKey adds the surrogateKey to the get version o k response

func (*GetVersionOK) WriteResponse

func (o *GetVersionOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetVersionParams

type GetVersionParams struct {
	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`
}

GetVersionParams contains all the bound params for the get version operation typically these are obtained from a http.Request

swagger:parameters getVersion

func NewGetVersionParams

func NewGetVersionParams() GetVersionParams

NewGetVersionParams creates a new GetVersionParams object

There are no default values defined in the spec.

func (*GetVersionParams) BindRequest

func (o *GetVersionParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetVersionParams() beforehand.

type GetVersionURL

type GetVersionURL struct {
	// contains filtered or unexported fields
}

GetVersionURL generates an URL for the get version operation

func (*GetVersionURL) Build

func (o *GetVersionURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetVersionURL) BuildFull

func (o *GetVersionURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetVersionURL) Must

func (o *GetVersionURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetVersionURL) SetBasePath

func (o *GetVersionURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetVersionURL) String

func (o *GetVersionURL) String() string

String returns the string representation of the path with query string

func (*GetVersionURL) StringFull

func (o *GetVersionURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetVersionURL) WithBasePath

func (o *GetVersionURL) WithBasePath(bp string) *GetVersionURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

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