receiver

package
v0.0.0-...-0eb5a07 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Product  ReferenceType = "product"
	Category               = "category"
	Stock                  = "stock"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Ack

type Ack func()

type Change

type Change struct {
	NotificationType string `json:"notificationType"`
	ProjectKey       string `json:"projectKey"`
	Resource         struct {
		ID     string        `json:"id"`
		TypeID ReferenceType `json:"typeId"`
	} `json:"resource"`
	ResourceUserProvidedIdentifiers struct {
		Key            *string `json:"key,omitempty"`
		ExternalId     *string `json:"externalId,omitempty"`
		OrderNumber    *string `json:"orderNumber,omitempty"`
		CustomerNumber *string `json:"customerNumber,omitempty"`
		Sku            *string `json:"sku,omitempty"`
	} `json:"resourceUserProvidedIdentifiers,omitempty"`
	Version    int       `json:"version"`
	ModifiedAt time.Time `json:"modifiedAt"`
}

type GcpReceiver

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

func (*GcpReceiver) ReceiveProductChanges

func (g *GcpReceiver) ReceiveProductChanges(ctx context.Context, payloads chan<- *Payload) error

type Nack

type Nack func()

type Payload

type Payload struct {
	Change Change
	Ack    Ack
	Nack   Nack
}

type ProductChangeReceiver

type ProductChangeReceiver interface {
	ReceiveProductChanges(ctx context.Context, payload chan<- *Payload) error
}

type ReferenceType

type ReferenceType string

Jump to

Keyboard shortcuts

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