requester

package
v0.0.0-...-e8b74a0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	ReadFile(path string) ([]byte, error)
	ReadDir(path string) ([]os.FileInfo, error)
}

Backend describes the interface for making a request to some file system

type Decrypter

type Decrypter interface {
	DecryptName(cName string, iv []byte) (string, error)
}

Decrypt describes the interface for making a request to decrypt the given ciphertext name with the given initialization vector

type Requester

type Requester struct {
	// contains filtered or unexported fields
}

func New

func New(numWorkers int, backend Backend, decrypter Decrypter) *Requester

func (*Requester) ClearCache

func (r *Requester) ClearCache()

func (*Requester) DecryptName

func (r *Requester) DecryptName(cName string, iv []byte) (string, error)

DecryptName decrypts the given ciphertext name with the provided initialization vector

func (*Requester) ReadDir

func (r *Requester) ReadDir(path string) ([]os.FileInfo, error)

ReadDir reads the directory from backend at the given path

func (*Requester) ReadFile

func (r *Requester) ReadFile(path string) ([]byte, error)

ReadFile reads the file from backend at the given path

func (*Requester) Start

func (r *Requester) Start()

func (*Requester) Stop

func (r *Requester) Stop()

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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