checksum

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checksum

type Checksum interface {
	encoding.TextMarshaler
	fmt.Stringer

	Algorithm() algorithm.Algorithm
	Data() []byte
}

type ImmutableChecksum

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

func CreateFromString

func CreateFromString(raw string) (ImmutableChecksum, error)

func NewExisting

func NewExisting(a algorithm.Algorithm, d []byte) ImmutableChecksum

func (*ImmutableChecksum) Algorithm

func (c *ImmutableChecksum) Algorithm() algorithm.Algorithm

func (*ImmutableChecksum) Data

func (c *ImmutableChecksum) Data() []byte

func (ImmutableChecksum) MarshalText

func (c ImmutableChecksum) MarshalText() ([]byte, error)

func (ImmutableChecksum) String

func (c ImmutableChecksum) String() string

func (*ImmutableChecksum) UnmarshalJSON

func (c *ImmutableChecksum) UnmarshalJSON(data []byte) error

type ImmutableChecksums

type ImmutableChecksums []ImmutableChecksum

func (ImmutableChecksums) Contains

func (c ImmutableChecksums) Contains(expected Checksum) bool

func (ImmutableChecksums) Preferred

func (c ImmutableChecksums) Preferred() ImmutableChecksum

func (ImmutableChecksums) Prioritized

func (c ImmutableChecksums) Prioritized() ImmutableChecksums

type WritableChecksum

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

func (*WritableChecksum) Algorithm

func (c *WritableChecksum) Algorithm() algorithm.Algorithm

func (*WritableChecksum) Data

func (c *WritableChecksum) Data() []byte

func (*WritableChecksum) ImmutableChecksum

func (c *WritableChecksum) ImmutableChecksum() ImmutableChecksum

func (WritableChecksum) MarshalText

func (c WritableChecksum) MarshalText() ([]byte, error)

func (WritableChecksum) String

func (c WritableChecksum) String() string

func (*WritableChecksum) Write

func (c *WritableChecksum) Write(p []byte) (int, error)

type WritableChecksums

type WritableChecksums []*WritableChecksum

func (WritableChecksums) ImmutableChecksums

func (cs WritableChecksums) ImmutableChecksums() ImmutableChecksums

func (WritableChecksums) Write

func (cs WritableChecksums) Write(p []byte) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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