witness

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeURLFromModulePath

func DecodeURLFromModulePath(modulePath string) (string, error)

DecodeURLFromModulePath is the inverse of EncodeURLToModulePath.

func EncodeURLToModulePath

func EncodeURLToModulePath(u string) (string, error)

EncodeURLToModule encodes an arbitrary URL into a form that is compatible with Go module/import paths.

func ParseFromZip

func ParseFromZip(zipFileName string) (*witness, error)

ParseFromZip parses an witness from a zip file. The Zip file should contain a Go module, archived as defined by the goproxy protocol.

func WriteGoMod

func WriteGoMod(w io.Writer, modulePath string) error

WriteGoMod writes a go.mod file for an witness.

func WriteZip

func WriteZip(w io.Writer, modulePath, version string, hashes map[string]string) error

WriteZip generates a Go module body containing an witness declaring hashes for one or more URLs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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