nudebox

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: 10 Imported by: 0

Documentation

Overview

Package nudebox provides a client for accessing Nudebox services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) (float64, error)

Check gets the nudity probability for the image data provided.

func (*Client) CheckBase64

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

CheckBase64 gets the nudity probability for the Base64 encoded image.

func (*Client) CheckURL

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

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

func (*Client) Info

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

Info gets the details about the box.

type ErrNudebox

type ErrNudebox string

ErrNudebox represents an error from Nudebox.

func (ErrNudebox) Error

func (e ErrNudebox) Error() string

Jump to

Keyboard shortcuts

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