Documentation ¶
Index ¶
- Constants
- func DetectionType(d int) string
- func NewAnnotateImageContent(body []byte) *vision.Image
- func NewAnnotateImageContentRequest(body []byte, features ...*vision.Feature) (*vision.AnnotateImageRequest, error)
- func NewAnnotateImageSource(source string) *vision.Image
- func NewAnnotateImageSourceRequest(source string, features ...*vision.Feature) (*vision.AnnotateImageRequest, error)
- func NewFeature(d int) *vision.Feature
- type Client
- func (c Client) ImagesService() *vision.ImagesService
- func (c Client) NewAnnotateImageRequest(v interface{}, features ...*vision.Feature) (*vision.AnnotateImageRequest, error)
- func (c Client) NewBatchAnnotateImageRequest(list []string, features ...*vision.Feature) (*vision.BatchAnnotateImagesRequest, error)
- type Config
Constants ¶
const ( // TypeUnspecified - Unspecified feature type. TypeUnspecified = iota // FaceDetection - Run face detection. FaceDetection // LandmarkDetection - Run landmark detection. LandmarkDetection // LogoDetection - Run logo detection. LogoDetection // LabelDetection - Run label detection. LabelDetection // TextDetection - Run OCR. TextDetection // SafeSearchDetection - Run various computer vision models to SafeSearchDetection // ImageProperties - compute image safe-search properties. ImageProperties )
Variables ¶
This section is empty.
Functions ¶
func DetectionType ¶
DetectionType returns a value of detection type.
func NewAnnotateImageContent ¶
NewAnnotateImageContent returns a pointer to a new vision's Image. It's contained image content, represented as a stream of bytes.
func NewAnnotateImageContentRequest ¶
func NewAnnotateImageContentRequest(body []byte, features ...*vision.Feature) (*vision.AnnotateImageRequest, error)
NewAnnotateImageContentRequest returns a pointer to a new vision's AnnotateImagesRequest.
func NewAnnotateImageSource ¶
NewAnnotateImageSource returns a pointer to a new vision's Image. It's contained external image source (i.e. Google Cloud Storage image location).
func NewAnnotateImageSourceRequest ¶
func NewAnnotateImageSourceRequest(source string, features ...*vision.Feature) (*vision.AnnotateImageRequest, error)
NewAnnotateImageSourceRequest returns a pointer to a new vision's AnnotateImagesRequest.
func NewFeature ¶
NewFeature returns a pointer to a new vision's Feature object.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
A Client provides cloud vision service.
func (Client) ImagesService ¶
func (c Client) ImagesService() *vision.ImagesService
ImagesService returns a pointer to a vision's ImagesService object.
func (Client) NewAnnotateImageRequest ¶
func (c Client) NewAnnotateImageRequest(v interface{}, features ...*vision.Feature) (*vision.AnnotateImageRequest, error)
NewAnnotateImageRequest returns a pointer to a new vision's AnnotateImagesRequest.
func (Client) NewBatchAnnotateImageRequest ¶
func (c Client) NewBatchAnnotateImageRequest(list []string, features ...*vision.Feature) (*vision.BatchAnnotateImagesRequest, error)
NewBatchAnnotateImageRequest returns a pointer to a new vision's BatchAnnotateImagesRequest.
type Config ¶
type Config struct { // The credentials object to use when signing requests. // Defaults to application credentials file. Credentials *credentials.Credentials // The HTTP client to use when sending requests. // Defaults to `http.DefaultClient`. HTTPClient *http.Client }
A Config provides service configuration for service clients. By default, all clients will use the {defaults.DefaultConfig} structure.
func (*Config) WithCredentials ¶
func (c *Config) WithCredentials(creds *credentials.Credentials) *Config
WithCredentials sets a config Credentials value returning a Config pointer for chaining.
Directories ¶
Path | Synopsis |
---|---|
Package credentials provides credential retrieval and management
|
Package credentials provides credential retrieval and management |
tools
|
|