hash

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: BSD-3-Clause Imports: 6 Imported by: 3

README

go-whosonfirst-hash

Go package for working with hashes in Who's On First documents

Install

You will need to have both Go (specifically version 1.12 or higher because we're using Go modules) and the make programs installed on your computer. Assuming you do just type:

make tools

All of this package's dependencies are bundled with the code in the vendor directory.

Important

This is almost certainly not a general purpose package. It is shaped like the day-to-day needs of Who's On First in mid-2017...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

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

func NewHash

func NewHash(algo string) (*Hash, error)

func NewWOFHash

func NewWOFHash() (*Hash, error)

func (*Hash) HashBytes

func (h *Hash) HashBytes(body []byte) (string, error)

func (*Hash) HashFile

func (h *Hash) HashFile(path string) (string, error)

func (*Hash) HashFromJSON

func (h *Hash) HashFromJSON(raw []byte) (string, error)

func (*Hash) HashString

func (h *Hash) HashString(body string) (string, error)

Directories

Path Synopsis
cmd
wof-hash-file command

Jump to

Keyboard shortcuts

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