cryptapi

package
v0.0.0-...-0b74930 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const Version = 1

Variables

This section is empty.

Functions

func BufferInFile

func BufferInFile(r io.Reader) (rc io.ReadSeekCloser, e error)

func SplitPath

func SplitPath(path string) (device, infix, hash string, e error)

Types

type Clerk

type Clerk struct {
	RemoteClerk demonapi.Clerk
	Config      ClerkConfig
}

func NewClerk

func NewClerk(config ClerkConfig) *Clerk

func (*Clerk) DeviceName

func (c *Clerk) DeviceName() (string, error)

func (*Clerk) GetDecryptObject

func (c *Clerk) GetDecryptObject(path string) (b []byte, err error)

func (*Clerk) GetDecryptObjectStream

func (c *Clerk) GetDecryptObjectStream(path string) (rc io.ReadCloser, err error)

func (*Clerk) ListObjects

func (c *Clerk) ListObjects() ([]string, error)

func (*Clerk) PutEncryptObject

func (c *Clerk) PutEncryptObject(pathInfix string, data []byte) (string, error)

func (*Clerk) PutEncryptObjectStream

func (c *Clerk) PutEncryptObjectStream(pathInfix string, data io.Reader) (createdFilename string, err error)

type ClerkConfig

type ClerkConfig struct {
	SecretKey   string               `json:"secret-key"`
	SpaceConfig demonapi.ClerkConfig `json:"space"`
}

type CombinedReadCloser

type CombinedReadCloser struct {
	io.Reader
	io.Closer
}

type StreamHeader

type StreamHeader struct {
	Version int    `json:"version"`
	Device  string `json:"device"`
	Infix   string `json:"infix"`
}

Jump to

Keyboard shortcuts

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