Versions in this module Expand all Collapse all v1 v1.0.0 May 3, 2019 Changes in this version + func CheckResponse(r *http.Response) error + type AdminResponse struct + Deleted interface{} + Partial bool + func (ar *AdminResponse) ToJSON() string + type AdminService service + func (as *AdminService) DeleteAllResources(opts ...SetOpts) (ar *AdminResponse, resp *Response, err error) + func (as *AdminService) DeleteDerivedResources(derivedResourceIds string, opts ...SetOpts) (ar *AdminResponse, resp *Response, err error) + func (as *AdminService) DeleteDerivedResourcesByTransformation(publicId, transformation []string, opts ...SetOpts) (ar *AdminResponse, resp *Response, err error) + func (as *AdminService) DeleteResources(ctx context.Context, publicIds []string, opts ...SetOpts) (ar *AdminResponse, resp *Response, err error) + func (as *AdminService) DeleteResourcesByPrefix(ctx context.Context, prefix string, opts ...SetOpts) (ar *AdminResponse, resp *Response, err error) + func (as *AdminService) DeleteResourcesByTag(ctx context.Context, tag string, opts ...SetOpts) (ar *AdminResponse, resp *Response, err error) + type Client struct + Admin *AdminService + BaseURL *url.URL + Upload *UploadService + func NewClient(httpClient *http.Client, uri string) (*Client, error) + func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error) + func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error) + func (c *Client) NewUploadRequest(urlStr string, reader io.Reader, writer *multipart.Writer) (*http.Request, error) + type ErrorResponse struct + DocumentationURL string + ErrorData struct{ ... } + Response *http.Response + func (r *ErrorResponse) Error() string + type Options struct + AccessMode *string + AllowedFormats *string + Async *bool + AutoTagging *float64 + BackgroundRemoval *string + Backup *bool + Callback *string + Categorization *string + Colors *bool + Context *string + CustomCoordinates *string + Detection *string + DiscardOriginalFilename *bool + Eager *string + EagerAsync *bool + EagerNotificationURL *string + Exif *bool + FaceCoordinates *string + Faces *bool + Folder *string + Format *string + Headers *string + ImageMetadata *bool + Invalidate *bool + KeepOriginal *bool + Moderation *string + NextCursor *string + NotificationURL *string + OCR *string + Overwrite *bool + Phash *bool + Proxy *string + PublicId *string + QualityAnalysis *bool + RawConvert *string + ResourceType *string + ReturnDeleteToken *bool + Tags *string + Timestamp *string + Transformations *string + Type *string + UniqueFilename *bool + UploadPreset *string + UseFilename *bool + func (o *Options) GetInvalidate() bool + func (o *Options) GetKeepOriginal() bool + func (o *Options) GetNextCursor() string + func (o *Options) GetPublicId() string + func (o *Options) GetResourceType() string + func (o *Options) GetTimestamp() string + func (o *Options) GetType() string + func (o *Options) GetUploadPreset() string + type ResourceType string + type Response struct + type SetOpts func(opts *Options) + func WithAccessMode(accessMode string) SetOpts + func WithAutoTagging(autoTagging float64) SetOpts + func WithCategorization(c string) SetOpts + func WithColors(hasColor bool) SetOpts + func WithContext(ctx string) SetOpts + func WithDetection(d string) SetOpts + func WithDiscardOriginalFilename(dof bool) SetOpts + func WithExif(e bool) SetOpts + func WithFaces(returnFaces bool) SetOpts + func WithFolder(folder string) SetOpts + func WithImageMetadata(returnImageMetadata bool) SetOpts + func WithKeepOriginal(ko bool) SetOpts + func WithOCR(ocr string) SetOpts + func WithOverwrite(isOverwrite bool) SetOpts + func WithPhash(returnPhash bool) SetOpts + func WithPublicId(id string) SetOpts + func WithQualityAnalysis(returnQualityAnalysis bool) SetOpts + func WithResourceType(resourceType string) SetOpts + func WithTags(tags string) SetOpts + func WithType(typeStr string) SetOpts + func WithUniqueFilename(isUniqueFilename bool) SetOpts + func WithUploadPreset(uploadPreset string) SetOpts + func WithUseFilename(isUseFilename bool) SetOpts + type UploadRequest struct + File string + type UploadResponse struct + AccessMode string + Bytes int64 + Colors [][]interface{} + CreatedAt string + Etag string + Format string + Height int64 + OriginalFilename string + Placeholder bool + PublicId string + ResourceType string + SecureURL string + Signature string + Tags []string + Type string + URL string + Version int64 + Width int64 + type UploadService service + func (us *UploadService) UnsignedUploadImage(ctx context.Context, filePath string, uploadPreset string, opts ...SetOpts) (ur *UploadResponse, r *Response, err error) + func (us *UploadService) UploadImage(ctx context.Context, filePath string, opts ...SetOpts) (ur *UploadResponse, r *Response, err error)