Documentation ¶
Overview ¶
Package database is a database interface for mirror settings.
Index ¶
- type MirrorDB
- func (db *MirrorDB) AddMirror(ctx context.Context, m *model.Mirror) error
- func (db *MirrorDB) DeleteMirror(ctx context.Context, m *model.Mirror) error
- func (db *MirrorDB) GetMirror(ctx context.Context, id int64) (*model.Mirror, error)
- func (db *MirrorDB) ListFiles(ctx context.Context, mirrorID int64) ([]*model.MirrorFile, error)
- func (db *MirrorDB) Mirrors(ctx context.Context) ([]*model.Mirror, error)
- func (db *MirrorDB) SaveFiles(ctx context.Context, mirrorID int64, filenames []*SyncFile) error
- func (db *MirrorDB) UpdateMirror(ctx context.Context, m *model.Mirror) error
- type SyncFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MirrorDB ¶
type MirrorDB struct {
// contains filtered or unexported fields
}
func (*MirrorDB) DeleteMirror ¶
type SyncFile ¶ added in v0.16.1
type SyncFile struct { // RemoteFile is the ONLY the final filename (last part after the slash) with // extension. It does not include the URL, protocol or root information as // that is built from the parent mirror record. RemoteFile string // LocalFile is blank unless a rewrite rule was provided. It is also just the // filename (no URL or protocol information). LocalFile string }
Click to show internal directories.
Click to hide internal directories.