Documentation ¶
Index ¶
- Constants
- func Migrate(db *sql.DB) error
- func New(cfg *Config, driver *ddrv.Driver) dp.DataProvider
- func NewDb(connStr string, skipMigration bool) *sql.DB
- type Config
- type PGProvider
- func (pgp *PGProvider) CHTime(name string, mtime time.Time) error
- func (pgp *PGProvider) Close() error
- func (pgp *PGProvider) Create(name, parent string, dir bool) (*dp.File, error)
- func (pgp *PGProvider) CreateNodes(fid string, nodes []ddrv.Node) error
- func (pgp *PGProvider) Delete(id, parent string) error
- func (pgp *PGProvider) Get(id, parent string) (*dp.File, error)
- func (pgp *PGProvider) GetChild(id string) ([]*dp.File, error)
- func (pgp *PGProvider) GetNodes(id string) ([]ddrv.Node, error)
- func (pgp *PGProvider) Ls(name string, limit int, offset int) ([]*dp.File, error)
- func (pgp *PGProvider) Mkdir(name string) error
- func (pgp *PGProvider) Mv(name, newname string) error
- func (pgp *PGProvider) Name() string
- func (pgp *PGProvider) Rm(name string) error
- func (pgp *PGProvider) Stat(name string) (*dp.File, error)
- func (pgp *PGProvider) Touch(name string) error
- func (pgp *PGProvider) Truncate(fid string) error
- func (pgp *PGProvider) Update(id, parent string, file *dp.File) (*dp.File, error)
Constants ¶
View Source
const Driver = "postgres"
Driver - fot now we only support postgres
View Source
const RootDirId = "11111111-1111-1111-1111-111111111111"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PGProvider ¶
type PGProvider struct {
// contains filtered or unexported fields
}
func (*PGProvider) Close ¶
func (pgp *PGProvider) Close() error
func (*PGProvider) CreateNodes ¶
func (pgp *PGProvider) CreateNodes(fid string, nodes []ddrv.Node) error
func (*PGProvider) Delete ¶
func (pgp *PGProvider) Delete(id, parent string) error
func (*PGProvider) Mkdir ¶
func (pgp *PGProvider) Mkdir(name string) error
func (*PGProvider) Mv ¶
func (pgp *PGProvider) Mv(name, newname string) error
func (*PGProvider) Name ¶
func (pgp *PGProvider) Name() string
func (*PGProvider) Rm ¶
func (pgp *PGProvider) Rm(name string) error
func (*PGProvider) Touch ¶
func (pgp *PGProvider) Touch(name string) error
func (*PGProvider) Truncate ¶
func (pgp *PGProvider) Truncate(fid string) error
Click to show internal directories.
Click to hide internal directories.