file

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2025 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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