Documentation ¶
Overview ¶
Package cloudinary cloudinary provides support for managing static assets on the Cloudinary service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cloudinary ¶
type Cloudinary struct {
// contains filtered or unexported fields
}
Cloudinary the service
func New ¶
func New(uri string) (*Cloudinary, error)
New instances new Cloudinary the uri param must be a valid URI with the cloudinary:// scheme. e.g. cloudinary://api_key:api_secret@cloud_name
func (*Cloudinary) Delete ¶
func (c *Cloudinary) Delete(name string) error
Delete deletes image from cloudinary
func (*Cloudinary) DeleteVideo ¶
func (c *Cloudinary) DeleteVideo(name string) error
DeleteVideo deletes video from cloudinary
func (*Cloudinary) Upload ¶
func (c *Cloudinary) Upload(r io.Reader, name string) (*UploadResponse, error)
Upload uploads image. if name keep "" the file name will be random
func (*Cloudinary) UploadVideo ¶
func (c *Cloudinary) UploadVideo(r io.Reader, name string) (*UploadResponse, error)
UploadVideo uploads video. if name keep "" the file name will be random
type UploadResponse ¶
type UploadResponse struct { PublicID string `json:"public_id"` Version uint `json:"version"` Signature string `json:"signature"` Width int `json:"width"` Height int `json:"width"` Format string `json:"format"` ResourceType string `json:"resource_type"` CreatedAt string `json:"created_at"` Bytes int `json:"bytes"` URL string `json:"url"` SecureURL string `json:"secure_url"` }
UploadResponse ...
type UploadType ¶
type UploadType string
UploadType image, video, raw
const ( ImageType UploadType = "image" VideoType = "video" )
Upload types
Click to show internal directories.
Click to hide internal directories.