cloudinary

package module
v0.0.0-...-93302ea Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2016 License: LGPL-3.0 Imports: 10 Imported by: 0

README

cloudinary-go

Cloudinary golang lib

http://cloudinary.com/documentation

Build Status Go Report Card

Documentation

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 main struct

func Create

func Create(public string, secret string, name string) *Cloudinary

Create is creating a new cloudinary instance

func (*Cloudinary) Upload

func (c *Cloudinary) Upload(file string, options Option) (*Upload, error)

Upload is uploading an image

type ErrorResp

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

ErrorResp is the failed api request main struct

type Option

type Option map[string]string

Option is the optional parameters custom struct

type Upload

type Upload 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        string    `json:"created_at"`
	Tags             []string  `json:"tags,omitempty"`
	Bytes            int       `json:"bytes"`
	Type             string    `json:"type"`
	Etag             string    `json:"etag"`
	Url              string    `json:"url"`
	SecureUrl        string    `json:"secure_url"`
	OriginalFilename string    `json:"original_filename"`
	Error            ErrorResp `json:"error,omitempty"`
}

Upload image success response struct

Jump to

Keyboard shortcuts

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