Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*hasher)
Option modifies how hashes for protobufs is calculated.
func FieldNamesAsKeys ¶
func FieldNamesAsKeys() Option
FieldNamesAsKeys is an option that uses field names for key hashing rather than the field number.
func MessageFullnameIdentifier ¶
func MessageFullnameIdentifier() Option
MessageFullnameIdentifier is an option that uses the message descriptor fullname rather than a generic map identifier when hashing messages.
type ProtoHasher ¶
type ProtoHasher interface { // HashProto returns the object hash of a given protocol buffer message. HashProto(msg protoreflect.Message) ([]byte, error) }
ProtoHasher is an interface for hashers that are capable of returning an ObjectHash for protobufs.
func NewHasher ¶
func NewHasher(options ...Option) ProtoHasher
NewHasher creates a new ProtoHasher with the options specified in the argument.
Click to show internal directories.
Click to hide internal directories.