checksum

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 7 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 struct {
	Type   string
	Bytes  string
	Hasher func() hash.Hash
}

func GuessChecksum

func GuessChecksum(cs string) (Checksum, error)

type InMemoryManager

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

func NewInMemoryManager

func NewInMemoryManager() *InMemoryManager

func (*InMemoryManager) GetChecksum

func (m *InMemoryManager) GetChecksum(ctx context.Context, resource string) (Checksum, bool, error)

func (*InMemoryManager) SetChecksum

func (m *InMemoryManager) SetChecksum(resource string, checksum Checksum)

type Manager

type Manager interface {
	GetChecksum(ctx context.Context, resource string) (Checksum, bool, error)
}

type ManagerSetter added in v0.2.0

type ManagerSetter interface {
	SetChecksum(string, Checksum)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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