idgen

package
v0.0.0-...-f9f6af2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageSetting         = "generators.message_identifier"
	ResponseMessageSetting = "generators.response_message_identifier"
	DataFrameSetting       = "generators.data_frame_identifier"
	ReferenceSetting       = "generators.reference_identifier"
	StopAreaSetting        = "generators.reference_stop_area_identifier"
	VehicleJourneySetting  = "generators.reference_vehicle_journey_identifier"
	SubscriptionSetting    = "generators.subscription_identifier"

	Message         = "Message"
	ResponseMessage = "ResponseMessage"
	DataFrame       = "DataFrame"
	Reference       = "Reference"
	StopArea        = "StopArea"
	VehicleJourney  = "VehicleJourney"
	Subscription    = "Subscription"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IdentifierAttributes

type IdentifierAttributes struct {
	Type string
	Id   string
}

type IdentifierGenerator

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

func NewIdentifierGenerator

func NewIdentifierGenerator(settings map[string]string, uuidGenerator uuid.UUIDGenerator) IdentifierGenerator

func (*IdentifierGenerator) FormatString

func (idg *IdentifierGenerator) FormatString(kind string) string

Test method

func (*IdentifierGenerator) NewIdentifier

func (idg *IdentifierGenerator) NewIdentifier(attributes IdentifierAttributes, kind ...string) string

We use attributes.Type to find the appropriate generator We can use the kind optionnal argument if Type isn't clear enough like for DatedVehicleJourney

func (*IdentifierGenerator) NewMessageIdentifier

func (idg *IdentifierGenerator) NewMessageIdentifier() string

To avoid the replacer

func (*IdentifierGenerator) NewResponseMessageIdentifier

func (idg *IdentifierGenerator) NewResponseMessageIdentifier() string

Jump to

Keyboard shortcuts

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