pkg

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultContentLengthBytes = 8
	DefaultRandomSeed         = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Object    Object
	Expected  []byte
	Algorithm string
}

The Check struct represents a fixity check operation

func (Check) VerifyDigest

func (c Check) VerifyDigest() ([]byte, error)

VerifyDigest gets the digest, returning an error if the object cannot be retrieved or, when an expected digest is provided, if the calculated digest does not match.

type Crvd

type Crvd struct {
	Object        Object
	ContentLength int64
	RandomSeed    int64
	BodyProvider  func() io.Reader
}

func NewCrvd

func NewCrvd(target Target, key string, contentLength int64, randomSeed int64) *Crvd

func NewDefaultCrvd

func NewDefaultCrvd(target Target, key string) *Crvd

func (*Crvd) CreateRetrieveVerify

func (c *Crvd) CreateRetrieveVerify() error

func (*Crvd) CreateRetrieveVerifyDelete

func (c *Crvd) CreateRetrieveVerifyDelete() error

func (*Crvd) NewBody

func (c *Crvd) NewBody() io.Reader

type Keys

type Keys struct {
	Endpoint Target
	KeyList  KeyList
}

func NewKeys

func NewKeys(target Target, keyList KeyList) Keys

func (*Keys) Check

func (k *Keys) Check(key string) (err error)

func (*Keys) CheckAll

func (k *Keys) CheckAll(okOut io.Writer, badOut io.Writer, raw bool) ([]KeyResult, error)

Jump to

Keyboard shortcuts

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