Documentation
¶
Overview ¶
Package config defines the Cloudinary configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶ added in v1.0.0
type API struct {
UploadPrefix string `default:"https://api.cloudinary.com"`
Timeout int64 `default:"60"` // seconds
UploadTimeout int64
ChunkSize int64 `default:"20000000"` //bytes
}
API defines the configuration for making requests to the Cloudinary API.
type AuthToken ¶ added in v1.2.0
type AuthToken struct {
Key string
IP string
ACL string
StartTime int64
Expiration int64
Duration int64
}
AuthToken defines the configuration for delivering token-based authenticated media assets.
type Cloud ¶ added in v1.0.0
Cloud defines the cloud configuration required to connect your application to Cloudinary.
func (Cloud) GetSignatureAlgorithm ¶ added in v1.2.0
GetSignatureAlgorithm returns the signature algorithm.
type Configuration ¶
Configuration is the main configuration struct.
func New ¶ added in v1.0.0
func New() (*Configuration, error)
New returns a new Configuration instance from the environment variable
func NewFromParams ¶ added in v1.0.0
func NewFromParams(cloud string, key string, secret string) (*Configuration, error)
NewFromParams returns a new Configuration instance from the provided parameters.
func NewFromURL ¶ added in v1.0.0
func NewFromURL(cldURLStr string) (*Configuration, error)
NewFromURL returns a new Configuration instance from a cloudinary url.
type URL ¶ added in v1.2.0
type URL struct {
Domain string `default:"cloudinary.com"`
SubDomain string `default:"res"`
CName string
SecureCName string
Secure bool `default:"true"`
CDNSubDomain bool
SecureCDNSubDomain bool
PrivateCDN bool
SignURL bool
LongURLSignature bool
Shorten bool
UseRootPath bool
ForceVersion bool `default:"true"`
Analytics bool `default:"true"`
}
URL defines the configuration applied when generating Cloudinary URLs.
func (URL) GetSignatureLength ¶ added in v1.2.0
GetSignatureLength returns the length of the URL signature.