operations

package
v0.0.0-...-ea88fcb Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const GenerateFromTemplateBadRequestCode int = 400

GenerateFromTemplateBadRequestCode is the HTTP code returned for type GenerateFromTemplateBadRequest

View Source
const GenerateFromTemplateInternalServerErrorCode int = 500

GenerateFromTemplateInternalServerErrorCode is the HTTP code returned for type GenerateFromTemplateInternalServerError

View Source
const GenerateFromTemplateOKCode int = 200

GenerateFromTemplateOKCode is the HTTP code returned for type GenerateFromTemplateOK

View Source
const GetTemplatesInternalServerErrorCode int = 500

GetTemplatesInternalServerErrorCode is the HTTP code returned for type GetTemplatesInternalServerError

View Source
const GetTemplatesOKCode int = 200

GetTemplatesOKCode is the HTTP code returned for type GetTemplatesOK

Variables

This section is empty.

Functions

This section is empty.

Types

type GenerateFromTemplate

type GenerateFromTemplate struct {
	Context *middleware.Context
	Handler GenerateFromTemplateHandler
}

GenerateFromTemplate swagger:route POST /generateFromTemplate generateFromTemplate

Generate archive from template

func NewGenerateFromTemplate

func NewGenerateFromTemplate(ctx *middleware.Context, handler GenerateFromTemplateHandler) *GenerateFromTemplate

NewGenerateFromTemplate creates a new http.Handler for the generate from template operation

func (*GenerateFromTemplate) ServeHTTP

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

type GenerateFromTemplateBadRequest

type GenerateFromTemplateBadRequest struct {

	/*
	  In: Body
	*/
	Payload string `json:"body,omitempty"`
}

GenerateFromTemplateBadRequest Bad request

swagger:response generateFromTemplateBadRequest

func NewGenerateFromTemplateBadRequest

func NewGenerateFromTemplateBadRequest() *GenerateFromTemplateBadRequest

NewGenerateFromTemplateBadRequest creates GenerateFromTemplateBadRequest with default headers values

func (*GenerateFromTemplateBadRequest) SetPayload

func (o *GenerateFromTemplateBadRequest) SetPayload(payload string)

SetPayload sets the payload to the generate from template bad request response

func (*GenerateFromTemplateBadRequest) WithPayload

WithPayload adds the payload to the generate from template bad request response

func (*GenerateFromTemplateBadRequest) WriteResponse

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

WriteResponse to the client

type GenerateFromTemplateHandler

type GenerateFromTemplateHandler interface {
	Handle(GenerateFromTemplateParams) middleware.Responder
}

GenerateFromTemplateHandler interface for that can handle valid generate from template params

type GenerateFromTemplateHandlerFunc

type GenerateFromTemplateHandlerFunc func(GenerateFromTemplateParams) middleware.Responder

GenerateFromTemplateHandlerFunc turns a function with the right signature into a generate from template handler

func (GenerateFromTemplateHandlerFunc) Handle

Handle executing the request and returning a response

type GenerateFromTemplateInternalServerError

type GenerateFromTemplateInternalServerError struct {

	/*
	  In: Body
	*/
	Payload string `json:"body,omitempty"`
}

GenerateFromTemplateInternalServerError Internal error

swagger:response generateFromTemplateInternalServerError

func NewGenerateFromTemplateInternalServerError

func NewGenerateFromTemplateInternalServerError() *GenerateFromTemplateInternalServerError

NewGenerateFromTemplateInternalServerError creates GenerateFromTemplateInternalServerError with default headers values

func (*GenerateFromTemplateInternalServerError) SetPayload

func (o *GenerateFromTemplateInternalServerError) SetPayload(payload string)

SetPayload sets the payload to the generate from template internal server error response

func (*GenerateFromTemplateInternalServerError) WithPayload

WithPayload adds the payload to the generate from template internal server error response

func (*GenerateFromTemplateInternalServerError) WriteResponse

WriteResponse to the client

type GenerateFromTemplateOK

type GenerateFromTemplateOK struct {

	/*
	  In: Body
	*/
	Payload io.ReadCloser `json:"body,omitempty"`
}

GenerateFromTemplateOK Archive file

