uniqueid

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UniqueIDRegistry

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

func NewRegistry

func NewRegistry() *UniqueIDRegistry

NewRegistry creates a new instance of your registry with the embedded Handler.

func (*UniqueIDRegistry) LinkHandler

func (ur *UniqueIDRegistry) LinkHandler(fh sprout.Handler) error

LinkHandler links the handler to the registry at runtime.

func (*UniqueIDRegistry) RegisterFunctions

func (ur *UniqueIDRegistry) RegisterFunctions(funcsMap sprout.FunctionMap) error

RegisterFunctions registers all functions of the registry.

func (*UniqueIDRegistry) Uid

func (ur *UniqueIDRegistry) Uid() string

Uid returns the unique identifier of the registry.

func (*UniqueIDRegistry) Uuidv4

func (ur *UniqueIDRegistry) Uuidv4() string

Uuidv4 generates a new random UUID (Universally Unique Identifier) version 4. This function does not take parameters and returns a string representation of a UUID.

Returns:

string - a new UUID string.

Example:

{{ uuidv4 }} // Output: "3f0c463e-53f5-4f05-a2ec-3c083aa8f937"

Jump to

Keyboard shortcuts

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