sdk-go: Index | Files

package nudebox

import ""

Package nudebox provides a client for accessing Nudebox services.


Package Files


type Client Uses

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 Uses

func New(addr string) *Client

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

func (*Client) Check Uses

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

Check gets the nudity probability for the image data provided.

func (*Client) CheckBase64 Uses

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

CheckBase64 gets the nudity probability for the Base64 encoded image.

func (*Client) CheckURL Uses

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

CheckURL gets the nudity probability for the image at the specified URL.

func (*Client) Info Uses

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

Info gets the details about the box.

type ErrNudebox Uses

type ErrNudebox string

ErrNudebox represents an error from Nudebox.

func (ErrNudebox) Error Uses

func (e ErrNudebox) Error() string

Package nudebox imports 10 packages (graph). Updated 2018-05-15. Refresh now. Tools for package owners.