Documentation
¶
Index ¶
- Variables
- func Bool(b bool) *bool
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int64(i int64) *int64
- func Pointer[T any](v T) *T
- func String(s string) *string
- type Analyze
- func (s *Analyze) AiVisionGeneral(ctx context.Context, request components.AnalyzeAIVisionGeneralRequest, ...) (*operations.AnalyzeAiVisionGeneralResponse, error)
- func (s *Analyze) AiVisionModeration(ctx context.Context, request components.AnalyzeAIVisionModerationRequest, ...) (*operations.AnalyzeAiVisionModerationResponse, error)
- func (s *Analyze) AiVisionTagging(ctx context.Context, request components.AnalyzeAIVisionTaggingRequest, ...) (*operations.AnalyzeAiVisionTaggingResponse, error)
- func (s *Analyze) Captioning(ctx context.Context, request components.BaseAnalyzeRequest, ...) (*operations.AnalyzeCaptioningResponse, error)
- func (s *Analyze) CldFashion(ctx context.Context, request components.BaseAnalyzeRequest, ...) (*operations.AnalyzeCldFashionResponse, error)
- func (s *Analyze) CldText(ctx context.Context, request components.BaseAnalyzeRequest, ...) (*operations.AnalyzeCldTextResponse, error)
- func (s *Analyze) Coco(ctx context.Context, request components.BaseAnalyzeRequest, ...) (*operations.AnalyzeCocoResponse, error)
- func (s *Analyze) GoogleLogoDetection(ctx context.Context, request components.BaseAnalyzeRequest, ...) (*operations.AnalyzeGoogleLogoDetectionResponse, error)
- func (s *Analyze) GoogleTagging(ctx context.Context, request components.BaseAnalyzeRequest, ...) (*operations.AnalyzeGoogleTaggingResponse, error)
- func (s *Analyze) HumanAnatomy(ctx context.Context, request components.BaseAnalyzeRequest, ...) (*operations.AnalyzeHumanAnatomyResponse, error)
- func (s *Analyze) ImageQuality(ctx context.Context, request components.BaseAnalyzeRequest, ...) (*operations.AnalyzeImageQualityResponse, error)
- func (s *Analyze) Lvis(ctx context.Context, request components.BaseAnalyzeRequest, ...) (*operations.AnalyzeLvisResponse, error)
- func (s *Analyze) ShopClassifier(ctx context.Context, request components.BaseAnalyzeRequest, ...) (*operations.AnalyzeShopClassifierResponse, error)
- func (s *Analyze) Unidet(ctx context.Context, request components.BaseAnalyzeRequest, ...) (*operations.AnalyzeUnidetResponse, error)
- func (s *Analyze) WatermarkDetection(ctx context.Context, request components.BaseAnalyzeRequest, ...) (*operations.AnalyzeWatermarkDetectionResponse, error)
- type CloudinaryAnalysis
- type HTTPClient
- type SDKOption
- func WithClient(client HTTPClient) SDKOption
- func WithCloudName(cloudName string) SDKOption
- func WithRetryConfig(retryConfig retry.Config) SDKOption
- func WithSecurity(security components.Security) SDKOption
- func WithSecuritySource(security func(context.Context) (components.Security, error)) SDKOption
- func WithServerIndex(serverIndex int) SDKOption
- func WithServerURL(serverURL string) SDKOption
- func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption
- func WithTimeout(timeout time.Duration) SDKOption
- type Tasks
Constants ¶
This section is empty.
Variables ¶
var ServerList = []string{
"https://api.cloudinary.com/v2/analysis/{cloud_name}",
}
ServerList contains the list of servers available to the SDK
Functions ¶
Types ¶
type Analyze ¶
type Analyze struct {
// contains filtered or unexported fields
}
Analyze - Use the Analyze API to analyze any external asset and return details based on the type of analysis requested.
func (*Analyze) AiVisionGeneral ¶
func (s *Analyze) AiVisionGeneral(ctx context.Context, request components.AnalyzeAIVisionGeneralRequest, opts ...operations.Option) (*operations.AnalyzeAiVisionGeneralResponse, error)
AiVisionGeneral - Analyze - AI Vision General The General mode serves a wide array of applications by providing detailed answers to diverse questions about an image. Users can inquire about any aspect of an image, such as identifying objects, understanding scenes, or interpreting text within the image.
func (*Analyze) AiVisionModeration ¶
func (s *Analyze) AiVisionModeration(ctx context.Context, request components.AnalyzeAIVisionModerationRequest, opts ...operations.Option) (*operations.AnalyzeAiVisionModerationResponse, error)
AiVisionModeration - Analyze - AI Vision Moderation The Moderation mode accepts multiple questions about an image, to which the response provides concise answers of "yes," "no," or "unknown." This functionality allows for a nuanced evaluation of whether the image adheres to specific content policies, creative specs, or aesthetic criteria.
func (*Analyze) AiVisionTagging ¶
func (s *Analyze) AiVisionTagging(ctx context.Context, request components.AnalyzeAIVisionTaggingRequest, opts ...operations.Option) (*operations.AnalyzeAiVisionTaggingResponse, error)
AiVisionTagging - Analyze - AI Vision Tagging The Tagging mode accepts a list of tag names along with their corresponding descriptions. If the image matches the description, which may encompass various elements, it will be appropriately tagged. This approach enables customers to align with their own brand taxonomy, offering a dynamic, flexible, and open method for image classification.
func (*Analyze) Captioning ¶
func (s *Analyze) Captioning(ctx context.Context, request components.BaseAnalyzeRequest, opts ...operations.Option) (*operations.AnalyzeCaptioningResponse, error)
Captioning - Analyze - Captioning Provides a caption for an image.
func (*Analyze) CldFashion ¶
func (s *Analyze) CldFashion(ctx context.Context, request components.BaseAnalyzeRequest, opts ...operations.Option) (*operations.AnalyzeCldFashionResponse, error)
CldFashion - Analyze - Cld-Fashion Analyze an image using the [Cld-Fashion](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#ai_based_image_captioning) content-aware detection model. Cloudinary's fashion model is specifically dedicated to items of clothing. The response includes attributes of the clothing identified, for example whether the garment contains pockets, its material and the fastenings used.
func (*Analyze) CldText ¶
func (s *Analyze) CldText(ctx context.Context, request components.BaseAnalyzeRequest, opts ...operations.Option) (*operations.AnalyzeCldTextResponse, error)
CldText - Analyze - Cld-Text Analyze an image using the [Cld-Text](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#ai_based_image_captioning) content-aware detection model. Cloudinary's text model tells you if your image includes text, and where it's located. Used with image tagging, you can then search for images that contain blocks of text. Used with object-aware cropping, you can choose to keep only the text part, or specify a crop that avoids the text.
func (*Analyze) Coco ¶
func (s *Analyze) Coco(ctx context.Context, request components.BaseAnalyzeRequest, opts ...operations.Option) (*operations.AnalyzeCocoResponse, error)
Coco - Analyze - Coco Analyze an image using the [Coco](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#ai_based_image_captioning) content-aware detection model. The [Common Objects in Context](https://cocodataset.org/) model contains just 80 common objects.
func (*Analyze) GoogleLogoDetection ¶
func (s *Analyze) GoogleLogoDetection(ctx context.Context, request components.BaseAnalyzeRequest, opts ...operations.Option) (*operations.AnalyzeGoogleLogoDetectionResponse, error)
GoogleLogoDetection - Analyze - Google Logo Detection Detects popular product logos within an image.
func (*Analyze) GoogleTagging ¶
func (s *Analyze) GoogleTagging(ctx context.Context, request components.BaseAnalyzeRequest, opts ...operations.Option) (*operations.AnalyzeGoogleTaggingResponse, error)
GoogleTagging - Analyze - Google Tagging Provides tags for an image using Google's tagging service.
func (*Analyze) HumanAnatomy ¶
func (s *Analyze) HumanAnatomy(ctx context.Context, request components.BaseAnalyzeRequest, opts ...operations.Option) (*operations.AnalyzeHumanAnatomyResponse, error)
HumanAnatomy - Analyze - Human Anatomy Analyze an image using the [Human Anatomy](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#ai_based_image_captioning) content-aware detection model. Cloudinary's human anatomy model identifies parts of the human body in an image. It works best when the majority of a human body is detected in the image.
func (*Analyze) ImageQuality ¶
func (s *Analyze) ImageQuality(ctx context.Context, request components.BaseAnalyzeRequest, opts ...operations.Option) (*operations.AnalyzeImageQualityResponse, error)
ImageQuality - Analyze - Image Quality Analysis Analyze an image using the [Image Quality Analysis](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#image_quality_analysis) model.
func (*Analyze) Lvis ¶
func (s *Analyze) Lvis(ctx context.Context, request components.BaseAnalyzeRequest, opts ...operations.Option) (*operations.AnalyzeLvisResponse, error)
Lvis - Analyze - Lvis Analyze an image using the [Lvis](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#ai_based_image_captioning) content-aware detection model. The [Large Vocabulary Instance Segmentation](https://www.lvisdataset.org/) model contains thousands of general objects.
func (*Analyze) ShopClassifier ¶
func (s *Analyze) ShopClassifier(ctx context.Context, request components.BaseAnalyzeRequest, opts ...operations.Option) (*operations.AnalyzeShopClassifierResponse, error)
ShopClassifier - Analyze - Shop Classifier Analyze an image using the [Shop Classifier](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#ai_based_image_captioning) content-aware detection model. Cloudinary's shop classifier model detects if the image is a product image taken in a studio, or if it's a natural image.
func (*Analyze) Unidet ¶
func (s *Analyze) Unidet(ctx context.Context, request components.BaseAnalyzeRequest, opts ...operations.Option) (*operations.AnalyzeUnidetResponse, error)
Unidet - Analyze - Unidet Analyze an image using the [Unidet](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#ai_based_image_captioning) content-aware detection model. The [UniDet](https://github.com/xingyizhou/UniDet) model is a unified model, combining a number of object models, including [Objects365](https://www.objects365.org/overview.html), which focuses on diverse objects in the wild.
func (*Analyze) WatermarkDetection ¶
func (s *Analyze) WatermarkDetection(ctx context.Context, request components.BaseAnalyzeRequest, opts ...operations.Option) (*operations.AnalyzeWatermarkDetectionResponse, error)
WatermarkDetection - Analyze - Watermark Detection Analyze an image using the [Watermark Detection](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#watermark_detection) detection model.
type CloudinaryAnalysis ¶
type CloudinaryAnalysis struct { // Use the Analyze API to analyze any external asset and return details based on the type of analysis requested. Analyze *Analyze // Query the status of analysis tasks. Tasks *Tasks // contains filtered or unexported fields }
CloudinaryAnalysis - Analyze API (Beta): Use the Analyze API to analyze any external asset and return details based on the type of analysis requested.
Currently supports the following analysis options:
[AI Vision - Tagging](https://cloudinary.com/documentation/cloudinary_ai_vision_addon#tagging_mode)
[AI Vision - Moderation](https://cloudinary.com/documentation/cloudinary_ai_vision_addon#moderation_mode)
[AI Vision - General](https://cloudinary.com/documentation/cloudinary_ai_vision_addon#general_mode)
[Captioning](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#ai_based_image_captioning)
[Cld Fashion](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#supported_content_aware_detection_models)
[Google Tagging](https://cloudinary.com/documentation/google_auto_tagging_addon)
[Human Anatomy](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#supported_content_aware_detection_models)
[Image Quality Analysis](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#image_quality_analysis)
[Shop Classifier](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#supported_content_aware_detection_models)
[Watermark Detection](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#watermark_detection)
**Notes**:
The Analyze API is currently in development and is available as a Public Beta, which means we value your feedback, so please feel free to [share any thoughts with us](https://support.cloudinary.com/hc/en-us/requests/new).
The analysis options require an active subscription to the relevant add-on. Learn more about [registering for add-ons](https://cloudinary.com/documentation/cloudinary_add_ons#registering_for_add_ons).
The API supports both Basic Authentication using your Cloudinary API Key and API Secret (which can be found on the Dashboard page of your [Cloudinary Console](https://console.cloudinary.com/pm)) or OAuth2 ([Contact support](https://support.cloudinary.com/hc/en-us/requests/new) for more information regarding OAuth).
func New ¶
func New(opts ...SDKOption) *CloudinaryAnalysis
New creates a new instance of the SDK with the provided options
type HTTPClient ¶
HTTPClient provides an interface for suplying the SDK with a custom HTTP client
type SDKOption ¶
type SDKOption func(*CloudinaryAnalysis)
func WithClient ¶
func WithClient(client HTTPClient) SDKOption
WithClient allows the overriding of the default HTTP client used by the SDK
func WithCloudName ¶
WithCloudName allows setting the cloud_name variable for url substitution
func WithRetryConfig ¶
func WithSecurity ¶
func WithSecurity(security components.Security) SDKOption
WithSecurity configures the SDK to use the provided security details
func WithSecuritySource ¶
WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication
func WithServerIndex ¶
WithServerIndex allows the overriding of the default server by index
func WithServerURL ¶
WithServerURL allows the overriding of the default server URL
func WithTemplatedServerURL ¶
WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters
func WithTimeout ¶
WithTimeout Optional request timeout applied to each operation
type Tasks ¶
type Tasks struct {
// contains filtered or unexported fields
}
Tasks - Query the status of analysis tasks.
func (*Tasks) GetStatus ¶
func (s *Tasks) GetStatus(ctx context.Context, taskID string, opts ...operations.Option) (*operations.GetAnalysisTaskStatusResponse, error)
GetStatus - Get analysis task status Get the status of an analysis task.