operations

package
v0.0.0-...-8183610 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const GetPipelineNotFoundCode int = 404

GetPipelineNotFoundCode is the HTTP code returned for type GetPipelineNotFound

View Source
const GetPipelineOKCode int = 200

GetPipelineOKCode is the HTTP code returned for type GetPipelineOK

View Source
const ListJobsOKCode int = 200

ListJobsOKCode is the HTTP code returned for type ListJobsOK

View Source
const ListPipelinesOKCode int = 200

ListPipelinesOKCode is the HTTP code returned for type ListPipelinesOK

View Source
const StartPipelineOKCode int = 200

StartPipelineOKCode is the HTTP code returned for type StartPipelineOK

Variables

This section is empty.

Functions

This section is empty.

Types

type GetPipeline

type GetPipeline struct {
	Context *middleware.Context
	Handler GetPipelineHandler
}
GetPipeline swagger:route GET /pipeline/{name} getPipeline

Start specific pipeline information

func NewGetPipeline

func NewGetPipeline(ctx *middleware.Context, handler GetPipelineHandler) *GetPipeline

NewGetPipeline creates a new http.Handler for the get pipeline operation

func (*GetPipeline) ServeHTTP

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

type GetPipelineHandler

type GetPipelineHandler interface {
	Handle(GetPipelineParams) middleware.Responder
}

GetPipelineHandler interface for that can handle valid get pipeline params

type GetPipelineHandlerFunc

type GetPipelineHandlerFunc func(GetPipelineParams) middleware.Responder

GetPipelineHandlerFunc turns a function with the right signature into a get pipeline handler

func (GetPipelineHandlerFunc) Handle

Handle executing the request and returning a response

type GetPipelineNotFound

type GetPipelineNotFound struct {
}

GetPipelineNotFound Pipeline not found

swagger:response getPipelineNotFound

func NewGetPipelineNotFound

func NewGetPipelineNotFound() *GetPipelineNotFound

NewGetPipelineNotFound creates GetPipelineNotFound with default headers values

func (*GetPipelineNotFound) WriteResponse

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

WriteResponse to the client

type GetPipelineOK

type GetPipelineOK struct {

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

GetPipelineOK Pipeline infomation

swagger:response getPipelineOK

func NewGetPipelineOK

func NewGetPipelineOK() *GetPipelineOK

NewGetPipelineOK creates GetPipelineOK with default headers values

func (*GetPipelineOK) SetPayload

func (o *GetPipelineOK) SetPayload(payload *models.PipelineWithBuilds)

SetPayload sets the payload to the get pipeline o k response

func (*GetPipelineOK) WithPayload

func (o *GetPipelineOK) WithPayload(payload *models.PipelineWithBuilds) *GetPipelineOK

WithPayload adds the payload to the get pipeline o k response

func (*GetPipelineOK) WriteResponse

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

WriteResponse to the client

type GetPipelineParams

type GetPipelineParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  In: path
	*/
	Name string
}

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

swagger:parameters getPipeline

func NewGetPipelineParams

func NewGetPipelineParams() GetPipelineParams

NewGetPipelineParams creates a new GetPipelineParams object

There are no default values defined in the spec.

func (*GetPipelineParams) BindRequest

func (o *GetPipelineParams) 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 NewGetPipelineParams() beforehand.

type GetPipelineURL

type GetPipelineURL struct {
	Name string
	// contains filtered or unexported fields
}

GetPipelineURL generates an URL for the get pipeline operation

func (*GetPipelineURL) Build

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

Build a url path and query string

func (*GetPipelineURL) BuildFull

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

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

func (*GetPipelineURL) Must

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

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

func (*GetPipelineURL) SetBasePath

func (o *GetPipelineURL) 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 (*GetPipelineURL) String

func (o *GetPipelineURL) String() string

String returns the string representation of the path with query string

func (*GetPipelineURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetPipelineURL) WithBasePath

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

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

type GoBuildserverAPI

