objectbox

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: Apache-2.0 Imports: 11 Imported by: 1

README

This package is not officially supported.

Documentation

Overview

Package objectbox provides a client for accessing Objectbox services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckDetectorResponse

type CheckDetectorResponse struct {
	ID      string   `json:"id"`
	Name    string   `json:"name"`
	Objects []Object `json:"objects"`
}

type CheckResponse

type CheckResponse struct {
	Detectors []CheckDetectorResponse `json:"detectors"`
}

CheckResponse is all the data from /check request to objectbox

type Client

type Client struct {

	// HTTPClient is the http.Client that will be used to
	// make requests.
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

Client is an HTTP client that can make requests to the box.

func New

func New(addr string) *Client

New makes a new Client for the box at the specified address.

func (*Client) Check

func (c *Client) Check(image io.Reader) (CheckResponse, error)

Check gets the objects for the image data provided.

func (*Client) CheckBase64

func (c *Client) CheckBase64(data string) (CheckResponse, error)

CheckBase64 gets the tags for the image in the encoded Base64 data string.

func (*Client) CheckURL

func (c *Client) CheckURL(imageURL *url.URL) (CheckResponse, error)

CheckURL gets the tags for the image at the specified URL.

func (*Client) Info

func (c *Client) Info() (*boxutil.Info, error)

Info gets the details about the box.

func (*Client) PostState

func (c *Client) PostState(r io.Reader) error

PostState uploads new state data.

func (*Client) PostStateURL

func (c *Client) PostStateURL(stateURL *url.URL) error

PostStateURL tells objectbox to download the state file specified by the URL.

type Object

type Object struct {
	Rect  Rect    `json:"rect"`
	Score float64 `json:"score"`
}

type Rect

type Rect struct {
	Top    int `json:"top"`
	Left   int `json:"left"`
	Width  int `json:"width"`
	Height int `json:"height"`
}

Jump to

Keyboard shortcuts

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