Documentation
¶
Index ¶
- Constants
- type File
- type FileRepo
- func (f FileRepo) Create(fileMap map[string]interface{}) error
- func (f FileRepo) GetFileByID(id int64) (*models.File, error)
- func (f FileRepo) GetFileByName(name string) (*models.File, error)
- func (f FileRepo) GetFiles() ([]*models.File, error)
- func (f FileRepo) GetPublicFileByID(id int64) (*models.PublicFile, error)
- func (f FileRepo) GetPublicFileByName(name string) (*models.PublicFile, error)
- func (f FileRepo) GetPublicFilesByProvider(_provider string) ([]*models.PublicFile, error)
- func (f FileRepo) Update(fileMap map[string]interface{}) ([]*models.File, error)
- type FileRepository
Constants ¶
View Source
const PublicDir = "/api/v1/files/"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { ID int64 `db:"id"` Name string `db:"name"` Alt string `db:"alt"` Caption string `db:"caption"` Width int64 `db:"width"` Height int64 `db:"height"` Provider *string `db:"provider"` Hash string `db:"hash"` Ext string `db:"ext"` Size int64 `db:"size"` Url string `db:"url"` Formats interface{} `db:"formats"` Metadata interface{} `db:"metadata"` Mime string `db:"mime"` Thumb string `db:"preview_url"` CreatedBy int64 `db:"created_by"` UpdatedBy int64 `db:"updated_by"` Created strfmt.Date `db:"created"` Updated strfmt.Date `db:"updated"` Deleted strfmt.Date `db:"deleted"` }
type FileRepo ¶
type FileRepo struct { PublicDir string // contains filtered or unexported fields }
func (FileRepo) GetPublicFileByID ¶
func (f FileRepo) GetPublicFileByID(id int64) (*models.PublicFile, error)
func (FileRepo) GetPublicFileByName ¶
func (f FileRepo) GetPublicFileByName(name string) (*models.PublicFile, error)
func (FileRepo) GetPublicFilesByProvider ¶
func (f FileRepo) GetPublicFilesByProvider(_provider string) ([]*models.PublicFile, error)
type FileRepository ¶
type FileRepository interface { Create(fileMap map[string]interface{}) error Update(fileMap map[string]interface{}) ([]*models.File, error) GetFiles() ([]*models.File, error) GetFileByName(name string) (*models.File, error) GetFileByID(id int64) (*models.File, error) GetPublicFilesByProvider(_provider string) ([]*models.PublicFile, error) GetPublicFileByName(name string) (*models.PublicFile, error) GetPublicFileByID(id int64) (*models.PublicFile, error) }
Click to show internal directories.
Click to hide internal directories.