identifiers

package
v0.0.0-...-8aeb8a1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UniqueID

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

UniqueID is a struct for extracting unique ID from objects

func NewUniqueID

func NewUniqueID(uniqueIDField string) *UniqueID

NewUniqueID returns new UniqueID instance

func (*UniqueID) Extract

func (uid *UniqueID) Extract(obj map[string]interface{}) string

Extract returns extracted global unique ID from input object

func (*UniqueID) ExtractAndRemove

func (uid *UniqueID) ExtractAndRemove(obj map[string]interface{}) string

ExtractAndRemove returns extracted global unique ID from input object and remove it from the objects

func (*UniqueID) GetFieldName

func (uid *UniqueID) GetFieldName() string

GetFieldName returns field name as is

func (*UniqueID) GetFlatFieldName

func (uid *UniqueID) GetFlatFieldName() string

GetFlatFieldName returns field name (/key1/key2 -> key1_key2)

func (*UniqueID) Set

func (uid *UniqueID) Set(obj map[string]interface{}, id string) error

Set puts ID into the object

Jump to

Keyboard shortcuts

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