identity

package
v3.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLifecycleIdentity = AllLifecycleIdentity

Variables

This section is empty.

Functions

This section is empty.

Types

type IdentityResolver

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

func NewResolver

func NewResolver(required LifecycleIdentity) *IdentityResolver

func (*IdentityResolver) CellEnabled

func (ir *IdentityResolver) CellEnabled() bool

CellEnabled returns true if the resolver is configured to generate cell identities.

func (*IdentityResolver) DocumentEnabled

func (ir *IdentityResolver) DocumentEnabled() bool

DocumentEnabled returns true if the resolver is configured to generate document identities.

func (*IdentityResolver) EphemeralDocumentID added in v3.2.6

func (ir *IdentityResolver) EphemeralDocumentID() string

EphemeralDocumentID returns a new document ID which is not persisted.

func (*IdentityResolver) GetCellID

func (ir *IdentityResolver) GetCellID(obj any, attributes map[string]string) (string, bool)

GetCellID returns a cell ID and a boolean indicating if it's new or from attributes.

type LifecycleIdentities

type LifecycleIdentities []LifecycleIdentity

func (LifecycleIdentities) Contains

func (ids LifecycleIdentities) Contains(id LifecycleIdentity) bool

Contains returns true if the required identity is contained in the provided identities.

type LifecycleIdentity

type LifecycleIdentity int
const (
	UnspecifiedLifecycleIdentity LifecycleIdentity = iota
	AllLifecycleIdentity
	DocumentLifecycleIdentity
	CellLifecycleIdentity
)

LifecycleIdentities are used to determine which object identities should be generated. The default is to generate all identities.

The following identities are supported: - UnspecifiedLifecycleIdentity: No identity is generated. - AllLifecycleIdentity: All identities are generated. - DocumentLifecycleIdentity: Document identities are generated. - CellLifecycleIdentity: Cell identities are generated.

Jump to

Keyboard shortcuts

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