Documentation ¶
Overview ¶
Package admin is used for accessing Cloudinary Admin API functionality.
Index ¶
- type API
- func (a *API) AddMetadataField(ctx context.Context, params metadata.Field) (*AddMetadataFieldResult, error)
- func (a *API) Asset(ctx context.Context, params AssetParams) (*AssetResult, error)
- func (a *API) AssetByAssetID(ctx context.Context, params AssetByAssetIDParams) (*AssetResult, error)
- func (a *API) AssetTypes(ctx context.Context) (*AssetTypesResult, error)
- func (a *API) Assets(ctx context.Context, params AssetsParams) (*AssetsResult, error)
- func (a *API) AssetsByContext(ctx context.Context, params AssetsByContextParams) (*AssetsResult, error)
- func (a *API) AssetsByIDs(ctx context.Context, params AssetsByIDsParams) (*AssetsResult, error)
- func (a *API) AssetsByModeration(ctx context.Context, params AssetsByModerationParams) (*AssetsResult, error)
- func (a *API) AssetsByTag(ctx context.Context, params AssetsByTagParams) (*AssetsResult, error)
- func (a *API) CreateFolder(ctx context.Context, params CreateFolderParams) (*CreateFolderResult, error)
- func (a *API) CreateStreamingProfile(ctx context.Context, params CreateStreamingProfileParams) (*GetStreamingProfileResult, error)
- func (a *API) CreateTransformation(ctx context.Context, params CreateTransformationParams) (*TransformationResult, error)
- func (a *API) CreateUploadMapping(ctx context.Context, params CreateUploadMappingParams) (*CreateUploadMappingResult, error)
- func (a *API) CreateUploadPreset(ctx context.Context, params CreateUploadPresetParams) (*CreateUploadPresetResult, error)
- func (a *API) DeleteAllAssets(ctx context.Context, params DeleteAllAssetsParams) (*DeleteAssetsResult, error)
- func (a *API) DeleteAssets(ctx context.Context, params DeleteAssetsParams) (*DeleteAssetsResult, error)
- func (a *API) DeleteAssetsByPrefix(ctx context.Context, params DeleteAssetsByPrefixParams) (*DeleteAssetsResult, error)
- func (a *API) DeleteAssetsByTag(ctx context.Context, params DeleteAssetsByTagParams) (*DeleteAssetsResult, error)
- func (a *API) DeleteDataSourceEntries(ctx context.Context, params DeleteDataSourceEntriesParams) (*DeleteDataSourceEntriesResult, error)
- func (a *API) DeleteDerivedAssets(ctx context.Context, params DeleteDerivedAssetsParams) (*DeleteAssetsResult, error)
- func (a *API) DeleteDerivedAssetsByTransformation(ctx context.Context, params DeleteDerivedAssetsByTransformationParams) (*DeleteAssetsResult, error)
- func (a *API) DeleteFolder(ctx context.Context, params DeleteFolderParams) (*DeleteFolderResult, error)
- func (a *API) DeleteMetadataField(ctx context.Context, params DeleteMetadataFieldParams) (*DeleteMetadataFieldResult, error)
- func (a *API) DeleteStreamingProfile(ctx context.Context, params DeleteStreamingProfileParams) (*DeleteStreamingProfileResult, error)
- func (a *API) DeleteTransformation(ctx context.Context, params DeleteTransformationParams) (*TransformationResult, error)
- func (a *API) DeleteUploadMapping(ctx context.Context, params DeleteUploadMappingParams) (*UploadMappingResult, error)
- func (a *API) DeleteUploadPreset(ctx context.Context, params DeleteUploadPresetParams) (*UploadPresetResult, error)
- func (a *API) GetStreamingProfile(ctx context.Context, params GetStreamingProfileParams) (*GetStreamingProfileResult, error)
- func (a *API) GetTransformation(ctx context.Context, params GetTransformationParams) (*GetTransformationResult, error)
- func (a *API) GetUploadMapping(ctx context.Context, params GetUploadMappingParams) (*GetUploadMappingResult, error)
- func (a *API) GetUploadPreset(ctx context.Context, params GetUploadPresetParams) (*GetUploadPresetResult, error)
- func (a *API) ListMetadataFields(ctx context.Context) (*ListMetadataFieldsResult, error)
- func (a *API) ListStreamingProfiles(ctx context.Context) (*ListStreamingProfilesResult, error)
- func (a *API) ListTransformations(ctx context.Context, params ListTransformationsParams) (*ListTransformationsResult, error)
- func (a *API) ListUploadMappings(ctx context.Context, params ListUploadMappingsParams) (*ListUploadMappingsResult, error)
- func (a *API) ListUploadPresets(ctx context.Context, params ListUploadPresetsParams) (*ListUploadPresetsResult, error)
- func (a *API) MetadataFieldByFieldID(ctx context.Context, params MetadataFieldByFieldIDParams) (*MetadataFieldByFieldIDResult, error)
- func (a *API) Ping(ctx context.Context) (*PingResult, error)
- func (a *API) ReorderMetadataFieldDatasource(ctx context.Context, params ReorderMetadataFieldDatasourceParams) (*ReorderMetadataFieldDatasourceResult, error)
- func (a *API) ReorderMetadataFields(ctx context.Context, params ReorderMetadataFieldsParams) (*ReorderMetadataFieldsResult, error)
- func (a *API) RestoreAssets(ctx context.Context, params RestoreAssetsParams) (*RestoreAssetsResult, error)
- func (a *API) RestoreDatasourceEntries(ctx context.Context, params RestoreDatasourceEntriesParams) (*RestoreDatasourceEntriesResult, error)
- func (a *API) RootFolders(ctx context.Context, params RootFoldersParams) (*FoldersResult, error)
- func (a *API) Search(ctx context.Context, searchQuery search.Query) (*SearchResult, error)
- func (a *API) SubFolders(ctx context.Context, params SubFoldersParams) (*FoldersResult, error)
- func (a *API) Tags(ctx context.Context, params TagsParams) (*TagsResult, error)
- func (a *API) UpdateAsset(ctx context.Context, params UpdateAssetParams) (*AssetResult, error)
- func (a *API) UpdateMetadataField(ctx context.Context, params UpdateMetadataFieldParams) (*UpdateMetadataFieldResult, error)
- func (a *API) UpdateMetadataFieldDataSource(ctx context.Context, params UpdateMetadataFieldDataSourceParams) (*UpdateMetadataFieldDataSourceResult, error)
- func (a *API) UpdateStreamingProfile(ctx context.Context, params UpdateStreamingProfileParams) (*GetStreamingProfileResult, error)
- func (a *API) UpdateTransformation(ctx context.Context, params UpdateTransformationParams) (*TransformationResult, error)
- func (a *API) UpdateUploadMapping(ctx context.Context, params UpdateUploadMappingParams) (*UploadMappingResult, error)
- func (a *API) UpdateUploadPreset(ctx context.Context, params UpdateUploadPresetParams) (*UploadPresetResult, error)
- func (a *API) Usage(ctx context.Context, params UsageParams) (*UsageResult, error)
- type AccessibilityAnalysisResult
- type AddMetadataFieldResult
- type AssetByAssetIDParams
- type AssetParams
- type AssetResult
- type AssetTypesResult
- type AssetsByContextParams
- type AssetsByIDsParams
- type AssetsByModerationParams
- type AssetsByTagParams
- type AssetsParams
- type AssetsResult
- type CinemagraphAnalysisResult
- type CreateFolderParams
- type CreateFolderResult
- type CreateStreamingProfileParams
- type CreateTransformationParams
- type CreateUploadMappingParams
- type CreateUploadMappingResult
- type CreateUploadPresetParams
- type CreateUploadPresetResult
- type DeleteAllAssetsParams
- type DeleteAssetsByPrefixParams
- type DeleteAssetsByTagParams
- type DeleteAssetsParams
- type DeleteAssetsResult
- type DeleteDataSourceEntriesParams
- type DeleteDataSourceEntriesResult
- type DeleteDerivedAssetsByTransformationParams
- type DeleteDerivedAssetsParams
- type DeleteFolderParams
- type DeleteFolderResult
- type DeleteMetadataFieldParams
- type DeleteMetadataFieldResult
- type DeleteStreamingProfileParams
- type DeleteStreamingProfileResult
- type DeleteTransformationParams
- type DeleteUploadMappingParams
- type DeleteUploadPresetParams
- type DerivedAsset
- type Direction
- type FolderResult
- type FoldersResult
- type GetStreamingProfileParams
- type GetStreamingProfileResult
- type GetTransformationParams
- type GetTransformationResult
- type GetUploadMappingParams
- type GetUploadMappingResult
- type GetUploadPresetParams
- type GetUploadPresetResult
- type ImageAnalysis
- type ImageMetadataResult
- type ListMetadataFieldsResult
- type ListStreamingProfilesResult
- type ListTransformationsParams
- type ListTransformationsResult
- type ListUploadMappingsParams
- type ListUploadMappingsResult
- type ListUploadPresetsParams
- type ListUploadPresetsResult
- type MetadataFieldByFieldIDParams
- type MetadataFieldByFieldIDResult
- type OrderByField
- type PingResult
- type PredominantResult
- type QualityAnalysisResult
- type RawStreamingProfileRepresentation
- type ReorderMetadataFieldDatasourceParams
- type ReorderMetadataFieldDatasourceResult
- type ReorderMetadataFieldsParams
- type ReorderMetadataFieldsResult
- type RestoreAssetsParams
- type RestoreAssetsResult
- type RestoreDatasourceEntriesParams
- type RestoreDatasourceEntriesResult
- type RootFoldersParams
- type SearchAsset
- type SearchResult
- type SearchUser
- type StreamingProfile
- type StreamingProfileDetails
- type StreamingProfileRepresentation
- type StreamingProfileRepresentations
- type SubFoldersParams
- type TagsParams
- type TagsResult
- type TransformationListItem
- type TransformationResult
- type UpdateAssetParams
- type UpdateMetadataFieldDataSourceParams
- type UpdateMetadataFieldDataSourceResult
- type UpdateMetadataFieldParams
- type UpdateMetadataFieldResult
- type UpdateStreamingProfileParams
- type UpdateTransformationParams
- type UpdateUploadMappingParams
- type UpdateUploadPresetParams
- type UploadMapping
- type UploadMappingResult
- type UploadPreset
- type UploadPresetResult
- type UsageParams
- type UsageResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶ added in v1.0.0
API is the Admin API struct.
func New ¶ added in v1.0.0
New creates a new Admin API instance from the environment variable (CLOUDINARY_URL).
func NewWithConfiguration ¶ added in v1.3.0
func NewWithConfiguration(c *config.Configuration) (*API, error)
NewWithConfiguration a new Admin API instance with the given Configuration
func (*API) AddMetadataField ¶ added in v1.0.0
func (a *API) AddMetadataField(ctx context.Context, params metadata.Field) (*AddMetadataFieldResult, error)
AddMetadataField creates a new metadata field definition.
https://cloudinary.com/documentation/admin_api#create_a_metadata_field
func (*API) Asset ¶ added in v1.0.0
func (a *API) Asset(ctx context.Context, params AssetParams) (*AssetResult, error)
Asset returns the details of the specified asset and all its derived resources.
Note that if you only need details about the original resource, you can also use the uploader.Upload or uploader.Explicit methods, which return the same information and are not rate limited.
https://cloudinary.com/documentation/admin_api#get_the_details_of_a_single_resource
func (*API) AssetByAssetID ¶ added in v1.7.0
func (a *API) AssetByAssetID(ctx context.Context, params AssetByAssetIDParams) (*AssetResult, error)
AssetByAssetID returns the details of the specified asset and all its derived assets by asset id.
Note that if you only need details about the original asset, you can also use the uploader.Upload or uploader.Explicit methods, which return the same information and are not rate limited.
https://cloudinary.com/documentation/admin_api#get_the_details_of_a_single_resource
func (*API) AssetTypes ¶ added in v1.0.0
func (a *API) AssetTypes(ctx context.Context) (*AssetTypesResult, error)
AssetTypes lists available asset types.
func (*API) Assets ¶ added in v1.0.0
func (a *API) Assets(ctx context.Context, params AssetsParams) (*AssetsResult, error)
Assets lists all uploaded assets filtered by any specified AssetsParams.
https://cloudinary.com/documentation/admin_api#get_resources
func (*API) AssetsByContext ¶ added in v1.0.0
func (a *API) AssetsByContext(ctx context.Context, params AssetsByContextParams) (*AssetsResult, error)
AssetsByContext lists assets with the specified contextual metadata.
This method does not return matching deleted assets, even if they have been backed up.
https://cloudinary.com/documentation/admin_api#get_resources_by_context
func (*API) AssetsByIDs ¶ added in v1.0.0
func (a *API) AssetsByIDs(ctx context.Context, params AssetsByIDsParams) (*AssetsResult, error)
AssetsByIDs lists assets with the specified public IDs.
https://cloudinary.com/documentation/admin_api#get_resources
func (*API) AssetsByModeration ¶ added in v1.0.0
func (a *API) AssetsByModeration(ctx context.Context, params AssetsByModerationParams) (*AssetsResult, error)
AssetsByModeration lists assets currently in the specified moderation queue and status.
https://cloudinary.com/documentation/admin_api#get_resources_in_moderation_queues
func (*API) AssetsByTag ¶ added in v1.0.0
func (a *API) AssetsByTag(ctx context.Context, params AssetsByTagParams) (*AssetsResult, error)
AssetsByTag lists assets with the specified tag.
This method does not return matching deleted assets, even if they have been backed up.
https://cloudinary.com/documentation/admin_api#get_resources_by_tag
func (*API) CreateFolder ¶ added in v1.0.0
func (a *API) CreateFolder(ctx context.Context, params CreateFolderParams) (*CreateFolderResult, error)
CreateFolder creates a new empty folder.
https://cloudinary.com/documentation/admin_api#create_folder
func (*API) CreateStreamingProfile ¶ added in v1.0.0
func (a *API) CreateStreamingProfile(ctx context.Context, params CreateStreamingProfileParams) (*GetStreamingProfileResult, error)
CreateStreamingProfile creates a new, custom streaming profile.
https://cloudinary.com/documentation/admin_api#create_a_streaming_profile
func (*API) CreateTransformation ¶ added in v1.0.0
func (a *API) CreateTransformation(ctx context.Context, params CreateTransformationParams) (*TransformationResult, error)
CreateTransformation creates a named transformation.
https://cloudinary.com/documentation/admin_api#create_named_transformation
func (*API) CreateUploadMapping ¶ added in v1.0.0
func (a *API) CreateUploadMapping(ctx context.Context, params CreateUploadMappingParams) (*CreateUploadMappingResult, error)
CreateUploadMapping creates a new upload mapping.
https://cloudinary.com/documentation/admin_api#create_an_upload_mapping
func (*API) CreateUploadPreset ¶ added in v1.0.0
func (a *API) CreateUploadPreset(ctx context.Context, params CreateUploadPresetParams) (*CreateUploadPresetResult, error)
CreateUploadPreset creates a new upload preset.
https://cloudinary.com/documentation/admin_api#create_an_upload_preset
func (*API) DeleteAllAssets ¶ added in v1.0.0
func (a *API) DeleteAllAssets(ctx context.Context, params DeleteAllAssetsParams) (*DeleteAssetsResult, error)
DeleteAllAssets deletes all assets of the specified asset and delivery type, including their derived resources.
Supports deleting up to a maximum of 1000 original assets in a single call.
https://cloudinary.com/documentation/admin_api#delete_resources
func (*API) DeleteAssets ¶ added in v1.0.0
func (a *API) DeleteAssets(ctx context.Context, params DeleteAssetsParams) (*DeleteAssetsResult, error)
DeleteAssets deletes the specified assets.
https://cloudinary.com/documentation/admin_api#delete_resources
func (*API) DeleteAssetsByPrefix ¶ added in v1.0.0
func (a *API) DeleteAssetsByPrefix(ctx context.Context, params DeleteAssetsByPrefixParams) (*DeleteAssetsResult, error)
DeleteAssetsByPrefix deletes assets by prefix.
https://cloudinary.com/documentation/admin_api#delete_resources
func (*API) DeleteAssetsByTag ¶ added in v1.0.0
func (a *API) DeleteAssetsByTag(ctx context.Context, params DeleteAssetsByTagParams) (*DeleteAssetsResult, error)
DeleteAssetsByTag deletes assets with the specified tag, including their derived resources.
Supports deleting up to a maximum of 1000 original assets in a single call.
https://cloudinary.com/documentation/admin_api#delete_resources_by_tags
func (*API) DeleteDataSourceEntries ¶ added in v1.0.0
func (a *API) DeleteDataSourceEntries(ctx context.Context, params DeleteDataSourceEntriesParams) (*DeleteDataSourceEntriesResult, error)
DeleteDataSourceEntries deletes entries in a metadata single or multi-select field's datasource.
Deletes (blocks) the datasource (list) entries from the specified metadata field definition. Sets the state of the entries to inactive. This is a soft delete. The entries still exist in the database and can be reactivated using the RestoreMetadataFieldDataSource method.
https://cloudinary.com/documentation/admin_api#delete_entries_in_a_metadata_field_datasource
func (*API) DeleteDerivedAssets ¶ added in v1.0.0
func (a *API) DeleteDerivedAssets(ctx context.Context, params DeleteDerivedAssetsParams) (*DeleteAssetsResult, error)
DeleteDerivedAssets deletes the specified derived resources by derived resource ID.
The derived resource IDs for a particular original asset are returned when calling the `resource` method to return the details of a single asset.
https://cloudinary.com/documentation/admin_api##delete_resources
func (*API) DeleteDerivedAssetsByTransformation ¶ added in v1.0.0
func (a *API) DeleteDerivedAssetsByTransformation(ctx context.Context, params DeleteDerivedAssetsByTransformationParams) (*DeleteAssetsResult, error)
DeleteDerivedAssetsByTransformation deletes derived resources identified by transformation and public_ids.
func (*API) DeleteFolder ¶ added in v1.0.0
func (a *API) DeleteFolder(ctx context.Context, params DeleteFolderParams) (*DeleteFolderResult, error)
DeleteFolder deletes an empty folder.
The specified folder cannot contain any assets, but can have empty descendant sub-folders.
https://cloudinary.com/documentation/admin_api#delete_folder
func (*API) DeleteMetadataField ¶ added in v1.0.0
func (a *API) DeleteMetadataField(ctx context.Context, params DeleteMetadataFieldParams) (*DeleteMetadataFieldResult, error)
DeleteMetadataField deletes a metadata field definition by external ID.
The external ID is immutable. Therefore, once deleted, the field's external ID can no longer be used for future purposes.
https://cloudinary.com/documentation/admin_api#delete_a_metadata_field_by_external_id
func (*API) DeleteStreamingProfile ¶ added in v1.0.0
func (a *API) DeleteStreamingProfile(ctx context.Context, params DeleteStreamingProfileParams) (*DeleteStreamingProfileResult, error)
DeleteStreamingProfile deletes or reverts the specified streaming profile.
For custom streaming profiles, deletes the specified profile. For built-in streaming profiles, if the built-in profile was modified, reverts the profile to the original settings. For built-in streaming profiles that have not been modified, the Delete method returns an error.
https://cloudinary.com/documentation/admin_api#delete_or_revert_the_specified_streaming_profile
func (*API) DeleteTransformation ¶ added in v1.0.0
func (a *API) DeleteTransformation(ctx context.Context, params DeleteTransformationParams) (*TransformationResult, error)
DeleteTransformation deletes the specified stored transformation.
Deleting a transformation also deletes all the stored derived resources based on this transformation (up to 1000). The method returns an error if there are more than 1000 derived resources based on this transformation.
https://cloudinary.com/documentation/admin_api#delete_transformation
func (*API) DeleteUploadMapping ¶ added in v1.0.0
func (a *API) DeleteUploadMapping(ctx context.Context, params DeleteUploadMappingParams) (*UploadMappingResult, error)
DeleteUploadMapping deletes an upload mapping.
https://cloudinary.com/documentation/admin_api#delete_an_upload_mapping
func (*API) DeleteUploadPreset ¶ added in v1.0.0
func (a *API) DeleteUploadPreset(ctx context.Context, params DeleteUploadPresetParams) (*UploadPresetResult, error)
DeleteUploadPreset deletes the specified upload preset.
https://cloudinary.com/documentation/admin_api#delete_an_upload_preset
func (*API) GetStreamingProfile ¶ added in v1.0.0
func (a *API) GetStreamingProfile(ctx context.Context, params GetStreamingProfileParams) (*GetStreamingProfileResult, error)
GetStreamingProfile gets details of a single streaming profile by name.
https://cloudinary.com/documentation/admin_api#get_details_of_a_single_streaming_profile
func (*API) GetTransformation ¶ added in v1.0.0
func (a *API) GetTransformation(ctx context.Context, params GetTransformationParams) (*GetTransformationResult, error)
GetTransformation returns the details of a single transformation.
https://cloudinary.com/documentation/admin_api#get_transformation_details
func (*API) GetUploadMapping ¶ added in v1.0.0
func (a *API) GetUploadMapping(ctx context.Context, params GetUploadMappingParams) (*GetUploadMappingResult, error)
GetUploadMapping returns the details of the specified upload mapping.
Retrieve the mapped template (URL) of a specified upload mapping folder.
https://cloudinary.com/documentation/admin_api#get_the_details_of_a_single_upload_mapping
func (*API) GetUploadPreset ¶ added in v1.0.0
func (a *API) GetUploadPreset(ctx context.Context, params GetUploadPresetParams) (*GetUploadPresetResult, error)
GetUploadPreset retrieves the details of the specified upload preset.
https://cloudinary.com/documentation/admin_api#get_the_details_of_a_single_upload_preset
func (*API) ListMetadataFields ¶ added in v1.0.0
func (a *API) ListMetadataFields(ctx context.Context) (*ListMetadataFieldsResult, error)
ListMetadataFields lists all metadata field definitions.
https://cloudinary.com/documentation/admin_api#get_metadata_fields
func (*API) ListStreamingProfiles ¶ added in v1.0.0
func (a *API) ListStreamingProfiles(ctx context.Context) (*ListStreamingProfilesResult, error)
ListStreamingProfiles lists streaming profiles including built-in and custom profiles.
https://cloudinary.com/documentation/admin_api#get_adaptive_streaming_profiles
func (*API) ListTransformations ¶ added in v1.0.0
func (a *API) ListTransformations(ctx context.Context, params ListTransformationsParams) (*ListTransformationsResult, error)
ListTransformations lists stored transformations.
https://cloudinary.com/documentation/admin_api#get_transformations
func (*API) ListUploadMappings ¶ added in v1.0.0
func (a *API) ListUploadMappings(ctx context.Context, params ListUploadMappingsParams) (*ListUploadMappingsResult, error)
ListUploadMappings lists upload mappings by folder and its mapped template (URL).
https://cloudinary.com/documentation/admin_api#get_upload_mappings
func (*API) ListUploadPresets ¶ added in v1.0.0
func (a *API) ListUploadPresets(ctx context.Context, params ListUploadPresetsParams) (*ListUploadPresetsResult, error)
ListUploadPresets lists existing upload presets.
https://cloudinary.com/documentation/admin_api#get_upload_presets
func (*API) MetadataFieldByFieldID ¶ added in v1.0.0
func (a *API) MetadataFieldByFieldID(ctx context.Context, params MetadataFieldByFieldIDParams) (*MetadataFieldByFieldIDResult, error)
MetadataFieldByFieldID gets a single metadata field definition by external ID.
https://cloudinary.com/documentation/admin_api#get_a_metadata_field_by_external_id
func (*API) Ping ¶ added in v1.0.0
func (a *API) Ping(ctx context.Context) (*PingResult, error)
Ping tests the reachability of the Cloudinary API.
func (*API) ReorderMetadataFieldDatasource ¶ added in v1.3.0
func (a *API) ReorderMetadataFieldDatasource(ctx context.Context, params ReorderMetadataFieldDatasourceParams) (*ReorderMetadataFieldDatasourceResult, error)
ReorderMetadataFieldDatasource reorders metadata fields datasource. Currently, supports only value.
func (*API) ReorderMetadataFields ¶ added in v1.7.0
func (a *API) ReorderMetadataFields(ctx context.Context, params ReorderMetadataFieldsParams) (*ReorderMetadataFieldsResult, error)
ReorderMetadataFields reorders metadata fields.
func (*API) RestoreAssets ¶ added in v1.0.0
func (a *API) RestoreAssets(ctx context.Context, params RestoreAssetsParams) (*RestoreAssetsResult, error)
RestoreAssets reverts to the latest backed up version of the specified deleted assets.
https://cloudinary.com/documentation/admin_api#restore_resources
func (*API) RestoreDatasourceEntries ¶ added in v1.0.0
func (a *API) RestoreDatasourceEntries(ctx context.Context, params RestoreDatasourceEntriesParams) (*RestoreDatasourceEntriesResult, error)
RestoreDatasourceEntries restores entries in a metadata field datasource.
Restores (unblocks) any previously deleted datasource entries for a specified metadata field definition. Sets the state of the entries to active.
https://cloudinary.com/documentation/admin_api#restore_entries_in_a_metadata_field_datasource
func (*API) RootFolders ¶ added in v1.0.0
func (a *API) RootFolders(ctx context.Context, params RootFoldersParams) (*FoldersResult, error)
RootFolders lists all root folders.
https://cloudinary.com/documentation/admin_api#get_root_folders
func (*API) SubFolders ¶ added in v1.0.0
func (a *API) SubFolders(ctx context.Context, params SubFoldersParams) (*FoldersResult, error)
SubFolders lists sub-folders.
Returns the name and path of all the sub-folders of a specified parent folder. Limited to 2000 results.
https://cloudinary.com/documentation/admin_api#get_subfolders
func (*API) Tags ¶ added in v1.0.0
func (a *API) Tags(ctx context.Context, params TagsParams) (*TagsResult, error)
Tags lists all the tags currently used for a specified asset type.
func (*API) UpdateAsset ¶ added in v1.0.0
func (a *API) UpdateAsset(ctx context.Context, params UpdateAssetParams) (*AssetResult, error)
UpdateAsset updates details of an existing asset.
Updates one or more of the attributes associated with a specified asset. Note that you can also update most attributes of an existing asset using the uploader.Explicit method, which is not rate limited.
https://cloudinary.com/documentation/admin_api#update_details_of_an_existing_resource
func (*API) UpdateMetadataField ¶ added in v1.0.0
func (a *API) UpdateMetadataField(ctx context.Context, params UpdateMetadataFieldParams) (*UpdateMetadataFieldResult, error)
UpdateMetadataField updates a metadata field by external ID.
Updates a metadata field definition (partially, no need to pass the entire object) passed as JSON data.
https://cloudinary.com/documentation/admin_api#update_a_metadata_field_by_external_id
func (*API) UpdateMetadataFieldDataSource ¶ added in v1.0.0
func (a *API) UpdateMetadataFieldDataSource(ctx context.Context, params UpdateMetadataFieldDataSourceParams) (*UpdateMetadataFieldDataSourceResult, error)
UpdateMetadataFieldDataSource updates a metadata field datasource.
Updates the datasource of a supported field type (currently enum or set), passed as JSON data. The update is partial: datasource entries with an existing external_id will be updated and entries with new external_id’s (or without external_id’s) will be appended.
https://cloudinary.com/documentation/admin_api#update_a_metadata_field_datasource
func (*API) UpdateStreamingProfile ¶ added in v1.0.0
func (a *API) UpdateStreamingProfile(ctx context.Context, params UpdateStreamingProfileParams) (*GetStreamingProfileResult, error)
UpdateStreamingProfile updates an existing streaming profile.
You can update both custom and built-in profiles. The specified list of representations replaces the previous list.
https://cloudinary.com/documentation/admin_api#update_an_existing_streaming_profile
func (*API) UpdateTransformation ¶ added in v1.0.0
func (a *API) UpdateTransformation(ctx context.Context, params UpdateTransformationParams) (*TransformationResult, error)
UpdateTransformation updates the specified transformation.
https://cloudinary.com/documentation/admin_api#update_transformation
func (*API) UpdateUploadMapping ¶ added in v1.0.0
func (a *API) UpdateUploadMapping(ctx context.Context, params UpdateUploadMappingParams) (*UploadMappingResult, error)
UpdateUploadMapping updates an existing upload mapping with a new template (URL).
https://cloudinary.com/documentation/admin_api#update_an_upload_mapping
func (*API) UpdateUploadPreset ¶ added in v1.0.0
func (a *API) UpdateUploadPreset(ctx context.Context, params UpdateUploadPresetParams) (*UploadPresetResult, error)
UpdateUploadPreset updates the specified upload preset.
https://cloudinary.com/documentation/admin_api#update_an_upload_preset
func (*API) Usage ¶ added in v1.0.0
func (a *API) Usage(ctx context.Context, params UsageParams) (*UsageResult, error)
Usage gets account usage details.
Returns a report detailing your current Cloudinary account usage details, including storage, bandwidth, requests, number of resources, and add-on usage. Note that numbers are updated periodically.
type AccessibilityAnalysisResult ¶
type AccessibilityAnalysisResult struct { ColorblindAccessibilityAnalysis struct { DistinctEdges float64 `json:"distinct_edges"` DistinctColors float64 `json:"distinct_colors"` MostIndistinctPair []string `json:"most_indistinct_pair"` } `json:"colorblind_accessibility_analysis"` ColorblindAccessibilityScore float64 `json:"colorblind_accessibility_score"` }
AccessibilityAnalysisResult contains the details about accessibility analysis.
type AddMetadataFieldResult ¶
type AddMetadataFieldResult struct { metadata.Field Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
AddMetadataFieldResult is the result of AddMetadataField.
type AssetByAssetIDParams ¶ added in v1.7.0
type AssetByAssetIDParams struct { AssetID string `json:"-"` Colors bool `json:"colors,omitempty"` Exif bool `json:"exif,omitempty"` Faces bool `json:"faces,omitempty"` QualityAnalysis bool `json:"quality_analysis,omitempty"` ImageMetadata bool `json:"image_metadata,omitempty"` Phash bool `json:"phash,omitempty"` Pages bool `json:"pages,omitempty"` CinemagraphAnalysis bool `json:"cinemagraph_analysis,omitempty"` Coordinates bool `json:"coordinates,omitempty"` MaxResults int `json:"max_results,omitempty"` DerivedNextCursor string `json:"derived_next_cursor,omitempty"` AccessibilityAnalysis bool `json:"accessibility_analysis,omitempty"` Versions bool `json:"versions,omitempty"` }
AssetByAssetIDParams are the parameters for AssetByAssetID.
type AssetParams ¶
type AssetParams struct { AssetType api.AssetType `json:"-"` DeliveryType api.DeliveryType `json:"-"` PublicID string `json:"-"` Exif bool `json:"exif,omitempty"` Colors bool `json:"colors,omitempty"` Faces bool `json:"faces,omitempty"` QualityAnalysis bool `json:"quality_analysis,omitempty"` ImageMetadata bool `json:"image_metadata,omitempty"` Phash bool `json:"phash,omitempty"` Pages bool `json:"pages,omitempty"` AccessibilityAnalysis bool `json:"accessibility_analysis,omitempty"` CinemagraphAnalysis bool `json:"cinemagraph_analysis,omitempty"` Coordinates bool `json:"coordinates,omitempty"` MaxResults int `json:"max_results,omitempty"` DerivedNextCursor string `json:"derived_next_cursor,omitempty"` }
AssetParams are the parameters for Asset.
type AssetResult ¶
type AssetResult struct { AssetID string `json:"asset_id"` PublicID string `json:"public_id"` Format string `json:"format"` Version int `json:"version"` ResourceType string `json:"resource_type"` Type string `json:"type"` CreatedAt time.Time `json:"created_at"` Bytes int `json:"bytes"` Width int `json:"width"` Height int `json:"height"` Backup bool `json:"backup"` AccessMode string `json:"access_mode"` URL string `json:"url"` SecureURL string `json:"secure_url"` Metadata api.Metadata `json:"metadata,omitempty"` Tags []string `json:"tags"` NextCursor string `json:"next_cursor"` Derived []interface{} `json:"derived"` Etag string `json:"etag"` ImageMetadata ImageMetadataResult `json:"image_metadata"` Coordinates interface{} `json:"coordinates"` Info interface{} `json:"info"` Exif interface{} `json:"exif"` Faces [][]int `json:"faces"` IllustrationScore float64 `json:"illustration_score"` SemiTransparent bool `json:"semi_transparent"` Grayscale bool `json:"grayscale"` Colors [][]interface{} `json:"colors"` Predominant PredominantResult `json:"predominant"` Phash string `json:"phash"` QualityAnalysis QualityAnalysisResult `json:"quality_analysis"` QualityScore float64 `json:"quality_score"` AccessibilityAnalysis AccessibilityAnalysisResult `json:"accessibility_analysis"` Pages int `json:"pages"` CinemagraphAnalysis CinemagraphAnalysisResult `json:"cinemagraph_analysis"` Usage interface{} `json:"usage"` OriginalFilename string `json:"original_filename"` Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
AssetResult is the result of the Asset.
type AssetTypesResult ¶
type AssetTypesResult struct { AssetTypes []string `json:"resource_types"` Error api.ErrorResp `json:"error,omitempty"` }
AssetTypesResult is the result of the AssetTypes.
type AssetsByContextParams ¶
type AssetsByContextParams struct { AssetType api.AssetType `json:"-"` Key string `json:"key"` Value string `json:"value,omitempty"` NextCursor string `json:"next_cursor,omitempty"` MaxResults int `json:"max_results,omitempty"` Tags bool `json:"tags,omitempty"` Context bool `json:"context,omitempty"` Moderations bool `json:"moderations,omitempty"` Direction string `json:"direction,omitempty"` }
AssetsByContextParams are the parameters for AssetsByContext.
type AssetsByIDsParams ¶
type AssetsByIDsParams struct { AssetType api.AssetType `json:"-"` DeliveryType api.DeliveryType `json:"-"` PublicIDs api.CldAPIArray `json:"public_ids"` Tags bool `json:"tags,omitempty"` Context bool `json:"context,omitempty"` Moderations bool `json:"moderations,omitempty"` }
AssetsByIDsParams are the parameters for AssetsByIDs.
type AssetsByModerationParams ¶
type AssetsByModerationParams struct { AssetType api.AssetType `json:"-"` Kind string `json:"-"` Status string `json:"-"` NextCursor string `json:"next_cursor,omitempty"` MaxResults int `json:"max_results,omitempty"` Tags bool `json:"tags,omitempty"` Context bool `json:"context,omitempty"` Moderations bool `json:"moderations,omitempty"` Direction string `json:"direction,omitempty"` }
AssetsByModerationParams are the parameters for AssetsByModeration.
type AssetsByTagParams ¶
type AssetsByTagParams struct { AssetType api.AssetType `json:"-"` Tag string `json:"-"` NextCursor string `json:"next_cursor,omitempty"` MaxResults int `json:"max_results,omitempty"` Tags bool `json:"tags,omitempty"` Context bool `json:"context,omitempty"` Moderations bool `json:"moderations,omitempty"` Direction string `json:"direction,omitempty"` }
AssetsByTagParams are the parameters for AssetsByTag.
type AssetsParams ¶
type AssetsParams struct { AssetType api.AssetType `json:"-"` DeliveryType string `json:"-"` Prefix string `json:"prefix,omitempty"` StartAt *time.Time `json:"start_at,omitempty"` NextCursor string `json:"next_cursor,omitempty"` MaxResults int `json:"max_results,omitempty"` Tags bool `json:"tags,omitempty"` Context bool `json:"context,omitempty"` Moderations bool `json:"moderations,omitempty"` Direction string `json:"direction,omitempty"` }
AssetsParams are the parameters for Assets.
type AssetsResult ¶
type AssetsResult struct { Assets []api.BriefAssetResult `json:"resources"` NextCursor string `json:"next_cursor"` Error api.ErrorResp `json:"error,omitempty"` }
AssetsResult is the result of Assets.
type CinemagraphAnalysisResult ¶
type CinemagraphAnalysisResult struct {
CinemagraphScore float64 `json:"cinemagraph_score"`
}
CinemagraphAnalysisResult contains the details about cinemagraph analysis.
type CreateFolderParams ¶
type CreateFolderParams struct {
Folder string `json:"-"` // The full path of the new folder to create.
}
CreateFolderParams are the parameters for CreateFolder.
type CreateFolderResult ¶
type CreateFolderResult struct { Success bool `json:"success"` Path string `json:"path"` Name string `json:"name"` Error api.ErrorResp `json:"error,omitempty"` }
CreateFolderResult is the result of CreateFolder.
type CreateStreamingProfileParams ¶
type CreateStreamingProfileParams struct { Name string `json:"name"` // The name to assign to the new streaming profile. DisplayName string `json:"display_name,omitempty"` Representations StreamingProfileRepresentations `json:"representations"` }
CreateStreamingProfileParams are the parameters for CreateStreamingProfile.
type CreateTransformationParams ¶
type CreateTransformationParams struct { Name string `json:"name"` Transformation transformation.RawTransformation `json:"transformation"` }
CreateTransformationParams are the parameters for CreateTransformation.
type CreateUploadMappingParams ¶
type CreateUploadMappingParams struct { Folder string `json:"folder"` // The name of the folder to map. Template string `json:"template"` // The URL to be mapped to the folder. }
CreateUploadMappingParams are the parameters for CreateUploadMapping.
type CreateUploadMappingResult ¶
type CreateUploadMappingResult struct { Message string `json:"message"` Folder string `json:"folder"` Error api.ErrorResp `json:"error,omitempty"` }
CreateUploadMappingResult is the result of CreateUploadMapping.
type CreateUploadPresetParams ¶
type CreateUploadPresetParams struct { Name string `json:"name,omitempty"` Unsigned bool `json:"unsigned,omitempty"` DisallowPublicID bool `json:"disallow_public_id,omitempty"` Live bool `json:"live,omitempty"` uploader.UploadParams }
CreateUploadPresetParams are the parameters for CreateUploadPreset.
type CreateUploadPresetResult ¶
type CreateUploadPresetResult struct { Message string `json:"message"` Name string `json:"name"` Error api.ErrorResp `json:"error,omitempty"` }
CreateUploadPresetResult is the result of CreateUploadPreset.
type DeleteAllAssetsParams ¶
type DeleteAllAssetsParams struct { AssetType api.AssetType `json:"-"` DeliveryType api.DeliveryType `json:"-"` All bool `json:"all"` KeepOriginal bool `json:"keep_original,omitempty"` Invalidate bool `json:"invalidate,omitempty"` Transformations string `json:"transformations,omitempty"` NextCursor string `json:"next_cursor,omitempty"` }
DeleteAllAssetsParams are the parameters for DeleteAllAssets.
type DeleteAssetsByPrefixParams ¶
type DeleteAssetsByPrefixParams struct { AssetType api.AssetType `json:"-"` DeliveryType api.DeliveryType `json:"-"` Prefix api.CldAPIArray `json:"prefix"` KeepOriginal bool `json:"keep_original,omitempty"` Invalidate bool `json:"invalidate,omitempty"` Transformations string `json:"transformations,omitempty"` NextCursor string `json:"next_cursor,omitempty"` }
DeleteAssetsByPrefixParams are the parameters for DeleteAssetsByPrefix.
type DeleteAssetsByTagParams ¶
type DeleteAssetsByTagParams struct { AssetType api.AssetType `json:"-"` Tag string `json:"-"` KeepOriginal bool `json:"keep_original,omitempty"` Invalidate bool `json:"invalidate,omitempty"` Transformations string `json:"transformations,omitempty"` NextCursor string `json:"next_cursor,omitempty"` }
DeleteAssetsByTagParams are the parameters for DeleteAssetsByTag.
type DeleteAssetsParams ¶
type DeleteAssetsParams struct { AssetType api.AssetType `json:"-"` DeliveryType api.DeliveryType `json:"-"` PublicIDs api.CldAPIArray `json:"public_ids"` // The public IDs of the assets to delete (up to 100). KeepOriginal bool `json:"keep_original,omitempty"` Invalidate bool `json:"invalidate,omitempty"` Transformations string `json:"transformations,omitempty"` NextCursor string `json:"next_cursor,omitempty"` }
DeleteAssetsParams are the parameters for DeleteAssets.
type DeleteAssetsResult ¶
type DeleteAssetsResult struct { Deleted map[string]string `json:"deleted"` DeletedCounts map[string]interface{} `json:"deleted_counts"` Partial bool `json:"partial"` NextCursor string `json:"next_cursor,omitempty"` Error api.ErrorResp `json:"error,omitempty"` }
DeleteAssetsResult is the result of DeleteAssets.
type DeleteDataSourceEntriesParams ¶
type DeleteDataSourceEntriesParams struct { FieldExternalID string `json:"-"` EntriesExternalIDs []string `json:"external_ids"` }
DeleteDataSourceEntriesParams are the parameters for DeleteDataSourceEntries.
type DeleteDataSourceEntriesResult ¶
type DeleteDataSourceEntriesResult struct { metadata.DataSource Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
DeleteDataSourceEntriesResult is the result of DeleteDataSourceEntries.
type DeleteDerivedAssetsByTransformationParams ¶
type DeleteDerivedAssetsByTransformationParams struct { AssetType api.AssetType `json:"-"` DeliveryType api.DeliveryType `json:"-"` PublicIDs api.CldAPIArray `json:"public_ids"` // The public IDs for which you want to delete derived resources. Transformations string `json:"transformations"` // The transformation(s) associated with the derived resources to delete. KeepOriginal bool `json:"keep_original"` Invalidate bool `json:"invalidate,omitempty"` }
DeleteDerivedAssetsByTransformationParams are the parameters for DeleteDerivedAssetsByTransformation.
type DeleteDerivedAssetsParams ¶
type DeleteDerivedAssetsParams struct {
DerivedAssetIDs api.CldAPIArray `json:"derived_resource_ids"`
}
DeleteDerivedAssetsParams are the parameters for DeleteDerivedAssets.
type DeleteFolderParams ¶
type DeleteFolderParams struct {
Folder string `json:"-"` // The full path of the empty folder to delete.
}
DeleteFolderParams are the parameters for DeleteFolder.
type DeleteFolderResult ¶
type DeleteFolderResult struct { Deleted []string `json:"deleted"` Error api.ErrorResp `json:"error,omitempty"` }
DeleteFolderResult is the result of DeleteFolder.
type DeleteMetadataFieldParams ¶
type DeleteMetadataFieldParams struct {
FieldExternalID string `json:"-"`
}
DeleteMetadataFieldParams are the parameters for DeleteMetadataField.
type DeleteMetadataFieldResult ¶
type DeleteMetadataFieldResult struct { Message string `json:"message"` Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
DeleteMetadataFieldResult is the result of DeleteMetadataField.
type DeleteStreamingProfileParams ¶
type DeleteStreamingProfileParams struct {
Name string `json:"-"` // The name of the streaming profile to delete or revert.
}
DeleteStreamingProfileParams are the parameters for DeleteStreamingProfile.
type DeleteStreamingProfileResult ¶
type DeleteStreamingProfileResult struct { Message string `json:"message"` Error api.ErrorResp `json:"error,omitempty"` }
DeleteStreamingProfileResult is the result of DeleteStreamingProfile.
type DeleteTransformationParams ¶
type DeleteTransformationParams struct {
Transformation transformation.RawTransformation `json:"transformation"`
}
DeleteTransformationParams are the parameters for DeleteTransformation.
type DeleteUploadMappingParams ¶
type DeleteUploadMappingParams struct {
Folder string `json:"folder"` // The name of the upload mapping folder to delete.
}
DeleteUploadMappingParams are the parameters for DeleteUploadMapping.
type DeleteUploadPresetParams ¶
type DeleteUploadPresetParams struct {
Name string `json:"-"`
}
DeleteUploadPresetParams are the parameters for DeleteUploadPreset.
type DerivedAsset ¶
type DerivedAsset struct { PublicID string `json:"public_id"` ResourceType string `json:"resource_type"` Type string `json:"type"` Format string `json:"format"` URL string `json:"url"` SecureURL string `json:"secure_url"` Bytes int `json:"bytes"` ID string `json:"id"` }
DerivedAsset represents a single derived asset.
type Direction ¶
type Direction string
Direction is the sorting direction.
const ( // Ascending direction. Ascending Direction = "asc" // Descending direction. Descending = "desc" )
type FolderResult ¶
FolderResult contains details of a single folder.
type FoldersResult ¶
type FoldersResult struct { Folders []FolderResult `json:"folders"` TotalCount int `json:"total_count"` NextCursor string `json:"next_cursor"` Error api.ErrorResp `json:"error,omitempty"` }
FoldersResult is the result of RootFolders, SubFolders.
type GetStreamingProfileParams ¶
type GetStreamingProfileParams struct {
Name string `json:"-"`
}
GetStreamingProfileParams are the parameters for GetStreamingProfile.
type GetStreamingProfileResult ¶
type GetStreamingProfileResult struct { Data StreamingProfileDetails `json:"data"` Error api.ErrorResp `json:"error,omitempty"` }
GetStreamingProfileResult is the result of GetStreamingProfile.
type GetTransformationParams ¶
type GetTransformationParams struct { Transformation transformation.RawTransformation `json:"transformation"` // The transformation string. MaxResults int `json:"max_results,omitempty"` NextCursor string `json:"next_cursor,omitempty"` }
GetTransformationParams are the parameters for GetTransformation.
type GetTransformationResult ¶
type GetTransformationResult struct { Name string `json:"name"` AllowedForStrict bool `json:"allowed_for_strict"` Used bool `json:"used"` Named bool `json:"named"` Info transformation.Transformation `json:"info"` Derived []DerivedAsset `json:"derived"` Error api.ErrorResp `json:"error,omitempty"` }
GetTransformationResult is the result of GetTransformation.
type GetUploadMappingParams ¶
type GetUploadMappingParams struct {
Folder string `json:"folder"` // The name of the upload mapping folder.
}
GetUploadMappingParams are the parameters for GetUploadMapping.
type GetUploadMappingResult ¶
type GetUploadMappingResult struct { Folder string `json:"folder"` Template string `json:"template"` Error api.ErrorResp `json:"error,omitempty"` }
GetUploadMappingResult is the result of GetUploadMapping.
type GetUploadPresetParams ¶
type GetUploadPresetParams struct { Name string `json:"-"` MaxResults int `json:"max_results,omitempty"` }
GetUploadPresetParams are the parameters for GetUploadPreset.
type GetUploadPresetResult ¶
type GetUploadPresetResult struct { Name string `json:"name"` Unsigned bool `json:"unsigned"` Settings interface{} `json:"settings"` Error api.ErrorResp `json:"error,omitempty"` }
GetUploadPresetResult is the result of GetUploadPreset.
type ImageAnalysis ¶
type ImageAnalysis struct { FaceCount int `json:"face_count"` Faces [][]int `json:"faces"` Grayscale bool `json:"grayscale"` IllustrationScore int `json:"illustration_score"` Transparent bool `json:"transparent"` Etag string `json:"etag"` Colors map[string]float64 `json:"colors"` }
ImageAnalysis contains details about image analysis.
type ImageMetadataResult ¶
ImageMetadataResult contains the image metadata.
type ListMetadataFieldsResult ¶
type ListMetadataFieldsResult struct { MetadataFields []metadata.Field `json:"metadata_fields"` Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
ListMetadataFieldsResult is the result of ListMetadataFields.
type ListStreamingProfilesResult ¶
type ListStreamingProfilesResult struct { Data []StreamingProfile `json:"data"` Error api.ErrorResp `json:"error,omitempty"` }
ListStreamingProfilesResult represents the result of listing of streaming profiles.
type ListTransformationsParams ¶
type ListTransformationsParams struct { Named bool `json:"named,omitempty"` MaxResults int `json:"max_results,omitempty"` NextCursor string `json:"next_cursor,omitempty"` }
ListTransformationsParams are the parameters for ListTransformations.
type ListTransformationsResult ¶
type ListTransformationsResult struct { Transformations []TransformationListItem `json:"transformations"` Error api.ErrorResp `json:"error,omitempty"` }
ListTransformationsResult is the result of ListTransformations.
type ListUploadMappingsParams ¶
type ListUploadMappingsParams struct { MaxResults int `json:"max_results,omitempty"` NextCursor string `json:"next_cursor,omitempty"` }
ListUploadMappingsParams are the parameters for ListUploadMappings.
type ListUploadMappingsResult ¶
type ListUploadMappingsResult struct { Mappings []UploadMapping `json:"mappings"` Error api.ErrorResp `json:"error,omitempty"` }
ListUploadMappingsResult is the result of ListUploadMappings.
type ListUploadPresetsParams ¶
type ListUploadPresetsParams struct { MaxResults int `json:"max_results,omitempty"` NextCursor string `json:"next_cursor,omitempty"` }
ListUploadPresetsParams are the parameters for ListUploadPresets.
type ListUploadPresetsResult ¶
type ListUploadPresetsResult struct { Presets []UploadPreset `json:"presets"` Error api.ErrorResp `json:"error,omitempty"` }
ListUploadPresetsResult is the result of ListUploadPresets.
type MetadataFieldByFieldIDParams ¶ added in v1.0.0
type MetadataFieldByFieldIDParams struct {
FieldExternalID string `json:"-"`
}
MetadataFieldByFieldIDParams are the parameters for MetadataFieldByFieldID.
type MetadataFieldByFieldIDResult ¶ added in v1.0.0
type MetadataFieldByFieldIDResult struct { metadata.Field Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
MetadataFieldByFieldIDResult is the result of MetadataFieldByFieldID.
type OrderByField ¶ added in v1.3.0
type OrderByField string
const OrderFieldCreatedAt OrderByField = "created_at"
const OrderFieldExternalID OrderByField = "external_id"
const OrderFieldLabel OrderByField = "label"
const OrderFieldValue OrderByField = "value"
type PingResult ¶
type PingResult struct { Status string `json:"status"` Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
PingResult represents the result of the Ping request.
type PredominantResult ¶
type PredominantResult struct { Google [][]interface{} `json:"google"` Cloudinary [][]interface{} `json:"cloudinary"` }
PredominantResult contains the details about predominant colors.
type QualityAnalysisResult ¶
type QualityAnalysisResult struct { JpegQuality float64 `json:"jpeg_quality"` JpegChroma float64 `json:"jpeg_chroma"` Focus float64 `json:"focus"` Noise float64 `json:"noise"` Contrast float64 `json:"contrast"` Exposure float64 `json:"exposure"` Saturation float64 `json:"saturation"` Lighting float64 `json:"lighting"` PixelScore float64 `json:"pixel_score"` ColorScore float64 `json:"color_score"` Dct float64 `json:"dct"` Blockiness float64 `json:"blockiness"` ChromaSubsampling float64 `json:"chroma_subsampling"` Resolution float64 `json:"resolution"` }
QualityAnalysisResult contains the details about quality analysis.
type RawStreamingProfileRepresentation ¶
type RawStreamingProfileRepresentation struct {
Transformation transformation.RawTransformation `json:"transformation"`
}
RawStreamingProfileRepresentation is a raw representation of a steaming profile.
type ReorderMetadataFieldDatasourceParams ¶ added in v1.3.0
type ReorderMetadataFieldDatasourceParams struct { FieldExternalId string `json:"-"` FieldOrderBy OrderByField `json:"order_by"` FieldDirection Direction `json:"direction,omitempty"` }
type ReorderMetadataFieldDatasourceResult ¶ added in v1.3.0
type ReorderMetadataFieldDatasourceResult struct { metadata.DataSource Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
type ReorderMetadataFieldsParams ¶ added in v1.7.0
type ReorderMetadataFieldsParams struct { FieldOrderBy OrderByField `json:"order_by"` FieldDirection Direction `json:"direction,omitempty"` }
ReorderMetadataFieldsParams are the parameters for ReorderMetadataFields.
type ReorderMetadataFieldsResult ¶ added in v1.7.0
type ReorderMetadataFieldsResult struct { MetadataFields []metadata.Field `json:"metadata_fields"` Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
ReorderMetadataFieldsResult is the result of ReorderMetadataFields.
type RestoreAssetsParams ¶
type RestoreAssetsParams struct { AssetType api.AssetType `json:"-"` DeliveryType api.DeliveryType `json:"-"` PublicIDs api.CldAPIArray `json:"public_ids"` Versions api.CldAPIArray `json:"versions"` }
RestoreAssetsParams are the parameters for RestoreAssets.
type RestoreAssetsResult ¶
type RestoreAssetsResult map[string]api.BriefAssetResult
RestoreAssetsResult is the result of RestoreAssets.
type RestoreDatasourceEntriesParams ¶
type RestoreDatasourceEntriesParams struct { FieldExternalID string `json:"-"` EntriesExternalIDs []string `json:"external_ids"` }
RestoreDatasourceEntriesParams are the parameters for RestoreDatasourceEntries.
type RestoreDatasourceEntriesResult ¶
type RestoreDatasourceEntriesResult struct { metadata.DataSource Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
RestoreDatasourceEntriesResult is the result of RestoreDatasourceEntries.
type RootFoldersParams ¶
type RootFoldersParams struct { MaxResults int `json:"max_results,omitempty"` NextCursor string `json:"next_cursor,omitempty"` }
RootFoldersParams are the parameters for RootFolders.
type SearchAsset ¶
type SearchAsset struct { PublicID string `json:"public_id"` Folder string `json:"folder"` Filename string `json:"filename"` Format string `json:"format"` Version int `json:"version"` ResourceType string `json:"resource_type"` Type string `json:"type"` CreatedAt time.Time `json:"created_at"` UploadedAt time.Time `json:"uploaded_at"` Bytes int `json:"bytes"` BackupBytes int `json:"backup_bytes"` Width int `json:"width"` Height int `json:"height"` AspectRatio float64 `json:"aspect_ratio"` Pixels int `json:"pixels"` Tags []string `json:"tags"` ImageMetadata ImageMetadataResult `json:"image_metadata"` ImageAnalysis ImageAnalysis `json:"image_analysis"` URL string `json:"url"` SecureURL string `json:"secure_url"` Status string `json:"status"` AccessMode string `json:"access_mode"` AccessControl interface{} `json:"access_control"` Etag string `json:"etag"` CreatedBy SearchUser `json:"created_by"` UploadedBy SearchUser `json:"uploaded_by"` }
SearchAsset represents the details of a single asset that was found.
type SearchResult ¶
type SearchResult struct { TotalCount int `json:"total_count"` Time int `json:"time"` Assets []SearchAsset `json:"resources"` Error api.ErrorResp `json:"error,omitempty"` NextCursor string `json:"next_cursor,omitempty"` Response interface{} }
SearchResult is the result of Search.
type SearchUser ¶
type SearchUser struct {
AccessKey string `json:"access_key"`
}
SearchUser contains details about the user.
type StreamingProfile ¶
type StreamingProfile struct { Name string `json:"name"` DisplayName string `json:"display_name"` Predefined bool `json:"predefined"` }
StreamingProfile represents a single streaming profile.
type StreamingProfileDetails ¶
type StreamingProfileDetails struct { Name string `json:"name"` DisplayName string `json:"display_name,omitempty"` Predefined bool `json:"predefined"` Representations []StreamingProfileRepresentation `json:"representations,omitempty"` }
StreamingProfileDetails represents the details of a streaming profile.
type StreamingProfileRepresentation ¶
type StreamingProfileRepresentation struct {
Transformation transformation.Transformation `json:"transformation"`
}
StreamingProfileRepresentation is a representation of a single streaming profile.
type StreamingProfileRepresentations ¶
type StreamingProfileRepresentations []RawStreamingProfileRepresentation
StreamingProfileRepresentations contains multiple streaming profile representations.
func (StreamingProfileRepresentations) MarshalJSON ¶
func (spRepresentations StreamingProfileRepresentations) MarshalJSON() ([]byte, error)
MarshalJSON serializes StreamingProfileRepresentations to a string of a json encoded array.
type SubFoldersParams ¶
type SubFoldersParams struct { Folder string `json:"-"` MaxResults int `json:"max_results,omitempty"` NextCursor string `json:"next_cursor,omitempty"` }
SubFoldersParams are the parameters for SubFolders.
type TagsParams ¶
type TagsParams struct { AssetType api.AssetType `json:"-"` // The type of asset. NextCursor string `json:"next_cursor,omitempty"` // The cursor used for pagination. MaxResults int `json:"max_results,omitempty"` // Maximum number of tags to return (up to 500). Default: 10. Prefix string `json:"prefix,omitempty"` // Find all tags that start with the given prefix. }
TagsParams are the parameters for Tags.
type TagsResult ¶
type TagsResult struct { Tags []string `json:"tags"` NextCursor string `json:"next_cursor"` Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
TagsResult is the result of Tags.
type TransformationListItem ¶
type TransformationListItem struct { Name string `json:"name"` AllowedForStrict bool `json:"allowed_for_strict"` Used bool `json:"used"` Named bool `json:"named"` }
TransformationListItem represents a single transformation.
type TransformationResult ¶
type TransformationResult struct { Message string `json:"message"` Error api.ErrorResp `json:"error,omitempty"` }
TransformationResult is the result of CreateTransformation, UpdateTransformation, DeleteTransformation.
type UpdateAssetParams ¶
type UpdateAssetParams struct { AssetType api.AssetType `json:"-"` DeliveryType api.DeliveryType `json:"-"` PublicID string `json:"-"` ModerationStatus api.ModerationStatus `json:"moderation_status,omitempty"` RawConvert string `json:"raw_convert,omitempty"` Ocr string `json:"ocr,omitempty"` Categorization string `json:"categorization,omitempty"` Detection string `json:"detection,omitempty"` SimilaritySearch string `json:"similarity_search,omitempty"` AutoTagging float64 `json:"auto_tagging,omitempty"` BackgroundRemoval string `json:"background_removal,omitempty"` QualityOverride int `json:"quality_override,omitempty"` NotificationURL string `json:"notification_url,omitempty"` Tags api.CldAPIArray `json:"tags,omitempty,omitempty"` Context api.CldAPIMap `json:"context,omitempty"` FaceCoordinates api.Coordinates `json:"face_coordinates,omitempty"` CustomCoordinates api.Coordinates `json:"custom_coordinates,omitempty"` AccessControl interface{} `json:"access_control,omitempty"` }
UpdateAssetParams are the parameters for UpdateAsset.
type UpdateMetadataFieldDataSourceParams ¶
type UpdateMetadataFieldDataSourceParams struct { metadata.DataSource FieldExternalID string `json:"-"` }
UpdateMetadataFieldDataSourceParams are the parameters for UpdateMetadataFieldDataSource.
type UpdateMetadataFieldDataSourceResult ¶
type UpdateMetadataFieldDataSourceResult struct { metadata.DataSource Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
UpdateMetadataFieldDataSourceResult is the result of UpdateMetadataFieldDataSource.
type UpdateMetadataFieldParams ¶
UpdateMetadataFieldParams are the parameters for UpdateMetadataField.
type UpdateMetadataFieldResult ¶
type UpdateMetadataFieldResult struct { metadata.Field Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
UpdateMetadataFieldResult is the result of UpdateMetadataField.
type UpdateStreamingProfileParams ¶
type UpdateStreamingProfileParams struct { Name string `json:"-"` // The name of the streaming profile to update. DisplayName string `json:"display_name,omitempty"` Representations StreamingProfileRepresentations `json:"representations"` }
UpdateStreamingProfileParams are the parameters for UpdateStreamingProfile
type UpdateTransformationParams ¶
type UpdateTransformationParams struct { Transformation transformation.RawTransformation `json:"transformation"` AllowedForStrict bool `json:"allowed_for_strict,omitempty"` UnsafeUpdate transformation.RawTransformation `json:"unsafe_update,omitempty"` }
UpdateTransformationParams are the parameters for UpdateTransformation.
type UpdateUploadMappingParams ¶
type UpdateUploadMappingParams struct { Folder string `json:"folder"` // The name of the upload mapping folder to remap. Template string `json:"template"` }
UpdateUploadMappingParams are the parameters for UpdateUploadMapping.
type UpdateUploadPresetParams ¶
type UpdateUploadPresetParams struct { Name string `json:"name"` Unsigned bool `json:"unsigned,omitempty"` DisallowPublicID bool `json:"disallow_public_id,omitempty"` Live bool `json:"live,omitempty"` uploader.UploadParams }
UpdateUploadPresetParams are the parameters for UpdateUploadPreset.
type UploadMapping ¶
UploadMapping represents a single upload mapping.
type UploadMappingResult ¶
type UploadMappingResult struct { Message string `json:"message"` Error api.ErrorResp `json:"error,omitempty"` }
UploadMappingResult is the result of UpdateUploadMapping, DeleteUploadMapping.
type UploadPreset ¶
type UploadPreset struct { Name string `json:"name"` Unsigned bool `json:"unsigned"` Settings interface{} `json:"settings"` }
UploadPreset represents the details of the upload preset.
type UploadPresetResult ¶
type UploadPresetResult struct { Message string `json:"message"` Error api.ErrorResp `json:"error,omitempty"` }
UploadPresetResult is the result of UpdateUploadPreset, DeleteUploadPreset.
type UsageParams ¶
UsageParams are the parameters for Usage.
type UsageResult ¶
type UsageResult struct { Plan string `json:"plan"` LastUpdated string `json:"last_updated"` Transformations struct { Usage int `json:"usage"` CreditsUsage float64 `json:"credits_usage"` Limit int `json:"limit"` UsedPercent float64 `json:"used_percent"` } `json:"transformations"` Objects struct { Usage int `json:"usage"` Limit int `json:"limit"` UsedPercent float64 `json:"used_percent"` } `json:"objects"` Bandwidth struct { Usage int64 `json:"usage"` CreditsUsage float64 `json:"credits_usage"` Limit int64 `json:"limit"` UsedPercent float64 `json:"used_percent"` } `json:"bandwidth"` Storage struct { Usage int64 `json:"usage"` CreditsUsage float64 `json:"credits_usage"` Limit int64 `json:"limit"` UsedPercent float64 `json:"used_percent"` } `json:"storage"` Credits struct { Usage float64 `json:"usage"` } `json:"credits"` Requests int64 `json:"requests"` Resources int `json:"resources"` DerivedResources int `json:"derived_resources"` MediaLimits struct { ImageMaxSizeBytes int `json:"image_max_size_bytes"` VideoMaxSizeBytes int `json:"video_max_size_bytes"` RawMaxSizeBytes int `json:"raw_max_size_bytes"` ImageMaxPx int `json:"image_max_px"` AssetMaxTotalPx int `json:"asset_max_total_px"` } `json:"media_limits"` Error api.ErrorResp `json:"error,omitempty"` Response interface{} }
UsageResult is the result of Usage.