Documentation ¶
Overview ¶
Package prediction implements the Azure ARM Prediction service API version 1.1.
Index ¶
- Constants
- func UserAgent() string
- func Version() string
- type BaseClient
- func (client BaseClient) PredictImage(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, ...) (result ImagePredictionResultModel, err error)
- func (client BaseClient) PredictImagePreparer(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, ...) (*http.Request, error)
- func (client BaseClient) PredictImageResponder(resp *http.Response) (result ImagePredictionResultModel, err error)
- func (client BaseClient) PredictImageSender(req *http.Request) (*http.Response, error)
- func (client BaseClient) PredictImageURL(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, ...) (result ImagePredictionResultModel, err error)
- func (client BaseClient) PredictImageURLPreparer(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, ...) (*http.Request, error)
- func (client BaseClient) PredictImageURLResponder(resp *http.Response) (result ImagePredictionResultModel, err error)
- func (client BaseClient) PredictImageURLSender(req *http.Request) (*http.Response, error)
- func (client BaseClient) PredictImageURLWithNoStore(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, ...) (result ImagePredictionResultModel, err error)
- func (client BaseClient) PredictImageURLWithNoStorePreparer(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, ...) (*http.Request, error)
- func (client BaseClient) PredictImageURLWithNoStoreResponder(resp *http.Response) (result ImagePredictionResultModel, err error)
- func (client BaseClient) PredictImageURLWithNoStoreSender(req *http.Request) (*http.Response, error)
- func (client BaseClient) PredictImageWithNoStore(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, ...) (result ImagePredictionResultModel, err error)
- func (client BaseClient) PredictImageWithNoStorePreparer(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, ...) (*http.Request, error)
- func (client BaseClient) PredictImageWithNoStoreResponder(resp *http.Response) (result ImagePredictionResultModel, err error)
- func (client BaseClient) PredictImageWithNoStoreSender(req *http.Request) (*http.Response, error)
- type ImagePredictionResultModel
- type ImageTagPredictionModel
- type ImageURL
Constants ¶
const (
// DefaultBaseURI is the default URI used for the service Prediction
DefaultBaseURI = "https://southcentralus.api.cognitive.microsoft.com/customvision/v1.1/Prediction"
)
Variables ¶
This section is empty.
Functions ¶
func UserAgent ¶
func UserAgent() string
UserAgent returns the UserAgent string to use when sending http.Requests.
func Version ¶
func Version() string
Version returns the semantic version (see http://semver.org) of the client.
Types ¶
type BaseClient ¶
BaseClient is the base client for Prediction.
func NewWithBaseURI ¶
func NewWithBaseURI(baseURI string, aPIKey string) BaseClient
NewWithBaseURI creates an instance of the BaseClient client.
func (BaseClient) PredictImage ¶
func (client BaseClient) PredictImage(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, iterationID *uuid.UUID, application string) (result ImagePredictionResultModel, err error)
PredictImage sends the predict image request.
projectID is the project id imageData will be closed upon successful return. Callers should ensure closure when receiving an error.iterationID is optional. Specifies the id of a particular iteration to evaluate against. The default iteration for the project will be used when not specified application is optional. Specifies the name of application using the endpoint
func (BaseClient) PredictImagePreparer ¶
func (client BaseClient) PredictImagePreparer(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, iterationID *uuid.UUID, application string) (*http.Request, error)
PredictImagePreparer prepares the PredictImage request.
func (BaseClient) PredictImageResponder ¶
func (client BaseClient) PredictImageResponder(resp *http.Response) (result ImagePredictionResultModel, err error)
PredictImageResponder handles the response to the PredictImage request. The method always closes the http.Response Body.
func (BaseClient) PredictImageSender ¶
PredictImageSender sends the PredictImage request. The method will close the http.Response Body if it receives an error.
func (BaseClient) PredictImageURL ¶
func (client BaseClient) PredictImageURL(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, iterationID *uuid.UUID, application string) (result ImagePredictionResultModel, err error)
PredictImageURL sends the predict image url request.
projectID is the project id imageURL is an {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated iterationID is optional. Specifies the id of a particular iteration to evaluate against. The default iteration for the project will be used when not specified application is optional. Specifies the name of application using the endpoint
func (BaseClient) PredictImageURLPreparer ¶
func (client BaseClient) PredictImageURLPreparer(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, iterationID *uuid.UUID, application string) (*http.Request, error)
PredictImageURLPreparer prepares the PredictImageURL request.
func (BaseClient) PredictImageURLResponder ¶
func (client BaseClient) PredictImageURLResponder(resp *http.Response) (result ImagePredictionResultModel, err error)
PredictImageURLResponder handles the response to the PredictImageURL request. The method always closes the http.Response Body.
func (BaseClient) PredictImageURLSender ¶
PredictImageURLSender sends the PredictImageURL request. The method will close the http.Response Body if it receives an error.
func (BaseClient) PredictImageURLWithNoStore ¶
func (client BaseClient) PredictImageURLWithNoStore(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, iterationID *uuid.UUID, application string) (result ImagePredictionResultModel, err error)
PredictImageURLWithNoStore sends the predict image url with no store request.
projectID is the project id imageURL is an {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated iterationID is optional. Specifies the id of a particular iteration to evaluate against. The default iteration for the project will be used when not specified application is optional. Specifies the name of application using the endpoint
func (BaseClient) PredictImageURLWithNoStorePreparer ¶
func (client BaseClient) PredictImageURLWithNoStorePreparer(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, iterationID *uuid.UUID, application string) (*http.Request, error)
PredictImageURLWithNoStorePreparer prepares the PredictImageURLWithNoStore request.
func (BaseClient) PredictImageURLWithNoStoreResponder ¶
func (client BaseClient) PredictImageURLWithNoStoreResponder(resp *http.Response) (result ImagePredictionResultModel, err error)
PredictImageURLWithNoStoreResponder handles the response to the PredictImageURLWithNoStore request. The method always closes the http.Response Body.
func (BaseClient) PredictImageURLWithNoStoreSender ¶
func (client BaseClient) PredictImageURLWithNoStoreSender(req *http.Request) (*http.Response, error)
PredictImageURLWithNoStoreSender sends the PredictImageURLWithNoStore request. The method will close the http.Response Body if it receives an error.
func (BaseClient) PredictImageWithNoStore ¶
func (client BaseClient) PredictImageWithNoStore(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, iterationID *uuid.UUID, application string) (result ImagePredictionResultModel, err error)
PredictImageWithNoStore sends the predict image with no store request.
projectID is the project id imageData will be closed upon successful return. Callers should ensure closure when receiving an error.iterationID is optional. Specifies the id of a particular iteration to evaluate against. The default iteration for the project will be used when not specified application is optional. Specifies the name of application using the endpoint
func (BaseClient) PredictImageWithNoStorePreparer ¶
func (client BaseClient) PredictImageWithNoStorePreparer(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, iterationID *uuid.UUID, application string) (*http.Request, error)
PredictImageWithNoStorePreparer prepares the PredictImageWithNoStore request.
func (BaseClient) PredictImageWithNoStoreResponder ¶
func (client BaseClient) PredictImageWithNoStoreResponder(resp *http.Response) (result ImagePredictionResultModel, err error)
PredictImageWithNoStoreResponder handles the response to the PredictImageWithNoStore request. The method always closes the http.Response Body.
func (BaseClient) PredictImageWithNoStoreSender ¶
PredictImageWithNoStoreSender sends the PredictImageWithNoStore request. The method will close the http.Response Body if it receives an error.
type ImagePredictionResultModel ¶
type ImagePredictionResultModel struct { autorest.Response `json:"-"` ID *uuid.UUID `json:"Id,omitempty"` Project *uuid.UUID `json:"Project,omitempty"` Iteration *uuid.UUID `json:"Iteration,omitempty"` Created *date.Time `json:"Created,omitempty"` Predictions *[]ImageTagPredictionModel `json:"Predictions,omitempty"` }
ImagePredictionResultModel result of an image prediction request
type ImageTagPredictionModel ¶
type ImageTagPredictionModel struct { TagID *uuid.UUID `json:"TagId,omitempty"` Tag *string `json:"Tag,omitempty"` Probability *float64 `json:"Probability,omitempty"` }
ImageTagPredictionModel ...