config

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2021 License: MIT Imports: 4 Imported by: 1

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 Cloud added in v1.0.0

type Cloud struct {
	CloudName string
	APIKey    string
	APISecret string
}

Cloud defines the cloud configuration required to connect your application to Cloudinary.

https://cloudinary.com/documentation/how_to_integrate_cloudinary#get_familiar_with_the_cloudinary_console

type Configuration

type Configuration struct {
	Cloud Cloud
	API   API
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL