Documentation
¶
Index ¶
- func NewInsertDownloadQuery(db *bun.DB, download Download) *bun.InsertQuery
- func NewInsertUploaderQuery(db *bun.DB, uploader Uploader) *bun.InsertQuery
- func NewSelectDownloadQuery(db *bun.DB, id string) *bun.SelectQuery
- func NewSelectUploaderQuery(db *bun.DB, id string) *bun.SelectQuery
- type Database
- type DatabaseConfig
- type DatabaseImpl
- func (db *DatabaseImpl) BunDB() *bun.DB
- func (db *DatabaseImpl) Insert(query *bun.InsertQuery) error
- func (db *DatabaseImpl) SelectDownload(query *bun.SelectQuery) ([]Download, error)
- func (db *DatabaseImpl) SelectUploader(query *bun.SelectQuery) ([]Uploader, error)
- func (db *DatabaseImpl) StoreMetadata(id string, metadata []byte) error
- type Download
- type Uploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInsertDownloadQuery ¶
func NewInsertDownloadQuery(db *bun.DB, download Download) *bun.InsertQuery
func NewInsertUploaderQuery ¶
func NewInsertUploaderQuery(db *bun.DB, uploader Uploader) *bun.InsertQuery
func NewSelectDownloadQuery ¶
func NewSelectDownloadQuery(db *bun.DB, id string) *bun.SelectQuery
func NewSelectUploaderQuery ¶
func NewSelectUploaderQuery(db *bun.DB, id string) *bun.SelectQuery
Types ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
MetadataDir string
}
type DatabaseImpl ¶
type DatabaseImpl struct {
// contains filtered or unexported fields
}
func NewDatabaseImpl ¶
func NewDatabaseImpl(config DatabaseConfig, sqldb *sql.DB) (*DatabaseImpl, error)
func (*DatabaseImpl) BunDB ¶
func (db *DatabaseImpl) BunDB() *bun.DB
func (*DatabaseImpl) Insert ¶
func (db *DatabaseImpl) Insert(query *bun.InsertQuery) error
func (*DatabaseImpl) SelectDownload ¶
func (db *DatabaseImpl) SelectDownload(query *bun.SelectQuery) ([]Download, error)
func (*DatabaseImpl) SelectUploader ¶
func (db *DatabaseImpl) SelectUploader(query *bun.SelectQuery) ([]Uploader, error)
func (*DatabaseImpl) StoreMetadata ¶
func (db *DatabaseImpl) StoreMetadata(id string, metadata []byte) error
Click to show internal directories.
Click to hide internal directories.