type GoBuildserverAPI struct {
	Middleware func(middleware.Builder) http.Handler

	// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator

	// APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator

	// BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator

	// JSONConsumer registers a consumer for the following mime types:
	//   - application/json
	JSONConsumer runtime.Consumer
	// UrlformConsumer registers a consumer for the following mime types:
	//   - application/x-www-form-urlencoded
	UrlformConsumer runtime.Consumer
	// XMLConsumer registers a consumer for the following mime types:
	//   - application/xml
	XMLConsumer runtime.Consumer

	// JSONProducer registers a producer for the following mime types:
	//   - application/json
	JSONProducer runtime.Producer

	// GetPipelineHandler sets the operation handler for the get pipeline operation
	GetPipelineHandler GetPipelineHandler
	// ListJobsHandler sets the operation handler for the list jobs operation
	ListJobsHandler ListJobsHandler
	// ListPipelinesHandler sets the operation handler for the list pipelines operation
	ListPipelinesHandler ListPipelinesHandler
	// StartPipelineHandler sets the operation handler for the start pipeline operation
	StartPipelineHandler StartPipelineHandler

	// ServeError is called when an error is received, there is a default handler
	// but you can set your own with this
	ServeError func(http.ResponseWriter, *http.Request, error)

	// PreServerShutdown is called before the HTTP(S) server is shutdown
	// This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic
	PreServerShutdown func()

	// ServerShutdown is called when the HTTP(S) server is shut down and done
	// handling all active connections and does not accept connections any more
	ServerShutdown func()

	// Custom command line argument groups with their descriptions
	CommandLineOptionsGroups []swag.CommandLineOptionsGroup

	// User defined logger function.
	Logger func(string, ...interface{})
	// contains filtered or unexported fields
}

GoBuildserverAPI the go buildserver API

func NewGoBuildserverAPI

func NewGoBuildserverAPI(spec *loads.Document) *GoBuildserverAPI

NewGoBuildserverAPI creates a new GoBuildserver instance

func (*GoBuildserverAPI) AddMiddlewareFor

func (o *GoBuildserverAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)

AddMiddlewareFor adds a http middleware to existing handler

func (*GoBuildserverAPI) AuthenticatorsFor

func (o *GoBuildserverAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*GoBuildserverAPI) Authorizer

func (o *GoBuildserverAPI) Authorizer() runtime.Authorizer

Authorizer returns the registered authorizer

func (*GoBuildserverAPI) ConsumersFor

func (o *GoBuildserverAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer

ConsumersFor gets the consumers for the specified media types. MIME type parameters are ignored here.

func (*GoBuildserverAPI) Context

func (o *GoBuildserverAPI) Context() *middleware.Context

Context returns the middleware context for the go buildserver API

func (*GoBuildserverAPI) DefaultConsumes

func (o *GoBuildserverAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*GoBuildserverAPI) DefaultProduces

func (o *GoBuildserverAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*GoBuildserverAPI) Formats

func (o *GoBuildserverAPI) Formats() strfmt.Registry

Formats returns the registered string formats

func (*GoBuildserverAPI) HandlerFor

func (o *GoBuildserverAPI) HandlerFor(method, path string) (http.Handler, bool)

HandlerFor gets a http.Handler for the provided operation method and path

func (*GoBuildserverAPI) Init

func (o *GoBuildserverAPI) Init()

Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit

func (*GoBuildserverAPI) ProducersFor

func (o *GoBuildserverAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer

ProducersFor gets the producers for the specified media types. MIME type parameters are ignored here.

func (*GoBuildserverAPI) RegisterConsumer

func (o *GoBuildserverAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)

RegisterConsumer allows you to add (or override) a consumer for a media type.

func (*GoBuildserverAPI) RegisterFormat

func (o *GoBuildserverAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)

RegisterFormat registers a custom format validator

func (*GoBuildserverAPI) RegisterProducer

func (o *GoBuildserverAPI) RegisterProducer(mediaType string, producer runtime.Producer)

RegisterProducer allows you to add (or override) a producer for a media type.

func (*GoBuildserverAPI) Serve

func (o *GoBuildserverAPI) Serve(builder middleware.Builder) http.Handler

Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))

func (*GoBuildserverAPI) ServeErrorFor

func (o *GoBuildserverAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)

ServeErrorFor gets a error handler for a given operation id

func (*GoBuildserverAPI) SetDefaultConsumes

func (o *GoBuildserverAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*GoBuildserverAPI) SetDefaultProduces

func (o *GoBuildserverAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*GoBuildserverAPI) SetSpec

func (o *GoBuildserverAPI) SetSpec(spec *loads.Document)

SetSpec sets a spec that will be served for the clients.

