Documentation ¶
Index ¶
- Constants
- Variables
- func GetRawContent(url string) ([]byte, error)
- type Cloudinary
- func (r *Cloudinary) AllDirectories(path string) ([]string, error)
- func (r *Cloudinary) AllFiles(path string) ([]string, error)
- func (r *Cloudinary) Copy(source, destination string) error
- func (r *Cloudinary) Delete(file ...string) error
- func (r *Cloudinary) DeleteDirectory(directory string) error
- func (r *Cloudinary) Directories(path string) ([]string, error)
- func (r *Cloudinary) Exists(file string) bool
- func (r *Cloudinary) Files(path string) ([]string, error)
- func (r *Cloudinary) Get(file string) (string, error)
- func (r *Cloudinary) GetBytes(file string) ([]byte, error)
- func (r *Cloudinary) LastModified(file string) (time.Time, error)
- func (r *Cloudinary) MakeDirectory(directory string) error
- func (r *Cloudinary) MimeType(file string) (string, error)
- func (r *Cloudinary) Missing(file string) bool
- func (r *Cloudinary) Move(source, destination string) error
- func (r *Cloudinary) Path(file string) string
- func (r *Cloudinary) Put(file, content string) error
- func (r *Cloudinary) PutFile(path string, source filesystem.File) (string, error)
- func (r *Cloudinary) PutFileAs(path string, source filesystem.File, name string) (string, error)
- func (r *Cloudinary) Size(file string) (int64, error)
- func (r *Cloudinary) TemporaryUrl(file string, time time.Time) (string, error)
- func (r *Cloudinary) Url(file string) string
- func (r *Cloudinary) WithContext(ctx context.Context) filesystem.Driver
- type ServiceProvider
Constants ¶
const Binding = "goravel.cloudinary"
Variables ¶
var App foundation.Application
Functions ¶
func GetRawContent ¶
GetRawContent retrieves the raw content of a file from the provided URL.
Types ¶
type Cloudinary ¶
type Cloudinary struct {
// contains filtered or unexported fields
}
func NewCloudinary ¶
func (*Cloudinary) AllDirectories ¶
func (r *Cloudinary) AllDirectories(path string) ([]string, error)
AllDirectories returns all the directories within a given directory and all its subdirectories.
func (*Cloudinary) AllFiles ¶
func (r *Cloudinary) AllFiles(path string) ([]string, error)
AllFiles returns all the files from the given directory including all its subdirectories.
func (*Cloudinary) Copy ¶
func (r *Cloudinary) Copy(source, destination string) error
Copy copies a file to a new location.
func (*Cloudinary) Delete ¶
func (r *Cloudinary) Delete(file ...string) error
Delete deletes a file.
func (*Cloudinary) DeleteDirectory ¶
func (r *Cloudinary) DeleteDirectory(directory string) error
DeleteDirectory deletes a directory.
func (*Cloudinary) Directories ¶
func (r *Cloudinary) Directories(path string) ([]string, error)
Directories return all the directories within a given directory.
func (*Cloudinary) Exists ¶
func (r *Cloudinary) Exists(file string) bool
Exists checks if a file exists in the Cloudinary storage.
func (*Cloudinary) Files ¶
func (r *Cloudinary) Files(path string) ([]string, error)
Files returns all the files from the given directory.
func (*Cloudinary) Get ¶
func (r *Cloudinary) Get(file string) (string, error)
Get returns the contents of a file.
func (*Cloudinary) GetBytes ¶ added in v1.2.0
func (r *Cloudinary) GetBytes(file string) ([]byte, error)
GetBytes returns the byte of a file.
func (*Cloudinary) LastModified ¶
func (r *Cloudinary) LastModified(file string) (time.Time, error)
LastModified returns the last modified time of a file.
func (*Cloudinary) MakeDirectory ¶
func (r *Cloudinary) MakeDirectory(directory string) error
MakeDirectory creates a directory.
func (*Cloudinary) MimeType ¶
func (r *Cloudinary) MimeType(file string) (string, error)
MimeType returns the mime-type of a file.
func (*Cloudinary) Missing ¶
func (r *Cloudinary) Missing(file string) bool
Missing checks if a file is missing.
func (*Cloudinary) Move ¶
func (r *Cloudinary) Move(source, destination string) error
Move moves a file to a new location.
func (*Cloudinary) Path ¶
func (r *Cloudinary) Path(file string) string
Path returns the full path for a file.
func (*Cloudinary) Put ¶
func (r *Cloudinary) Put(file, content string) error
Put stores a new file on the disk.
func (*Cloudinary) PutFile ¶
func (r *Cloudinary) PutFile(path string, source filesystem.File) (string, error)
PutFile stores a new file on the disk.
func (*Cloudinary) PutFileAs ¶
func (r *Cloudinary) PutFileAs(path string, source filesystem.File, name string) (string, error)
PutFileAs stores a new file on the disk.
func (*Cloudinary) Size ¶
func (r *Cloudinary) Size(file string) (int64, error)
Size returns the file size of a given file.
func (*Cloudinary) TemporaryUrl ¶
TemporaryUrl get the temporary url of a file.
func (*Cloudinary) Url ¶
func (r *Cloudinary) Url(file string) string
Url returns the url for a file.
func (*Cloudinary) WithContext ¶
func (r *Cloudinary) WithContext(ctx context.Context) filesystem.Driver
WithContext sets the context for the driver.
type ServiceProvider ¶
type ServiceProvider struct { }
func (*ServiceProvider) Boot ¶
func (receiver *ServiceProvider) Boot(app foundation.Application)
func (*ServiceProvider) Register ¶
func (receiver *ServiceProvider) Register(app foundation.Application)