operations

package
v0.0.0-...-281c92d Latest Latest
Warning

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

Go to latest
Published: May 5, 2019 License: MIT Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmsAPI

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

	// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
	// It has a default implemention 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 implemention 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 implemention 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

	// FieldCreateFieldHandler sets the operation handler for the create field operation
	FieldCreateFieldHandler field.CreateFieldHandler
	// ItemCreateItemHandler sets the operation handler for the create item operation
	ItemCreateItemHandler item.CreateItemHandler
	// ItemTypeCreateItemTypeHandler sets the operation handler for the create item type operation
	ItemTypeCreateItemTypeHandler item_type.CreateItemTypeHandler
	// ProjectCreateProjectHandler sets the operation handler for the create project operation
	ProjectCreateProjectHandler project.CreateProjectHandler
	// RoleCreateRoleHandler sets the operation handler for the create role operation
	RoleCreateRoleHandler role.CreateRoleHandler
	// UserCreateUserHandler sets the operation handler for the create user operation
	UserCreateUserHandler user.CreateUserHandler
	// FieldDeleteFieldHandler sets the operation handler for the delete field operation
	FieldDeleteFieldHandler field.DeleteFieldHandler
	// ItemDeleteItemHandler sets the operation handler for the delete item operation
	ItemDeleteItemHandler item.DeleteItemHandler
	// ItemTypeDeleteItemTypeHandler sets the operation handler for the delete item type operation
	ItemTypeDeleteItemTypeHandler item_type.DeleteItemTypeHandler
	// ProjectDeleteProjectHandler sets the operation handler for the delete project operation
	ProjectDeleteProjectHandler project.DeleteProjectHandler
	// RoleDeleteRoleHandler sets the operation handler for the delete role operation
	RoleDeleteRoleHandler role.DeleteRoleHandler
	// UserDeleteUserHandler sets the operation handler for the delete user operation
	UserDeleteUserHandler user.DeleteUserHandler
	// ItemTypeDuplicateItemTypeHandler sets the operation handler for the duplicate item type operation
	ItemTypeDuplicateItemTypeHandler item_type.DuplicateItemTypeHandler
	// FieldGetFieldHandler sets the operation handler for the get field operation
	FieldGetFieldHandler field.GetFieldHandler
	// FieldGetFieldsHandler sets the operation handler for the get fields operation
	FieldGetFieldsHandler field.GetFieldsHandler
	// ItemGetItemHandler sets the operation handler for the get item operation
	ItemGetItemHandler item.GetItemHandler
	// ItemTypeGetItemTypeHandler sets the operation handler for the get item type operation
	ItemTypeGetItemTypeHandler item_type.GetItemTypeHandler
	// ItemTypeGetItemTypesHandler sets the operation handler for the get item types operation
	ItemTypeGetItemTypesHandler item_type.GetItemTypesHandler
	// ItemGetItemsHandler sets the operation handler for the get items operation
	ItemGetItemsHandler item.GetItemsHandler
	// ProjectGetProjectHandler sets the operation handler for the get project operation
	ProjectGetProjectHandler project.GetProjectHandler
	// FieldGetProjectFieldsHandler sets the operation handler for the get project fields operation
	FieldGetProjectFieldsHandler field.GetProjectFieldsHandler
	// ProjectGetProjectsHandler sets the operation handler for the get projects operation
	ProjectGetProjectsHandler project.GetProjectsHandler
	// RoleGetRoleHandler sets the operation handler for the get role operation
	RoleGetRoleHandler role.GetRoleHandler
	// RoleGetRolesHandler sets the operation handler for the get roles operation
	RoleGetRolesHandler role.GetRolesHandler
	// UserGetUserHandler sets the operation handler for the get user operation
	UserGetUserHandler user.GetUserHandler
	// UserGetUsersHandler sets the operation handler for the get users operation
	UserGetUsersHandler user.GetUsersHandler
	// AccountSigninHandler sets the operation handler for the signin operation
	AccountSigninHandler account.SigninHandler
	// AccountSignupHandler sets the operation handler for the signup operation
	AccountSignupHandler account.SignupHandler
	// FieldUpdateFieldHandler sets the operation handler for the update field operation
	FieldUpdateFieldHandler field.UpdateFieldHandler
	// ItemUpdateItemHandler sets the operation handler for the update item operation
	ItemUpdateItemHandler item.UpdateItemHandler
	// ItemTypeUpdateItemTypeHandler sets the operation handler for the update item type operation
	ItemTypeUpdateItemTypeHandler item_type.UpdateItemTypeHandler
	// ProjectUpdateProjectHandler sets the operation handler for the update project operation
	ProjectUpdateProjectHandler project.UpdateProjectHandler
	// RoleUpdateRoleHandler sets the operation handler for the update role operation
	RoleUpdateRoleHandler role.UpdateRoleHandler
	// UserUpdateUserHandler sets the operation handler for the update user operation
	UserUpdateUserHandler user.UpdateUserHandler

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

CmsAPI the cms API

func NewCmsAPI

func NewCmsAPI(spec *loads.Document) *CmsAPI

NewCmsAPI creates a new Cms instance

func (*CmsAPI) AuthenticatorsFor

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

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*CmsAPI) Authorizer

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

Authorizer returns the registered authorizer

func (*CmsAPI) ConsumersFor

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

ConsumersFor gets the consumers for the specified media types

func (*CmsAPI) Context

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

Context returns the middleware context for the cms API

func (*CmsAPI) DefaultConsumes

func (o *CmsAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*CmsAPI) DefaultProduces

func (o *CmsAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*CmsAPI) Formats

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

Formats returns the registered string formats

func (*CmsAPI) HandlerFor

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

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

func (*CmsAPI) Init

func (o *CmsAPI) Init()

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

func (*CmsAPI) ProducersFor

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

ProducersFor gets the producers for the specified media types

func (*CmsAPI) RegisterConsumer

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

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

func (*CmsAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*CmsAPI) RegisterProducer

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

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

func (*CmsAPI) Serve

func (o *CmsAPI) 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 (*CmsAPI) ServeErrorFor

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

ServeErrorFor gets a error handler for a given operation id

func (*CmsAPI) SetDefaultConsumes

func (o *CmsAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*CmsAPI) SetDefaultProduces

func (o *CmsAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*CmsAPI) SetSpec

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

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

func (*CmsAPI) Validate

func (o *CmsAPI) Validate() error

Validate validates the registrations in the CmsAPI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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