Documentation
¶
Index ¶
- type WornOutAPI
- func (o *WornOutAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *WornOutAPI) Authorizer() runtime.Authorizer
- func (o *WornOutAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *WornOutAPI) Context() *middleware.Context
- func (o *WornOutAPI) DefaultConsumes() string
- func (o *WornOutAPI) DefaultProduces() string
- func (o *WornOutAPI) Formats() strfmt.Registry
- func (o *WornOutAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *WornOutAPI) Init()
- func (o *WornOutAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *WornOutAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *WornOutAPI) Serve(builder middleware.Builder) http.Handler
- func (o *WornOutAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *WornOutAPI) SetDefaultConsumes(mediaType string)
- func (o *WornOutAPI) SetDefaultProduces(mediaType string)
- func (o *WornOutAPI) SetSpec(spec *loads.Document)
- func (o *WornOutAPI) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WornOutAPI ¶
type WornOutAPI 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
// CategoriesCreateCategoryHandler sets the operation handler for the create category operation
CategoriesCreateCategoryHandler categories.CreateCategoryHandler
// DescriptorsCreateDescriptorByDetailHandler sets the operation handler for the create descriptor by detail operation
DescriptorsCreateDescriptorByDetailHandler descriptors.CreateDescriptorByDetailHandler
// DetailsCreateDetailHandler sets the operation handler for the create detail operation
DetailsCreateDetailHandler details.CreateDetailHandler
// ItemsCreateItemHandler sets the operation handler for the create item operation
ItemsCreateItemHandler items.CreateItemHandler
// SubcategoriesCreateSubCategoryByCategoryHandler sets the operation handler for the create sub category by category operation
SubcategoriesCreateSubCategoryByCategoryHandler subcategories.CreateSubCategoryByCategoryHandler
// UsersCreateUserHandler sets the operation handler for the create user operation
UsersCreateUserHandler users.CreateUserHandler
// CategoriesDeleteCategoriesHandler sets the operation handler for the delete categories operation
CategoriesDeleteCategoriesHandler categories.DeleteCategoriesHandler
// CategoriesDeleteCategoryHandler sets the operation handler for the delete category operation
CategoriesDeleteCategoryHandler categories.DeleteCategoryHandler
// DescriptorsDeleteDescriptorHandler sets the operation handler for the delete descriptor operation
DescriptorsDeleteDescriptorHandler descriptors.DeleteDescriptorHandler
// DescriptorsDeleteDescriptorsHandler sets the operation handler for the delete descriptors operation
DescriptorsDeleteDescriptorsHandler descriptors.DeleteDescriptorsHandler
// DescriptorsDeleteDescriptorsByDetailHandler sets the operation handler for the delete descriptors by detail operation
DescriptorsDeleteDescriptorsByDetailHandler descriptors.DeleteDescriptorsByDetailHandler
// DetailsDeleteDetailHandler sets the operation handler for the delete detail operation
DetailsDeleteDetailHandler details.DeleteDetailHandler
// DetailsDeleteDetailsHandler sets the operation handler for the delete details operation
DetailsDeleteDetailsHandler details.DeleteDetailsHandler
// ItemsDeleteItemHandler sets the operation handler for the delete item operation
ItemsDeleteItemHandler items.DeleteItemHandler
// ItemsDeleteItemsHandler sets the operation handler for the delete items operation
ItemsDeleteItemsHandler items.DeleteItemsHandler
// ItemsDeleteItemsByOwnerHandler sets the operation handler for the delete items by owner operation
ItemsDeleteItemsByOwnerHandler items.DeleteItemsByOwnerHandler
// ItemsDeleteItemsBySubCategoryHandler sets the operation handler for the delete items by sub category operation
ItemsDeleteItemsBySubCategoryHandler items.DeleteItemsBySubCategoryHandler
// SubcategoriesDeleteSubCategoriesHandler sets the operation handler for the delete sub categories operation
SubcategoriesDeleteSubCategoriesHandler subcategories.DeleteSubCategoriesHandler
// SubcategoriesDeleteSubCategoriesByCategoryHandler sets the operation handler for the delete sub categories by category operation
SubcategoriesDeleteSubCategoriesByCategoryHandler subcategories.DeleteSubCategoriesByCategoryHandler
// SubcategoriesDeleteSubCategoryHandler sets the operation handler for the delete sub category operation
SubcategoriesDeleteSubCategoryHandler subcategories.DeleteSubCategoryHandler
// UsersDeleteUserHandler sets the operation handler for the delete user operation
UsersDeleteUserHandler users.DeleteUserHandler
// UsersDeleteUsersHandler sets the operation handler for the delete users operation
UsersDeleteUsersHandler users.DeleteUsersHandler
// CategoriesGetCategoriesHandler sets the operation handler for the get categories operation
CategoriesGetCategoriesHandler categories.GetCategoriesHandler
// CategoriesGetCategoryHandler sets the operation handler for the get category operation
CategoriesGetCategoryHandler categories.GetCategoryHandler
// DescriptorsGetDescriptorHandler sets the operation handler for the get descriptor operation
DescriptorsGetDescriptorHandler descriptors.GetDescriptorHandler
// DescriptorsGetDescriptorsHandler sets the operation handler for the get descriptors operation
DescriptorsGetDescriptorsHandler descriptors.GetDescriptorsHandler
// DescriptorsGetDescriptorsByDetailHandler sets the operation handler for the get descriptors by detail operation
DescriptorsGetDescriptorsByDetailHandler descriptors.GetDescriptorsByDetailHandler
// DetailsGetDetailHandler sets the operation handler for the get detail operation
DetailsGetDetailHandler details.GetDetailHandler
// DetailsGetDetailsHandler sets the operation handler for the get details operation
DetailsGetDetailsHandler details.GetDetailsHandler
// ItemsGetItemHandler sets the operation handler for the get item operation
ItemsGetItemHandler items.GetItemHandler
// ItemsGetItemsHandler sets the operation handler for the get items operation
ItemsGetItemsHandler items.GetItemsHandler
// ItemsGetItemsByOwnerHandler sets the operation handler for the get items by owner operation
ItemsGetItemsByOwnerHandler items.GetItemsByOwnerHandler
// ItemsGetItemsBySubCategoryHandler sets the operation handler for the get items by sub category operation
ItemsGetItemsBySubCategoryHandler items.GetItemsBySubCategoryHandler
// SubcategoriesGetSubCategoriesHandler sets the operation handler for the get sub categories operation
SubcategoriesGetSubCategoriesHandler subcategories.GetSubCategoriesHandler
// SubcategoriesGetSubCategoriesByCategoryHandler sets the operation handler for the get sub categories by category operation
SubcategoriesGetSubCategoriesByCategoryHandler subcategories.GetSubCategoriesByCategoryHandler
// SubcategoriesGetSubCategoryHandler sets the operation handler for the get sub category operation
SubcategoriesGetSubCategoryHandler subcategories.GetSubCategoryHandler
// UsersGetUserHandler sets the operation handler for the get user operation
UsersGetUserHandler users.GetUserHandler
// UsersGetUsersHandler sets the operation handler for the get users operation
UsersGetUsersHandler users.GetUsersHandler
// CategoriesUpdateCategoryHandler sets the operation handler for the update category operation
CategoriesUpdateCategoryHandler categories.UpdateCategoryHandler
// DescriptorsUpdateDescriptorHandler sets the operation handler for the update descriptor operation
DescriptorsUpdateDescriptorHandler descriptors.UpdateDescriptorHandler
// DetailsUpdateDetailHandler sets the operation handler for the update detail operation
DetailsUpdateDetailHandler details.UpdateDetailHandler
// ItemsUpdateItemHandler sets the operation handler for the update item operation
ItemsUpdateItemHandler items.UpdateItemHandler
// SubcategoriesUpdateSubCategoryHandler sets the operation handler for the update sub category operation
SubcategoriesUpdateSubCategoryHandler subcategories.UpdateSubCategoryHandler
// UsersUpdateUserHandler sets the operation handler for the update user operation
UsersUpdateUserHandler users.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
}
WornOutAPI Item API to help define a thing belonging to users, for example clothing.
func NewWornOutAPI ¶
func NewWornOutAPI(spec *loads.Document) *WornOutAPI
NewWornOutAPI creates a new WornOut instance
func (*WornOutAPI) AuthenticatorsFor ¶
func (o *WornOutAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*WornOutAPI) Authorizer ¶
func (o *WornOutAPI) Authorizer() runtime.Authorizer
Authorizer returns the registered authorizer
func (*WornOutAPI) ConsumersFor ¶
func (o *WornOutAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
ConsumersFor gets the consumers for the specified media types
func (*WornOutAPI) Context ¶
func (o *WornOutAPI) Context() *middleware.Context
Context returns the middleware context for the worn out API
func (*WornOutAPI) DefaultConsumes ¶
func (o *WornOutAPI) DefaultConsumes() string
DefaultConsumes returns the default consumes media type
func (*WornOutAPI) DefaultProduces ¶
func (o *WornOutAPI) DefaultProduces() string
DefaultProduces returns the default produces media type
func (*WornOutAPI) Formats ¶
func (o *WornOutAPI) Formats() strfmt.Registry
Formats returns the registered string formats
func (*WornOutAPI) HandlerFor ¶
func (o *WornOutAPI) HandlerFor(method, path string) (http.Handler, bool)
HandlerFor gets a http.Handler for the provided operation method and path
func (*WornOutAPI) Init ¶
func (o *WornOutAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middelware as you see fit
func (*WornOutAPI) ProducersFor ¶
func (o *WornOutAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
ProducersFor gets the producers for the specified media types
func (*WornOutAPI) RegisterFormat ¶
RegisterFormat registers a custom format validator
func (*WornOutAPI) Serve ¶
func (o *WornOutAPI) 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 (*WornOutAPI) ServeErrorFor ¶
func (o *WornOutAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*WornOutAPI) SetDefaultConsumes ¶
func (o *WornOutAPI) SetDefaultConsumes(mediaType string)
SetDefaultConsumes returns the default consumes media type
func (*WornOutAPI) SetDefaultProduces ¶
func (o *WornOutAPI) SetDefaultProduces(mediaType string)
SetDefaultProduces sets the default produces media type
func (*WornOutAPI) SetSpec ¶
func (o *WornOutAPI) SetSpec(spec *loads.Document)
SetSpec sets a spec that will be served for the clients.
func (*WornOutAPI) Validate ¶
func (o *WornOutAPI) Validate() error
Validate validates the registrations in the WornOutAPI