swagger:response generateFromTemplateOK

func NewGenerateFromTemplateOK

func NewGenerateFromTemplateOK() *GenerateFromTemplateOK

NewGenerateFromTemplateOK creates GenerateFromTemplateOK with default headers values

func (*GenerateFromTemplateOK) SetPayload

func (o *GenerateFromTemplateOK) SetPayload(payload io.ReadCloser)

SetPayload sets the payload to the generate from template o k response

func (*GenerateFromTemplateOK) WithPayload

WithPayload adds the payload to the generate from template o k response

func (*GenerateFromTemplateOK) WriteResponse

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

WriteResponse to the client

type GenerateFromTemplateParams

type GenerateFromTemplateParams struct {

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

	/*CodeGenTemplate to generate code
	  Required: true
	  In: body
	*/
	CodeGenTemplate *models.CodeGenTemplate
}

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

swagger:parameters generateFromTemplate

func NewGenerateFromTemplateParams

func NewGenerateFromTemplateParams() GenerateFromTemplateParams

NewGenerateFromTemplateParams creates a new GenerateFromTemplateParams object no default values defined in spec.

func (*GenerateFromTemplateParams) BindRequest

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 NewGenerateFromTemplateParams() beforehand.

type GenerateFromTemplateURL

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

GenerateFromTemplateURL generates an URL for the generate from template operation

func (*GenerateFromTemplateURL) Build

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

Build a url path and query string

func (*GenerateFromTemplateURL) BuildFull

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

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

func (*GenerateFromTemplateURL) Must

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

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

func (*GenerateFromTemplateURL) SetBasePath

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

func (o *GenerateFromTemplateURL) String() string

String returns the string representation of the path with query string

func (*GenerateFromTemplateURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GenerateFromTemplateURL) WithBasePath

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 GetTemplates

type GetTemplates struct {
	Context *middleware.Context
	Handler GetTemplatesHandler
}

GetTemplates swagger:route GET /templates getTemplates

Get all templates for codegen generation

func NewGetTemplates

func NewGetTemplates(ctx *middleware.Context, handler GetTemplatesHandler) *GetTemplates

NewGetTemplates creates a new http.Handler for the get templates operation

func (*GetTemplates) ServeHTTP

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

type GetTemplatesHandler

type GetTemplatesHandler interface {
	Handle(GetTemplatesParams) middleware.Responder
}

GetTemplatesHandler interface for that can handle valid get templates params

type GetTemplatesHandlerFunc

type GetTemplatesHandlerFunc func(GetTemplatesParams) middleware.Responder

GetTemplatesHandlerFunc turns a function with the right signature into a get templates handler

func (GetTemplatesHandlerFunc) Handle

Handle executing the request and returning a response

type GetTemplatesInternalServerError

type GetTemplatesInternalServerError struct {

	/*
	  In: Body
	*/
	Payload string `json:"body,omitempty"`
}

GetTemplatesInternalServerError Internal error

swagger:response getTemplatesInternalServerError

func NewGetTemplatesInternalServerError

func NewGetTemplatesInternalServerError() *GetTemplatesInternalServerError

NewGetTemplatesInternalServerError creates GetTemplatesInternalServerError with default headers values

func (*GetTemplatesInternalServerError) SetPayload

func (o *GetTemplatesInternalServerError) SetPayload(payload string)

SetPayload sets the payload to the get templates internal server error response

func (*GetTemplatesInternalServerError) WithPayload

WithPayload adds the payload to the get templates internal server error response

func (*GetTemplatesInternalServerError) WriteResponse

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

WriteResponse to the client

type GetTemplatesOK

