acr

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotator

type Annotator struct {
	// contains filtered or unexported fields
}

Annotator implementation for ACRCloud

func NewAnnotator

func NewAnnotator(wapClient annotator.ClientInterface, options *AnnotatorOptions) *Annotator

NewAnnotator gets an Annotator

func (*Annotator) CreateAnnotations

func (a *Annotator) CreateAnnotations(url string) ([]string, error)

CreateAnnotations based on an ACRCloud record.

func (*Annotator) FromRecord

func (a *Annotator) FromRecord(uri string, record *models.Result) ([]string, error)

FromRecord creates an annotation and returns it's URL

type AnnotatorOptions

type AnnotatorOptions struct {
	AcrHostname string

	AnnotationContainer string
}

AnnotatorOptions ...

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client concrete type

func (*Client) GetRecord

func (c *Client) GetRecord(uri string) *models.Result

GetRecord ...

type ClientInterface

type ClientInterface interface {
	GetRecord(uri string) *models.Result
}

ClientInterface for clients

func GetClient

func GetClient(host string) ClientInterface

GetClient returns the acrClient singleton

type ServiceInterface

type ServiceInterface interface {
	GetResult(params *api.GetResultParams) (*api.GetResultOK, error)
}

ServiceInterface for ACRCloud API

Jump to

Keyboard shortcuts

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