uniqueness

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service is a uniqueness service. The service computes a unique id for a given object by hashing the object's json representation together with a random salt. The random salt is used to avoid dictionary attacks. The random salt is stored in the KVS and is generated on the first call to the service.

func GetService

func GetService(sp view.ServiceProvider) *Service

GetService returns the uniqueness service.

func (*Service) ComputeID

func (s *Service) ComputeID(state interface{}) (string, error)

ComputeID computes the unique ID of the given object.

Jump to

Keyboard shortcuts

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