func UserAgent() string
UserAgent returns the UserAgent string to use when sending http.Requests.
func Version() string
Version returns the semantic version (see http://semver.org) of the client.
BaseClient is the base client for Prediction.
type BaseClient struct { autorest.Client APIKey string Endpoint string }
func New(aPIKey string, endpoint string) BaseClient
New creates an instance of the BaseClient client.
func NewWithoutDefaults(aPIKey string, endpoint string) BaseClient
NewWithoutDefaults creates an instance of the BaseClient client.
func (client BaseClient) PredictImage(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, iterationID *uuid.UUID, application string) (result ImagePrediction, err error)
PredictImage sends the predict image request. Parameters: projectID - the project id iterationID - optional. Specifies the id of a particular iteration to evaluate against. The default iteration for the project will be used when not specified application - optional. Specifies the name of application using the endpoint
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 (client BaseClient) PredictImageResponder(resp *http.Response) (result ImagePrediction, err error)
PredictImageResponder handles the response to the PredictImage request. The method always closes the http.Response Body.
func (client BaseClient) PredictImageSender(req *http.Request) (*http.Response, error)
PredictImageSender sends the PredictImage request. The method will close the http.Response Body if it receives an error.
func (client BaseClient) PredictImageURL(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, iterationID *uuid.UUID, application string) (result ImagePrediction, err error)
PredictImageURL sends the predict image url request. Parameters: projectID - the project id imageURL - an {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated iterationID - optional. Specifies the id of a particular iteration to evaluate against. The default iteration for the project will be used when not specified application - optional. Specifies the name of application using the endpoint
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 (client BaseClient) PredictImageURLResponder(resp *http.Response) (result ImagePrediction, err error)
PredictImageURLResponder handles the response to the PredictImageURL request. The method always closes the http.Response Body.
func (client BaseClient) PredictImageURLSender(req *http.Request) (*http.Response, error)
PredictImageURLSender sends the PredictImageURL request. The method will close the http.Response Body if it receives an error.
func (client BaseClient) PredictImageURLWithNoStore(ctx context.Context, projectID uuid.UUID, imageURL ImageURL, iterationID *uuid.UUID, application string) (result ImagePrediction, err error)
PredictImageURLWithNoStore sends the predict image url with no store request. Parameters: projectID - the project id imageURL - an {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated iterationID - optional. Specifies the id of a particular iteration to evaluate against. The default iteration for the project will be used when not specified application - optional. Specifies the name of application using the endpoint
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 (client BaseClient) PredictImageURLWithNoStoreResponder(resp *http.Response) (result ImagePrediction, err error)
PredictImageURLWithNoStoreResponder handles the response to the PredictImageURLWithNoStore request. The method always closes the http.Response Body.
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 (client BaseClient) PredictImageWithNoStore(ctx context.Context, projectID uuid.UUID, imageData io.ReadCloser, iterationID *uuid.UUID, application string) (result ImagePrediction, err error)
PredictImageWithNoStore sends the predict image with no store request. Parameters: projectID - the project id iterationID - optional. Specifies the id of a particular iteration to evaluate against. The default iteration for the project will be used when not specified application - optional. Specifies the name of application using the endpoint
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 (client BaseClient) PredictImageWithNoStoreResponder(resp *http.Response) (result ImagePrediction, err error)
PredictImageWithNoStoreResponder handles the response to the PredictImageWithNoStore request. The method always closes the http.Response Body.
func (client BaseClient) PredictImageWithNoStoreSender(req *http.Request) (*http.Response, error)
PredictImageWithNoStoreSender sends the PredictImageWithNoStore request. The method will close the http.Response Body if it receives an error.
BoundingBox ...
type BoundingBox struct { Left *float64 `json:"left,omitempty"` Top *float64 `json:"top,omitempty"` Width *float64 `json:"width,omitempty"` Height *float64 `json:"height,omitempty"` }
ImagePrediction ...
type ImagePrediction struct { autorest.Response `json:"-"` // ID - READ-ONLY ID *uuid.UUID `json:"id,omitempty"` // Project - READ-ONLY Project *uuid.UUID `json:"project,omitempty"` // Iteration - READ-ONLY Iteration *uuid.UUID `json:"iteration,omitempty"` // Created - READ-ONLY Created *date.Time `json:"created,omitempty"` // Predictions - READ-ONLY Predictions *[]Model `json:"predictions,omitempty"` }
func (IP ImagePrediction) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ImagePrediction.
ImageURL ...
type ImageURL struct { URL *string `json:"url,omitempty"` }
Model ...
type Model struct { // Probability - READ-ONLY Probability *float64 `json:"probability,omitempty"` // TagID - READ-ONLY TagID *uuid.UUID `json:"tagId,omitempty"` // TagName - READ-ONLY TagName *string `json:"tagName,omitempty"` // BoundingBox - READ-ONLY BoundingBox *BoundingBox `json:"boundingBox,omitempty"` }
func (mVar Model) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Model.
Name | Synopsis |
---|---|
.. | |
predictionapi |