Documentation ¶
Index ¶
- Constants
- type FaceDetectionAppAPI
- func (o *FaceDetectionAppAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
- func (o *FaceDetectionAppAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *FaceDetectionAppAPI) Authorizer() runtime.Authorizer
- func (o *FaceDetectionAppAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *FaceDetectionAppAPI) Context() *middleware.Context
- func (o *FaceDetectionAppAPI) DefaultConsumes() string
- func (o *FaceDetectionAppAPI) DefaultProduces() string
- func (o *FaceDetectionAppAPI) Formats() strfmt.Registry
- func (o *FaceDetectionAppAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *FaceDetectionAppAPI) Init()
- func (o *FaceDetectionAppAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *FaceDetectionAppAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
- func (o *FaceDetectionAppAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *FaceDetectionAppAPI) RegisterProducer(mediaType string, producer runtime.Producer)
- func (o *FaceDetectionAppAPI) Serve(builder middleware.Builder) http.Handler
- func (o *FaceDetectionAppAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *FaceDetectionAppAPI) SetDefaultConsumes(mediaType string)
- func (o *FaceDetectionAppAPI) SetDefaultProduces(mediaType string)
- func (o *FaceDetectionAppAPI) SetSpec(spec *loads.Document)
- func (o *FaceDetectionAppAPI) UseRedoc()
- func (o *FaceDetectionAppAPI) UseSwaggerUI()
- func (o *FaceDetectionAppAPI) Validate() error
- type GetFaces
- type GetFacesDefault
- func (o *GetFacesDefault) SetPayload(payload *models.Error)
- func (o *GetFacesDefault) SetStatusCode(code int)
- func (o *GetFacesDefault) WithPayload(payload *models.Error) *GetFacesDefault
- func (o *GetFacesDefault) WithStatusCode(code int) *GetFacesDefault
- func (o *GetFacesDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type GetFacesHandler
- type GetFacesHandlerFunc
- type GetFacesOK
- type GetFacesOKBody
- type GetFacesParams
- type GetFacesURL
- func (o *GetFacesURL) Build() (*url.URL, error)
- func (o *GetFacesURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *GetFacesURL) Must(u *url.URL, err error) *url.URL
- func (o *GetFacesURL) SetBasePath(bp string)
- func (o *GetFacesURL) String() string
- func (o *GetFacesURL) StringFull(scheme, host string) string
- func (o *GetFacesURL) WithBasePath(bp string) *GetFacesURL
Constants ¶
const GetFacesOKCode int = 200
GetFacesOKCode is the HTTP code returned for type GetFacesOK
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FaceDetectionAppAPI ¶
type FaceDetectionAppAPI 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 // JSONProducer registers a producer for the following mime types: // - application/json JSONProducer runtime.Producer // GetFacesHandler sets the operation handler for the get faces operation GetFacesHandler GetFacesHandler // 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 }
FaceDetectionAppAPI Detects face bounds, mouth and eyes from a picture URL
func NewFaceDetectionAppAPI ¶
func NewFaceDetectionAppAPI(spec *loads.Document) *FaceDetectionAppAPI
NewFaceDetectionAppAPI creates a new FaceDetectionApp instance
func (*FaceDetectionAppAPI) AddMiddlewareFor ¶
func (o *FaceDetectionAppAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
AddMiddlewareFor adds a http middleware to existing handler
func (*FaceDetectionAppAPI) AuthenticatorsFor ¶
func (o *FaceDetectionAppAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*FaceDetectionAppAPI) Authorizer ¶
func (o *FaceDetectionAppAPI) Authorizer() runtime.Authorizer
Authorizer returns the registered authorizer
func (*FaceDetectionAppAPI) ConsumersFor ¶
func (o *FaceDetectionAppAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
ConsumersFor gets the consumers for the specified media types. MIME type parameters are ignored here.
func (*FaceDetectionAppAPI) Context ¶
func (o *FaceDetectionAppAPI) Context() *middleware.Context
Context returns the middleware context for the face detection app API
func (*FaceDetectionAppAPI) DefaultConsumes ¶
func (o *FaceDetectionAppAPI) DefaultConsumes() string
DefaultConsumes returns the default consumes media type
func (*FaceDetectionAppAPI) DefaultProduces ¶
func (o *FaceDetectionAppAPI) DefaultProduces() string
DefaultProduces returns the default produces media type
func (*FaceDetectionAppAPI) Formats ¶
func (o *FaceDetectionAppAPI) Formats() strfmt.Registry
Formats returns the registered string formats
func (*FaceDetectionAppAPI) HandlerFor ¶
func (o *FaceDetectionAppAPI) HandlerFor(method, path string) (http.Handler, bool)
HandlerFor gets a http.Handler for the provided operation method and path
func (*FaceDetectionAppAPI) Init ¶
func (o *FaceDetectionAppAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit
func (*FaceDetectionAppAPI) ProducersFor ¶
func (o *FaceDetectionAppAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
ProducersFor gets the producers for the specified media types. MIME type parameters are ignored here.
func (*FaceDetectionAppAPI) RegisterConsumer ¶
func (o *FaceDetectionAppAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
RegisterConsumer allows you to add (or override) a consumer for a media type.
func (*FaceDetectionAppAPI) RegisterFormat ¶
func (o *FaceDetectionAppAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
RegisterFormat registers a custom format validator
func (*FaceDetectionAppAPI) RegisterProducer ¶
func (o *FaceDetectionAppAPI) RegisterProducer(mediaType string, producer runtime.Producer)
RegisterProducer allows you to add (or override) a producer for a media type.
func (*FaceDetectionAppAPI) Serve ¶
func (o *FaceDetectionAppAPI) 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 (*FaceDetectionAppAPI) ServeErrorFor ¶
func (o *FaceDetectionAppAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*FaceDetectionAppAPI) SetDefaultConsumes ¶
func (o *FaceDetectionAppAPI) SetDefaultConsumes(mediaType string)
SetDefaultConsumes returns the default consumes media type
func (*FaceDetectionAppAPI) SetDefaultProduces ¶
func (o *FaceDetectionAppAPI) SetDefaultProduces(mediaType string)
SetDefaultProduces sets the default produces media type
func (*FaceDetectionAppAPI) SetSpec ¶
func (o *FaceDetectionAppAPI) SetSpec(spec *loads.Document)
SetSpec sets a spec that will be served for the clients.
func (*FaceDetectionAppAPI) UseRedoc ¶
func (o *FaceDetectionAppAPI) UseRedoc()
UseRedoc for documentation at /docs
func (*FaceDetectionAppAPI) UseSwaggerUI ¶
func (o *FaceDetectionAppAPI) UseSwaggerUI()
UseSwaggerUI for documentation at /docs
func (*FaceDetectionAppAPI) Validate ¶
func (o *FaceDetectionAppAPI) Validate() error
Validate validates the registrations in the FaceDetectionAppAPI
type GetFaces ¶
type GetFaces struct { Context *middleware.Context Handler GetFacesHandler }
GetFaces swagger:route GET /faces getFaces
Detects faces from a picture URL.
func NewGetFaces ¶
func NewGetFaces(ctx *middleware.Context, handler GetFacesHandler) *GetFaces
NewGetFaces creates a new http.Handler for the get faces operation
type GetFacesDefault ¶
type GetFacesDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
GetFacesDefault generic error response
swagger:response getFacesDefault
func NewGetFacesDefault ¶
func NewGetFacesDefault(code int) *GetFacesDefault
NewGetFacesDefault creates GetFacesDefault with default headers values
func (*GetFacesDefault) SetPayload ¶
func (o *GetFacesDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the get faces default response
func (*GetFacesDefault) SetStatusCode ¶
func (o *GetFacesDefault) SetStatusCode(code int)
SetStatusCode sets the status to the get faces default response
func (*GetFacesDefault) WithPayload ¶
func (o *GetFacesDefault) WithPayload(payload *models.Error) *GetFacesDefault
WithPayload adds the payload to the get faces default response
func (*GetFacesDefault) WithStatusCode ¶
func (o *GetFacesDefault) WithStatusCode(code int) *GetFacesDefault
WithStatusCode adds the status to the get faces default response
func (*GetFacesDefault) WriteResponse ¶
func (o *GetFacesDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetFacesHandler ¶
type GetFacesHandler interface {
Handle(GetFacesParams) middleware.Responder
}
GetFacesHandler interface for that can handle valid get faces params
type GetFacesHandlerFunc ¶
type GetFacesHandlerFunc func(GetFacesParams) middleware.Responder
GetFacesHandlerFunc turns a function with the right signature into a get faces handler
func (GetFacesHandlerFunc) Handle ¶
func (fn GetFacesHandlerFunc) Handle(params GetFacesParams) middleware.Responder
Handle executing the request and returning a response
type GetFacesOK ¶
type GetFacesOK struct { /* In: Body */ Payload *GetFacesOKBody `json:"body,omitempty"` }
GetFacesOK list of detected faces
swagger:response getFacesOK
func NewGetFacesOK ¶
func NewGetFacesOK() *GetFacesOK
NewGetFacesOK creates GetFacesOK with default headers values
func (*GetFacesOK) SetPayload ¶
func (o *GetFacesOK) SetPayload(payload *GetFacesOKBody)
SetPayload sets the payload to the get faces o k response
func (*GetFacesOK) WithPayload ¶
func (o *GetFacesOK) WithPayload(payload *GetFacesOKBody) *GetFacesOK
WithPayload adds the payload to the get faces o k response
func (*GetFacesOK) WriteResponse ¶
func (o *GetFacesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetFacesOKBody ¶
GetFacesOKBody get faces o k body
swagger:model GetFacesOKBody
func (*GetFacesOKBody) MarshalBinary ¶
func (o *GetFacesOKBody) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*GetFacesOKBody) UnmarshalBinary ¶
func (o *GetFacesOKBody) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type GetFacesParams ¶
type GetFacesParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* Required: true In: query */ URL strfmt.URI }
GetFacesParams contains all the bound params for the get faces operation typically these are obtained from a http.Request
swagger:parameters GetFaces
func NewGetFacesParams ¶
func NewGetFacesParams() GetFacesParams
NewGetFacesParams creates a new GetFacesParams object no default values defined in spec.
func (*GetFacesParams) BindRequest ¶
func (o *GetFacesParams) 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 NewGetFacesParams() beforehand.
type GetFacesURL ¶
GetFacesURL generates an URL for the get faces operation
func (*GetFacesURL) Build ¶
func (o *GetFacesURL) Build() (*url.URL, error)
Build a url path and query string
func (*GetFacesURL) BuildFull ¶
func (o *GetFacesURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*GetFacesURL) SetBasePath ¶
func (o *GetFacesURL) 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 (*GetFacesURL) String ¶
func (o *GetFacesURL) String() string
String returns the string representation of the path with query string
func (*GetFacesURL) StringFull ¶
func (o *GetFacesURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*GetFacesURL) WithBasePath ¶
func (o *GetFacesURL) WithBasePath(bp string) *GetFacesURL
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