files

package
Version: v0.0.0-...-0ccb4e7 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2020 License: MIT Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	ID          uuid.UUID
	CreatedAt   time.Time
	Name        string
	Description string
}

func (File) GetDescription

func (f File) GetDescription() string

func (File) GetID

func (f File) GetID() uuid.UUID

func (File) GetName

func (f File) GetName() string

type FileItf

type FileItf interface {
	GetID() uuid.UUID
	GetName() string
	GetDescription() string
}

type Files

type Files struct {
	// contains filtered or unexported fields
}

func New

func New(storage storage.Storage) *Files

func (*Files) Configure

func (f *Files) Configure(app gongo.App) error

func (*Files) Delete

func (f *Files) Delete(file FileItf) error

func (*Files) NewFile

func (f *Files) NewFile(input io.Reader, name, description string) (File, error)

func (*Files) NewImage

func (f *Files) NewImage(input ImageFile, name, description string) (Image, error)

func (*Files) Resources

func (f *Files) Resources() []interface{}

func (*Files) URL

func (f *Files) URL(file FileItf) (string, error)

type Image

type Image struct {
	File
	Format   string
	Width    int
	Height   int
	ExifJSON string
}

type ImageFile

type ImageFile interface {
	io.Reader
	io.ReaderAt
	io.Seeker
}

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL