client

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2019 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	DetectFaces(r io.Reader) (*Response, error)
}

Client interface for interaction with the service

type FaceDetect added in v0.1.3

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

FaceDetect is a http client for the face detection service

func NewClient

func NewClient(l string) *FaceDetect

NewClient creates a new FaceDetect

func (*FaceDetect) DetectFaces added in v0.1.3

func (h *FaceDetect) DetectFaces(r io.Reader) (*Response, error)

DetectFaces sends a request to the face detection service

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is mock implementation of the Client interface

func (*MockClient) DetectFaces

func (m *MockClient) DetectFaces(r io.Reader) (*Response, error)

DetectFaces is a mock implementation of the interface method

type Response

type Response struct {
	Faces  []image.Rectangle
	Bounds image.Rectangle
}

Response is returned by a successful face detecion call

Jump to

Keyboard shortcuts

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