guid

package
v1.54.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 13 Imported by: 23 modules, 45 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	RoomPrefix                         = "RM_"
	NodePrefix                         = "ND_"
	ParticipantPrefix                  = "PA_"
	TrackPrefix                        = "TR_"
	DataTrackPrefix                    = "DTR_"
	APIKeyPrefix                       = "API"
	EgressPrefix                       = "EG_"
	IngressPrefix                      = "IN_"
	SIPTrunkPrefix                     = "ST_"
	SIPDispatchRulePrefix              = "SDR_"
	SIPCallPrefix                      = "SCL_"
	SIPTransferPrefix                  = "STR_"
	RPCPrefix                          = "RPC_"
	WHIPResourcePrefix                 = "WH_"
	RTMPResourcePrefix                 = "RT_"
	URLResourcePrefix                  = "UR_"
	SIPHostnamePrefix                  = "SH"
	AgentPrefix                        = "A_"
	AgentWorkerPrefix                  = "AW_"
	AgentJobPrefix                     = "AJ_"
	AgentDispatchPrefix                = "AD_"
	AgentBuilderPrefix                 = "AB_"
	AgentBuilderVersionPrefix          = "ABV_"
	CloudAgentPrefix                   = "CA_"
	CloudAgentRegionPrefix             = "CAR_"
	CloudAgentVersionPrefix            = "CAV_"
	CloudAgentSecretPrefix             = "CAS_"
	CloudAgentWorkerPrefix             = "CAW_"
	CloudAgentPrivateLinkPrefix        = "CAPL_"
	CloudAgentPrivateLinkClusterPrefix = "CAPLC_"
	CloudAgentPrivateLinkGatewayPrefix = "CAPLG_"
	CloudAgentPrivateLinkSecretPrefix  = "CAPLS_"
	AgentGatewayPrefix                 = "GW_"
	CarrierPrefix                      = "CR_"
	PhoneNumberPrefix                  = "PN_"
	ScenarioPrefix                     = "SCN_"
	ScenarioGroupPrefix                = "SCNG_"
	AgentThreadPrefix                  = "AT_"
	AgentStreamPrefix                  = "AST_" // ST_ is SIPTrunkPrefix
)
View Source
const (
	IDAlphabet       = shortuuid.DefaultAlphabet
	HashedIDAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
)
View Source
const Size = 12

Variables

This section is empty.

Functions

func Hash added in v1.40.0

func Hash(prefix string, data []byte) string

func HashedID

func HashedID(id string) string

HashedID creates a hashed ID from a unique string

func IsValidID added in v1.42.0

func IsValidID[T ~string](id T) bool

func IsValidWithPrefix added in v1.54.0

func IsValidWithPrefix(prefix, id string) bool

IsValidWithPrefix reports whether id is prefix followed by exactly Size characters of IDAlphabet, the form New(prefix) produces.

func LocalNodeID

func LocalNodeID() (string, error)

func Marshal

func Marshal[T livekit.Guid](id T) livekit.GuidBlock

Marshal returns a block that Unmarshal decodes to the zero ID if id does not end in Size characters of IDAlphabet.

func MarshalAppend added in v1.24.0

func MarshalAppend[T livekit.Guid](b []byte, id T) []byte

func New

func New(prefix string) string

func Unmarshal

func Unmarshal[T livekit.Guid](b livekit.GuidBlock) T

Unmarshal returns the zero ID if b is not a valid encoding.

Types

This section is empty.

Jump to

Keyboard shortcuts

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