gosum

package module
v0.0.0-...-4643753 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2013 License: BSD-3-Clause Imports: 7 Imported by: 0

README

gosum

Create and verify md5sum and sha-2 sum files

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MD5Sum

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

func (*MD5Sum) Add

func (m *MD5Sum) Add(name string, src io.Reader) error

func (*MD5Sum) Check

func (m *MD5Sum) Check(name string, src io.Reader) (bool, error)

func (*MD5Sum) Entries

func (m *MD5Sum) Entries() map[string]string

func (*MD5Sum) Read

func (m *MD5Sum) Read(p []byte) (n int, err error)

func (*MD5Sum) ReadFrom

func (m *MD5Sum) ReadFrom(src io.Reader) (n int64, err error)

func (*MD5Sum) Write

func (m *MD5Sum) Write(p []byte) (n int, err error)

func (*MD5Sum) WriteTo

func (m *MD5Sum) WriteTo(w io.Writer) (n int64, err error)

type SumFile

type SumFile interface {
	// Returns a map of the entries
	Entries() map[string]string
	// Add the digest of src file as a new entry in the sum file
	Add(name string, src io.Reader) error
	// Checks if the file specified by name has the correct
	// sum against the sum computed from the Reader
	Check(name string, src io.Reader) (bool, error)
	// Writes a new entry from rfc 1321 formatted input
	Write(p []byte) (n int, err error)
	// Writes the file digests in the rfc 1321 format to the target writer
	WriteTo(w io.Writer) (n int64, err error)
	// Read entries in the rfc 1321 format
	Read(p []byte) (n int, err error)
	// Read the entries from a src reader
	ReadFrom(src io.Reader) (n int64, err error)
}

func NewMD5Sum

func NewMD5Sum() SumFile

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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