data

package
v1.11.13 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package data are various functions for the shrink package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrApprove  = errors.New("cannot shrink files as there are database records waiting for public approval")
	ErrDel      = errors.New("delete errors")
	ErrArcStore = errors.New("archive store error")
	ErrUnknown  = errors.New("unknown command")
)

Functions

func Compress

func Compress(w io.Writer, files []string, name string) error

Compress the collection of files into a named archive.

func Init

func Init(w io.Writer, directory string) error

Init SQL directory.

func Remove

func Remove(w io.Writer, files []string) error

Remove files from the host file system.

func SaveDir

func SaveDir() (string, error)

SaveDir returns a usable path to store backups.

Types

type Approvals

type Approvals string
const (
	Preview  Approvals = "previews"
	Incoming Approvals = "incoming"
)

func (Approvals) Approve

func (cmd Approvals) Approve(db *sql.DB) error

Approve prints the number of records waiting for approval for public display.

func (Approvals) Store

func (cmd Approvals) Store(w io.Writer, path, partial string, deleteSrc bool) (string, error)

Store incoming or preview files as a tar archive.

type Months

type Months uint

Months of the year.

func Month

func Month(s string) Months

Month returns the Months value of s, which should be a three letter English abbreviation.

Jump to

Keyboard shortcuts

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