type GetTemplatesOK struct {

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

GetTemplatesOK Get all CodeGenTemplate

swagger:response getTemplatesOK

func NewGetTemplatesOK

func NewGetTemplatesOK() *GetTemplatesOK

NewGetTemplatesOK creates GetTemplatesOK with default headers values

func (*GetTemplatesOK) SetPayload

func (o *GetTemplatesOK) SetPayload(payload []*models.CodeGenTemplate)

SetPayload sets the payload to the get templates o k response

func (*GetTemplatesOK) WithPayload

func (o *GetTemplatesOK) WithPayload(payload []*models.CodeGenTemplate) *GetTemplatesOK

WithPayload adds the payload to the get templates o k response

func (*GetTemplatesOK) WriteResponse

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

WriteResponse to the client

type GetTemplatesParams

type GetTemplatesParams struct {

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

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

swagger:parameters getTemplates

func NewGetTemplatesParams

func NewGetTemplatesParams() GetTemplatesParams

NewGetTemplatesParams creates a new GetTemplatesParams object no default values defined in spec.

func (*GetTemplatesParams) BindRequest

func (o *GetTemplatesParams) 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 NewGetTemplatesParams() beforehand.

type GetTemplatesURL

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

GetTemplatesURL generates an URL for the get templates operation

func (*GetTemplatesURL) Build

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

Build a url path and query string

func (*GetTemplatesURL) BuildFull

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

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

func (*GetTemplatesURL) Must

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

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

func (*GetTemplatesURL) SetBasePath

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

func (o *GetTemplatesURL) String() string

String returns the string representation of the path with query string

func (*GetTemplatesURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetTemplatesURL) WithBasePath

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

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 KathraCodeGeneratorManagerAPI

type KathraCodeGeneratorManagerAPI 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 a "application/json" mime type
	JSONConsumer runtime.Consumer

	// JSONProducer registers a producer for a "application/json" mime type
	JSONProducer runtime.Producer
	// BinProducer registers a producer for a "application/octet-stream" mime type
	BinProducer runtime.Producer

	// GenerateFromTemplateHandler sets the operation handler for the generate from template operation
	GenerateFromTemplateHandler GenerateFromTemplateHandler
	// GetTemplatesHandler sets the operation handler for the get templates operation
	GetTemplatesHandler GetTemplatesHandler

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

	// 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
}

KathraCodeGeneratorManagerAPI KATHRA CodeGenerator API permetting generate sources

func NewKathraCodeGeneratorManagerAPI

func NewKathraCodeGeneratorManagerAPI(spec *loads.Document) *KathraCodeGeneratorManagerAPI

NewKathraCodeGeneratorManagerAPI creates a new KathraCodeGeneratorManager instance

func (*KathraCodeGeneratorManagerAPI) AuthenticatorsFor

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

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*KathraCodeGeneratorManagerAPI) Authorizer

Authorizer returns the registered authorizer

func (*KathraCodeGeneratorManagerAPI) ConsumersFor

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

ConsumersFor gets the consumers for the specified media types

func (*KathraCodeGeneratorManagerAPI) Context

Context returns the middleware context for the kathra code generator manager API

func (*KathraCodeGeneratorManagerAPI) DefaultConsumes

func (o *KathraCodeGeneratorManagerAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*KathraCodeGeneratorManagerAPI) DefaultProduces

func (o *KathraCodeGeneratorManagerAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*KathraCodeGeneratorManagerAPI) Formats

Formats returns the registered string formats

func (*KathraCodeGeneratorManagerAPI) HandlerFor

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

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

func (*KathraCodeGeneratorManagerAPI) Init

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

func (*KathraCodeGeneratorManagerAPI) ProducersFor

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

ProducersFor gets the producers for the specified media types

func (*KathraCodeGeneratorManagerAPI) RegisterConsumer

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

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

func (*KathraCodeGeneratorManagerAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*KathraCodeGeneratorManagerAPI) RegisterProducer

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

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

func (*KathraCodeGeneratorManagerAPI) Serve

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

func (*KathraCodeGeneratorManagerAPI) ServeErrorFor

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

ServeErrorFor gets a error handler for a given operation id

func (*KathraCodeGeneratorManagerAPI) SetDefaultConsumes

func (o *KathraCodeGeneratorManagerAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*KathraCodeGeneratorManagerAPI) SetDefaultProduces

func (o *KathraCodeGeneratorManagerAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*KathraCodeGeneratorManagerAPI) SetSpec

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

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

func (*KathraCodeGeneratorManagerAPI) Validate

func (o *KathraCodeGeneratorManagerAPI) Validate() error

Validate validates the registrations in the KathraCodeGeneratorManagerAPI

Jump to

Keyboard shortcuts

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