events

package
v0.0.0-...-9111ccc Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LocationCreateV1            = "V1_LOCATION_CREATE"
	LocationUpdateV1            = "V1_LOCATION_UPDATE"
	LocationValidationFailedV1  = "V1_LOCATION_VALIDATION_FAILED"
	LocationValidationSkippedV1 = "V1_LOCATION_VALIDATION_SKIPPED"
	LocationValidatedV1         = "V1_LOCATION_VALIDATED"
)

Variables

This section is empty.

Functions

func NewLocationCreateEvent

func NewLocationCreateEvent(aggregate eventstore.Aggregate, name, rawAddress string, source common.Source, createdAt, updatedAt time.Time, locationAddress models.LocationAddress) (eventstore.Event, error)

func NewLocationFailedValidationEvent

func NewLocationFailedValidationEvent(aggregate eventstore.Aggregate, rawAddress, country, validationError string) (eventstore.Event, error)

func NewLocationSkippedValidationEvent

func NewLocationSkippedValidationEvent(aggregate eventstore.Aggregate, rawAddress, validationSkipReason string) (eventstore.Event, error)

func NewLocationUpdateEvent

func NewLocationUpdateEvent(aggregate eventstore.Aggregate, name, rawAddress, source string, updatedAt time.Time, locationAddress models.LocationAddress) (eventstore.Event, error)

func NewLocationValidatedEvent

func NewLocationValidatedEvent(aggregate eventstore.Aggregate, rawAddress, countryForValidation string, locationAddress models.LocationAddress) (eventstore.Event, error)

Types

type LocationCreateEvent

type LocationCreateEvent struct {
	Tenant          string                 `json:"tenant" validate:"required"`
	Source          string                 `json:"source"`        //Deprecated
	SourceOfTruth   string                 `json:"sourceOfTruth"` //Deprecated
	AppSource       string                 `json:"appSource"`     //Deprecated
	SourceFields    common.Source          `json:"sourceFields"`
	CreatedAt       time.Time              `json:"createdAt"`
	UpdatedAt       time.Time              `json:"updatedAt"`
	Name            string                 `json:"name"`
	RawAddress      string                 `json:"rawAddress"`
	LocationAddress models.LocationAddress `json:"address"`
}

type LocationFailedValidationEvent

type LocationFailedValidationEvent struct {
	Tenant          string    `json:"tenant" validate:"required"`
	ValidationError string    `json:"validationError" validate:"required"`
	RawAddress      string    `json:"rawAddress" validate:"required"`
	Country         string    `json:"country" `
	ValidatedAt     time.Time `json:"validatedAt" validate:"required"`
}

type LocationSkippedValidationEvent

type LocationSkippedValidationEvent struct {
	Tenant      string    `json:"tenant" validate:"required"`
	RawAddress  string    `json:"rawAddress"`
	Reason      string    `json:"validationSkipReason" validate:"required"`
	ValidatedAt time.Time `json:"validatedAt" validate:"required"`
}

type LocationUpdateEvent

type LocationUpdateEvent struct {
	Tenant          string                 `json:"tenant"`
	Source          string                 `json:"source"`
	UpdatedAt       time.Time              `json:"updatedAt"`
	Name            string                 `json:"name"`
	RawAddress      string                 `json:"rawAddress"`
	LocationAddress models.LocationAddress `json:"address"`
}

type LocationValidatedEvent

type LocationValidatedEvent struct {
	Tenant               string                 `json:"tenant" validate:"required"`
	RawAddress           string                 `json:"rawAddress" validate:"required"`
	CountryForValidation string                 `json:"countryForValidation" `
	ValidatedAt          time.Time              `json:"validatedAt" validate:"required"`
	LocationAddress      models.LocationAddress `json:"address"`
}

Jump to

Keyboard shortcuts

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