Documentation
¶
Overview ¶
Package cloudinary provides support for managing static assets on the Cloudinary service.
The Cloudinary service allows image and raw files management in the cloud.
Index ¶
- type Response
- type Service
- func (s *Service) UploadByFile(path, resourceType string) (*Response, error)
- func (s *Service) UploadByIOReader(reader io.Reader, resourceType string) (*Response, error)
- func (s *Service) UploadByURL(addr, resourceType string) (*Response, error)
- func (s *Service) UploadDestroy(publicID, resourceType string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { PublicID string `json:"public_id,omitempty"` SecureURL string `json:"secure_url,omitempty"` Version uint `json:"version,omitempty"` Format string `json:"format,omitempty"` ResourceType string `json:"resource_type,omitempty"` Size int `json:"bytes,omitempty"` // In bytes Result string `json:"result,omitempty"` }
Response from calling API.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the cloudinary service it allows uploading of images to cloudinary
func Dial ¶
Dial will use the url to connect to the Cloudinary service. The uri parameter must be a valid URI with the cloudinary:// scheme, e.g. cloudinary://api_key:api_secret@cloud_name
func (*Service) UploadByFile ¶
UploadFile will upload a file to cloudinary
func (*Service) UploadByIOReader ¶
UploadByIOReader upload a file to cloudinary from a reader
func (*Service) UploadByURL ¶
UploadImageURL will add an image to cloudinary when given a URL to the image
func (*Service) UploadDestroy ¶
Delete a resource in Cloudinary via public ID