file

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(db *bolt.DB, file *pb.File) error

Create a new file with its content compressed.

func Get

func Get(db *bolt.DB, name string) (*pb.File, error)

Get retrieves the file with the specified name.

func GetCheap

func GetCheap(db *bolt.DB, name string) (*pb.FileCheap, error)

GetCheap is like Get but without getting the file content.

func List

func List(db *bolt.DB) ([]*pb.File, error)

List returns a slice with all the files stored in the file bucket.

func ListNames

func ListNames(db *bolt.DB) ([]string, error)

ListNames returns a slice with all the files names.

func Remove

func Remove(db *bolt.DB, names ...string) error

Remove removes one or more files from the database.

func Rename added in v0.5.0

func Rename(db *bolt.DB, oldName, newName string) error

Rename recreates a file with a new key and deletes the old one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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