internal

package
v0.0.0-...-5db4e5a Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProtoHasher

type ProtoHasher interface {
	HashProto(pb proto.Message) ([]byte, error)
}

ProtoHasher is an interface for hashers that are capable of returning an ObjectHash for protobufs.

type ProtoHashers

type ProtoHashers struct {
	// The default ProtoHasher returned by NewHasher()
	DefaultHasher ProtoHasher

	// A ProtoHasher that uses field names as keys, returned by
	// NewHasher(FieldNamesAsKeys())
	FieldNamesAsKeysHasher ProtoHasher

	// A ProtoHasher that uses strings for enum values, returned by
	// NewHasher(EnumsAsStrings())
	EnumsAsStringsHasher ProtoHasher

	// A ProtoHasher that uses strings for field names and enum values, returned
	// by NewHasher(FieldNamesAsKeys(), EnumsAsStrings())
	StringPreferringHasher ProtoHasher

	// A ProtoHasher that uses a custom identifier for proto messages, returned
	// by NewHasher(MessageIdentifier(`m`))
	CustomMessageIdentifierHasher ProtoHasher
}

ProtoHashers is a struct containing a set of ProtoHashers with different configuration options.

Jump to

Keyboard shortcuts

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