etag

package module
v0.0.0-...-05c201a Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2017 License: BSD-3-Clause Imports: 2 Imported by: 0

README

go-etag

GoDoc Build Status Go Report Card

Wraps a hash.Hash to add methods to derive strong and weak ETags.

Documentation

Overview

Package etag provides methods to get strong and weak Etags from a hash.Hash.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash struct {
	hash.Hash

	Length int
}

Hash wraps a hash.Hash and provides methods to get strong and weak Etags from the underlying hash.Hash.

func New

func New(h hash.Hash) *Hash

New wraps a hash.Hash and provides methods to get strong and weak Etags from the underlying hash.Hash.

func (*Hash) Etag

func (h *Hash) Etag() string

Etag returns a strong ETag constructed by hex encoding the return of Sum.

func (*Hash) WeakEtag

func (h *Hash) WeakEtag() string

WeakEtag returns a weak ETag constructed by hex encoding the return of Sum.

Jump to

Keyboard shortcuts

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