events

package
v0.0.0-...-bdcfdd8 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: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PhoneNumberCreateV1            = "V1_PHONE_NUMBER_CREATE"
	PhoneNumberUpdateV1            = "V1_PHONE_NUMBER_UPDATE"
	PhoneNumberValidationFailedV1  = "V1_PHONE_NUMBER_VALIDATION_FAILED"
	PhoneNumberValidationSkippedV1 = "V1_PHONE_NUMBER_VALIDATION_SKIPPED"
	PhoneNumberValidatedV1         = "V1_PHONE_NUMBER_VALIDATED"
	PhoneNumberValidateV1          = "V1_PHONE_NUMBER_VALIDATE"
)

Variables

This section is empty.

Functions

func NewPhoneNumberCreateEvent

func NewPhoneNumberCreateEvent(aggregate eventstore.Aggregate, tenant, rawPhoneNumber string, source common.Source, createdAt, updatedAt time.Time) (eventstore.Event, error)

func NewPhoneNumberFailedValidationEvent

func NewPhoneNumberFailedValidationEvent(aggregate eventstore.Aggregate, tenant, rawPhoneNumber, countryCodeA2, validationError string) (eventstore.Event, error)

func NewPhoneNumberSkippedValidationEvent

func NewPhoneNumberSkippedValidationEvent(aggregate eventstore.Aggregate, tenant, rawPhoneNumber, countryCodeA2, validationSkipReason string) (eventstore.Event, error)

func NewPhoneNumberUpdateEvent

func NewPhoneNumberUpdateEvent(aggregate eventstore.Aggregate, tenant, source, rawPhoneNumber string, updatedAt time.Time) (eventstore.Event, error)

func NewPhoneNumberValidateEvent

func NewPhoneNumberValidateEvent(aggr eventstore.Aggregate) (eventstore.Event, error)

func NewPhoneNumberValidatedEvent

func NewPhoneNumberValidatedEvent(aggregate eventstore.Aggregate, tenant, rawPhoneNumber, e164, countryCodeA2 string) (eventstore.Event, error)

Types

type PhoneNumberCreateEvent

type PhoneNumberCreateEvent struct {
	Tenant         string        `json:"tenant" validate:"required"`
	RawPhoneNumber string        `json:"rawPhoneNumber"`
	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"`
}

type PhoneNumberFailedValidationEvent

type PhoneNumberFailedValidationEvent struct {
	Tenant          string    `json:"tenant" validate:"required"`
	ValidationError string    `json:"validationError" validate:"required"`
	RawPhoneNumber  string    `json:"rawPhoneNumber" validate:"required"`
	CountryCodeA2   string    `json:"countryCodeA2UsedForValidation"`
	ValidatedAt     time.Time `json:"validatedAt" validate:"required"`
}

type PhoneNumberSkippedValidationEvent

type PhoneNumberSkippedValidationEvent struct {
	Tenant         string `json:"tenant" validate:"required"`
	RawPhoneNumber string `json:"rawPhoneNumber" validate:"required"`
	CountryCodeA2  string `json:"countryCodeA2UsedForValidation"`
	Reason         string `json:"validationSkipReason" validate:"required"`
}

type PhoneNumberUpdatedEvent

type PhoneNumberUpdatedEvent struct {
	Tenant         string    `json:"tenant" validate:"required"`
	Source         string    `json:"source"`
	UpdatedAt      time.Time `json:"updatedAt"`
	RawPhoneNumber string    `json:"rawPhoneNumber"`
}

type PhoneNumberValidateEvent

type PhoneNumberValidateEvent struct {
	Tenant string `json:"tenant" validate:"required"`
}

type PhoneNumberValidatedEvent

type PhoneNumberValidatedEvent struct {
	Tenant         string    `json:"tenant" validate:"required"`
	RawPhoneNumber string    `json:"rawPhoneNumber" validate:"required"`
	E164           string    `json:"e164" validate:"required,e164"`
	CountryCodeA2  string    `json:"countryCodeA2"`
	ValidatedAt    time.Time `json:"validatedAt" validate:"required"`
}

Jump to

Keyboard shortcuts

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