version_semantic

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2018 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const SemverGenerateCreatedCode int = 201

SemverGenerateCreatedCode is the HTTP code returned for type SemverGenerateCreated

View Source
const SemverGenerateInternalServerErrorCode int = 500

SemverGenerateInternalServerErrorCode is the HTTP code returned for type SemverGenerateInternalServerError

Variables

This section is empty.

Functions

This section is empty.

Types

type SemverGenerate

type SemverGenerate struct {
	Context *middleware.Context
	Handler SemverGenerateHandler
}

SemverGenerate swagger:route POST /projects/{projectId}/version/semantic versionSemantic semverGenerate

Generate new semantic version number (based on gitflow)

Semantic Versioning 2.0.0 See also http://semver.org/spec/v2.0.0.html Based on branching model [GitFlow](http://nvie.com/posts/a-successful-git-branching-model/)

func NewSemverGenerate

func NewSemverGenerate(ctx *middleware.Context, handler SemverGenerateHandler) *SemverGenerate

NewSemverGenerate creates a new http.Handler for the semver generate operation

func (*SemverGenerate) ServeHTTP

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

type SemverGenerateCreated

type SemverGenerateCreated struct {

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

SemverGenerateCreated Generate semantic version response

swagger:response semverGenerateCreated

func NewSemverGenerateCreated

func NewSemverGenerateCreated() *SemverGenerateCreated

NewSemverGenerateCreated creates SemverGenerateCreated with default headers values

func (*SemverGenerateCreated) SetPayload

func (o *SemverGenerateCreated) SetPayload(payload *models.SemverNumber)

SetPayload sets the payload to the semver generate created response

func (*SemverGenerateCreated) WithPayload

WithPayload adds the payload to the semver generate created response

func (*SemverGenerateCreated) WriteResponse

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

WriteResponse to the client

type SemverGenerateHandler

type SemverGenerateHandler interface {
	Handle(SemverGenerateParams) middleware.Responder
}

SemverGenerateHandler interface for that can handle valid semver generate params

type SemverGenerateHandlerFunc

type SemverGenerateHandlerFunc func(SemverGenerateParams) middleware.Responder

SemverGenerateHandlerFunc turns a function with the right signature into a semver generate handler

func (SemverGenerateHandlerFunc) Handle

Handle executing the request and returning a response

type SemverGenerateInternalServerError

type SemverGenerateInternalServerError struct {
	/*

	 */
	XErrorCode string `json:"X-Error-Code"`

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

SemverGenerateInternalServerError Error response

swagger:response semverGenerateInternalServerError

func NewSemverGenerateInternalServerError

func NewSemverGenerateInternalServerError() *SemverGenerateInternalServerError

NewSemverGenerateInternalServerError creates SemverGenerateInternalServerError with default headers values

func (*SemverGenerateInternalServerError) SetPayload

func (o *SemverGenerateInternalServerError) SetPayload(payload *models.Error)

SetPayload sets the payload to the semver generate internal server error response

func (*SemverGenerateInternalServerError) SetXErrorCode

func (o *SemverGenerateInternalServerError) SetXErrorCode(xErrorCode string)

SetXErrorCode sets the xErrorCode to the semver generate internal server error response

func (*SemverGenerateInternalServerError) WithPayload

WithPayload adds the payload to the semver generate internal server error response

func (*SemverGenerateInternalServerError) WithXErrorCode

WithXErrorCode adds the xErrorCode to the semver generate internal server error response

func (*SemverGenerateInternalServerError) WriteResponse

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

WriteResponse to the client

type SemverGenerateParams

type SemverGenerateParams struct {

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

	/*
	  In: body
	*/
	Body *models.SemverGenerateParams
	/*
	  Required: true
	  In: path
	*/
	ProjectID uint64
}

SemverGenerateParams contains all the bound params for the semver generate operation typically these are obtained from a http.Request

swagger:parameters semverGenerate

func NewSemverGenerateParams

func NewSemverGenerateParams() SemverGenerateParams

NewSemverGenerateParams creates a new SemverGenerateParams object no default values defined in spec.

func (*SemverGenerateParams) BindRequest

func (o *SemverGenerateParams) 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 NewSemverGenerateParams() beforehand.

type SemverGenerateURL added in v0.3.0

type SemverGenerateURL struct {
	ProjectID uint64
	// contains filtered or unexported fields
}

SemverGenerateURL generates an URL for the semver generate operation

func (*SemverGenerateURL) Build added in v0.3.0

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

Build a url path and query string

func (*SemverGenerateURL) BuildFull added in v0.3.0

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

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

func (*SemverGenerateURL) Must added in v0.3.0

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

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

func (*SemverGenerateURL) SetBasePath added in v0.3.0

func (o *SemverGenerateURL) 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 (*SemverGenerateURL) String added in v0.3.0

func (o *SemverGenerateURL) String() string

String returns the string representation of the path with query string

func (*SemverGenerateURL) StringFull added in v0.3.0

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

StringFull returns the string representation of a complete url

func (*SemverGenerateURL) WithBasePath added in v0.3.0

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

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