func (*GoBuildserverAPI) UseRedoc

func (o *GoBuildserverAPI) UseRedoc()

UseRedoc for documentation at /docs

func (*GoBuildserverAPI) UseSwaggerUI

func (o *GoBuildserverAPI) UseSwaggerUI()

UseSwaggerUI for documentation at /docs

func (*GoBuildserverAPI) Validate

func (o *GoBuildserverAPI) Validate() error

Validate validates the registrations in the GoBuildserverAPI

type ListJobs

type ListJobs struct {
	Context *middleware.Context
	Handler ListJobsHandler
}
ListJobs swagger:route GET /jobs listJobs

Get jobs

func NewListJobs

func NewListJobs(ctx *middleware.Context, handler ListJobsHandler) *ListJobs

NewListJobs creates a new http.Handler for the list jobs operation

func (*ListJobs) ServeHTTP

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

type ListJobsHandler

type ListJobsHandler interface {
	Handle(ListJobsParams) middleware.Responder
}

ListJobsHandler interface for that can handle valid list jobs params

type ListJobsHandlerFunc

type ListJobsHandlerFunc func(ListJobsParams) middleware.Responder

ListJobsHandlerFunc turns a function with the right signature into a list jobs handler

func (ListJobsHandlerFunc) Handle

Handle executing the request and returning a response

type ListJobsOK

type ListJobsOK struct {

	/*
	  In: Body
	*/
	Payload []*models.Job `json:"body,omitempty"`
}

ListJobsOK Successful operation

swagger:response listJobsOK

func NewListJobsOK

func NewListJobsOK() *ListJobsOK

NewListJobsOK creates ListJobsOK with default headers values

func (*ListJobsOK) SetPayload

func (o *ListJobsOK) SetPayload(payload []*models.Job)

SetPayload sets the payload to the list jobs o k response

func (*ListJobsOK) WithPayload

func (o *ListJobsOK) WithPayload(payload []*models.Job) *ListJobsOK

WithPayload adds the payload to the list jobs o k response

func (*ListJobsOK) WriteResponse

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

WriteResponse to the client

type ListJobsParams

type ListJobsParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`
}

ListJobsParams contains all the bound params for the list jobs operation typically these are obtained from a http.Request

swagger:parameters listJobs

func NewListJobsParams

func NewListJobsParams() ListJobsParams

NewListJobsParams creates a new ListJobsParams object

There are no default values defined in the spec.

func (*ListJobsParams) BindRequest

func (o *ListJobsParams) 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 NewListJobsParams() beforehand.

type ListJobsURL

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

ListJobsURL generates an URL for the list jobs operation

func (*ListJobsURL) Build

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

Build a url path and query string

func (*ListJobsURL) BuildFull

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

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

func (*ListJobsURL) Must

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

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

func (*ListJobsURL) SetBasePath

func (o *ListJobsURL) 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 (*ListJobsURL) String

func (o *ListJobsURL) String() string

String returns the string representation of the path with query string

func (*ListJobsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*ListJobsURL) WithBasePath

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

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

type ListPipelines

type ListPipelines struct {
	Context *middleware.Context
	Handler ListPipelinesHandler
}
ListPipelines swagger:route GET /pipelines listPipelines

Get pipelines

func NewListPipelines

func NewListPipelines(ctx *middleware.Context, handler ListPipelinesHandler) *ListPipelines

NewListPipelines creates a new http.Handler for the list pipelines operation

func (*ListPipelines) ServeHTTP

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

type ListPipelinesHandler

type ListPipelinesHandler interface {
	Handle(ListPipelinesParams) middleware.Responder
}

ListPipelinesHandler interface for that can handle valid list pipelines params

type ListPipelinesHandlerFunc

type ListPipelinesHandlerFunc func(ListPipelinesParams) middleware.Responder

ListPipelinesHandlerFunc turns a function with the right signature into a list pipelines handler

func (ListPipelinesHandlerFunc) Handle

Handle executing the request and returning a response

type ListPipelinesOK

type ListPipelinesOK struct {

	/*
	  In: Body
	*/
	Payload []*models.Pipeline `json:"body,omitempty"`
}

ListPipelinesOK Successful operation

swagger:response listPipelinesOK

func NewListPipelinesOK

func NewListPipelinesOK() *ListPipelinesOK

NewListPipelinesOK creates ListPipelinesOK with default headers values

func (*ListPipelinesOK) SetPayload

func (o *ListPipelinesOK) SetPayload(payload []*models.Pipeline)

SetPayload sets the payload to the list pipelines o k response

func (*ListPipelinesOK) WithPayload

func (o *ListPipelinesOK) WithPayload(payload []*models.Pipeline) *ListPipelinesOK

WithPayload adds the payload to the list pipelines o k response

func (*ListPipelinesOK) WriteResponse

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

WriteResponse to the client

type ListPipelinesParams

type ListPipelinesParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`
}

ListPipelinesParams contains all the bound params for the list pipelines operation typically these are obtained from a http.Request

swagger:parameters listPipelines

func NewListPipelinesParams

func NewListPipelinesParams() ListPipelinesParams

NewListPipelinesParams creates a new ListPipelinesParams object

There are no default values defined in the spec.

func (*ListPipelinesParams) BindRequest

func (o *ListPipelinesParams) 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 NewListPipelinesParams() beforehand.

type ListPipelinesURL

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

ListPipelinesURL generates an URL for the list pipelines operation

func (*ListPipelinesURL) Build

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

Build a url path and query string

func (*ListPipelinesURL) BuildFull

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

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

func (*ListPipelinesURL) Must

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

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

func (*ListPipelinesURL) SetBasePath

func (o *ListPipelinesURL) 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 (*ListPipelinesURL) String

func (o *ListPipelinesURL) String() string

String returns the string representation of the path with query string

func (*ListPipelinesURL) StringFull

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

StringFull returns the string representation of a complete url

func (*ListPipelinesURL) WithBasePath

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

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

type StartPipeline

type StartPipeline struct {
	Context *middleware.Context
	Handler StartPipelineHandler
}
StartPipeline swagger:route POST /pipeline/{name} startPipeline

Start pipeline build

func NewStartPipeline

func NewStartPipeline(ctx *middleware.Context, handler StartPipelineHandler) *StartPipeline

NewStartPipeline creates a new http.Handler for the start pipeline operation

func (*StartPipeline) ServeHTTP

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

type StartPipelineHandler

type StartPipelineHandler interface {
	Handle(StartPipelineParams) middleware.Responder
}

StartPipelineHandler interface for that can handle valid start pipeline params

type StartPipelineHandlerFunc

type StartPipelineHandlerFunc func(StartPipelineParams) middleware.Responder

StartPipelineHandlerFunc turns a function with the right signature into a start pipeline handler

func (StartPipelineHandlerFunc) Handle

Handle executing the request and returning a response

type StartPipelineOK

type StartPipelineOK struct {
}

StartPipelineOK Queued pipeline

swagger:response startPipelineOK

func NewStartPipelineOK

func NewStartPipelineOK() *StartPipelineOK

NewStartPipelineOK creates StartPipelineOK with default headers values

func (*StartPipelineOK) WriteResponse

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

WriteResponse to the client

type StartPipelineParams

type StartPipelineParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  In: body
	*/
	Data interface{}
	/*
	  Required: true
	  In: path
	*/
	Name string
	/*The reason for the build.
	  Required: true
	  In: query
	*/
	Reason string
}

StartPipelineParams contains all the bound params for the start pipeline operation typically these are obtained from a http.Request

swagger:parameters startPipeline

func NewStartPipelineParams

func NewStartPipelineParams() StartPipelineParams

NewStartPipelineParams creates a new StartPipelineParams object

There are no default values defined in the spec.

func (*StartPipelineParams) BindRequest

func (o *StartPipelineParams) 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 NewStartPipelineParams() beforehand.

type StartPipelineURL

type StartPipelineURL struct {
	Name string

	Reason string
	// contains filtered or unexported fields
}

StartPipelineURL generates an URL for the start pipeline operation

func (*StartPipelineURL) Build

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

Build a url path and query string

func (*StartPipelineURL) BuildFull

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

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

func (*StartPipelineURL) Must

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

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

func (*StartPipelineURL) SetBasePath

func (o *StartPipelineURL) 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 (*StartPipelineURL) String

func (o *StartPipelineURL) String() string

String returns the string representation of the path with query string

func (*StartPipelineURL) StringFull

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

StringFull returns the string representation of a complete url

func (*StartPipelineURL) WithBasePath

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

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