database

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package database is a database interface for mirror settings.

Index

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 New

func New(db *database.DB) *MirrorDB

func (*MirrorDB) AddMirror

func (db *MirrorDB) AddMirror(ctx context.Context, m *model.Mirror) error

func (*MirrorDB) DeleteMirror

func (db *MirrorDB) DeleteMirror(ctx context.Context, m *model.Mirror) error

func (*MirrorDB) ListFiles

func (db *MirrorDB) ListFiles(ctx context.Context, mirrorID int64) ([]*model.MirrorFile, error)

func (*MirrorDB) Mirrors

func (db *MirrorDB) Mirrors(ctx context.Context) ([]*model.Mirror, error)

func (*MirrorDB) SaveFiles

func (db *MirrorDB) SaveFiles(ctx context.Context, mirrorID int64, filenames []string) error

SaveFiles makes the list of filenames passed in the only files that are saved on that mirrorID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL