cloudinary

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCloudinaryApiKeyMissing       = sdkcm.CustomError("ErrCloudinaryApiKeyMissing", "Cloudinary API key is missing")
	ErrCloudinaryApiSecretKeyMissing = sdkcm.CustomError("ErrCloudinaryApiSecretKeyMissing", "Cloudinary API secret key is missing")
	ErrCloudinaryCloudNameMissing    = sdkcm.CustomError("ErrCloudinaryApiKeyMissing", "Cloudinary cloud name is missing")
)

Functions

func New

func New(prefix ...string) *cloudinary

Types

type Audio

type Audio struct {
	Codec         string `json:"codec"`
	BitRate       string `json:"bit_rate"`
	Frequency     int    `json:"frequency"`
	Channels      int    `json:"channels"`
	ChannelLayout string `json:"channel_layout"`
}

type Cloudinary

type Cloudinary interface {
	VideoUpload(ctx context.Context, file string, uploadPreset string, folder string, format string) (*VideoResult, error)
}

type Error

type Error struct {
	Message string `json:"message"`
}

type Video

type Video struct {
	PixFormat string `json:"pix_format"`
	Codec     string `json:"codec"`
	Level     int    `json:"level"`
	BitRate   string `json:"bit_rate"`
}

type VideoResult

type VideoResult struct {
	PublicID     string    `json:"public_id"`
	Version      int       `json:"version"`
	Signature    string    `json:"signature"`
	Width        int       `json:"width"`
	Height       int       `json:"height"`
	Format       string    `json:"format"`
	ResourceType string    `json:"resource_type"`
	CreatedAt    time.Time `json:"created_at"`
	Tags         []string  `json:"tags"`
	Bytes        int       `json:"bytes"`
	Type         string    `json:"type"`
	Etag         string    `json:"etag"`
	URL          string    `json:"url"`
	SecureURL    string    `json:"secure_url"`
	Audio        Audio     `json:"audio"`
	Video        Video     `json:"video"`
	FrameRate    float64   `json:"frame_rate"`
	BitRate      int       `json:"bit_rate"`
	Duration     float64   `json:"duration"`
	Error        Error     `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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