imagga

package
v0.0.0-...-508df49 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ApiKey    string `koanf:"api_key"`
	ApiSecret string `koanf:"api_secret"`
}

Config contains all information for connecting to imagga.

type Imagga

type Imagga struct {
	Cfg Config
}

Imagga handles the image tagging.

func (*Imagga) Process

func (i *Imagga) Process(address string) (*Response, error)

Process sends one http request to Imagga website.

type Response

type Response struct {
	Result struct {
		Tags []struct {
			Confidence float64 `json:"confidence"`
			Tag        struct {
				En string `json:"en"`
			} `json:"tag"`
		} `json:"tags"`
	} `json:"result"`
}

Response is for image tagging response.

Jump to

Keyboard shortcuts

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