verification

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionOptions

type ActionOptions struct {
	Logger           pretty.Printfer
	LogVerifiedFiles bool

	StartFromScratch bool
}

type Job

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

func NewJob

func NewJob(
	archiveReader VerifiableArchive,
	previousState *State,
	options JobOptions,
) *Job

func (*Job) Execute

func (job *Job) Execute(
	ctx context.Context,
) (*State, error)

type JobOptions

type JobOptions struct {
	Logger           pretty.Printfer
	LogVerifiedFiles bool

	ProgressSaver      func(currentState *State) error
	ProgressSavePeriod time.Duration
}

type State

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

func Execute

func Execute(
	ctx context.Context,
	reader archive.Reader,
	options ActionOptions,
) (*State, error)

func (*State) MarshalJSON

func (s *State) MarshalJSON() ([]byte, error)

func (*State) UnmarshalJSON

func (s *State) UnmarshalJSON(bytes []byte) error

type VerifiableArchive

type VerifiableArchive interface {
	StoredFiles() ([]string, error)
	VerifyFileIntegrity(path string) error

	LoadVerificationState() (*State, error)
	SaveVerificationState(state *State) error
}

Jump to

Keyboard shortcuts

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