Documentation
¶
Index ¶
- func Compress(root string) (string, error)
- func CompressTo(root string, output string) error
- func Decrypt(cipher Cipher, reader io.Reader, writer io.Writer) error
- func DecryptBytes(cipher Cipher, data []byte) ([]byte, error)
- func DecryptFile(cipher Cipher, file string, output string) error
- func Encrypt(cipher Cipher, reader io.Reader, writer io.Writer) error
- func EncryptBytes(cipher Cipher, data []byte) ([]byte, error)
- func EncryptFile(cipher Cipher, file string, output string) error
- func Pack(root string, cipher Cipher) (string, error)
- func PackTo(root string, output string, cipher Cipher) error
- func Uncompress(reader io.Reader) (string, error)
- func UncompressFile(file string) (string, error)
- func UncompressFileTo(file string, output string) error
- func UncompressTo(reader io.Reader, output string) error
- func Unpack(file string, cipher Cipher) (string, error)
- func UnpackTo(file string, output string, cipher Cipher) error
- type Cipher
- type Dir
- type File
- type Yaz
- func (yaz *Yaz) Exists(name string) (bool, error)
- func (yaz *Yaz) FS(root string) http.FileSystem
- func (yaz *Yaz) Glob(pattern string) (matches []string, err error)
- func (yaz *Yaz) Info(name string) (os.FileInfo, error)
- func (yaz *Yaz) Read(name string) ([]byte, error)
- func (yaz *Yaz) Remove(name string) error
- func (yaz *Yaz) Root() string
- func (yaz *Yaz) Walk(root string, handler func(root, filename string, isdir bool) error, ...) error
- func (yaz *Yaz) Watch(handler func(event string, name string), interrupt chan uint8) error
- func (yaz *Yaz) Write(name string, content []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressTo ¶
CompressTo builds a package and saves it to a file
func DecryptBytes ¶
DecryptBytes decrypts a byte slice
func DecryptFile ¶
DecryptFile decrypts a file
func EncryptBytes ¶
EncryptBytes encrypts a byte slice
func EncryptFile ¶
EncryptFile encrypts a file
func UncompressFileTo ¶
UncompressFileTo uncompress a package to a specified directory.
func UncompressTo ¶
UncompressTo uncompress a package to a specified directory.
Types ¶
type Cipher ¶
type Cipher interface {
Encrypt(reader io.Reader, writer io.Writer) error
Decrypt(reader io.Reader, writer io.Writer) error
}
Cipher is a type that represents a cipher.
type File ¶
File is the file
type Yaz ¶
type Yaz struct {
// contains filtered or unexported fields
}
Yaz is a type that represents a package.
func (*Yaz) FS ¶
func (yaz *Yaz) FS(root string) http.FileSystem
FS returns a http.FileSystem that serves files from the public directory
func (*Yaz) Walk ¶
func (yaz *Yaz) Walk(root string, handler func(root, filename string, isdir bool) error, patterns ...string) error
Walk walks the package file.
Click to show internal directories.
Click to hide internal directories.