orderstatus

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Kind = "orderstatus"

Kind identifies this message kind

Variables

This section is empty.

Functions

func ValidNext added in v0.11.0

func ValidNext() []string

ValidNext returns the valid next message kinds that can follow an orderstatus

Types

type CreateOption

type CreateOption func(*createOptions)

CreateOption defines a type for functions that can modify the createOptions struct.

func CreatedAt

func CreatedAt(t time.Time) CreateOption

CreatedAt can be passed to Create to provide a custom created at time.

func ExternalID

func ExternalID(externalID string) CreateOption

ExternalID can be passed to Create to provide a custom external id.

func ID

func ID(id string) CreateOption

ID can be passed to Create to provide a custom id.

type Data

type Data struct {
	OrderStatus string `json:"orderStatus,omitempty"`
}

Data encapsulates the data content of an order status.

type OrderStatus

type OrderStatus struct {
	Metadata  message.Metadata `json:"metadata,omitempty"`
	Data      Data             `json:"data,omitempty"`
	Signature string           `json:"signature,omitempty"`
}

OrderStatus represents an order status message within the exchange.

func Create

func Create(fromDID did.BearerDID, to, exchangeID, orderStatus string, opts ...CreateOption) (OrderStatus, error)

Create creates a new OrderStatus message.

func Parse

func Parse(data []byte) (OrderStatus, error)

Parse validates and unmarshals the input data into an OrderStatus.

func (OrderStatus) Digest

func (os OrderStatus) Digest() ([]byte, error)

Digest computes a hash of the message

func (OrderStatus) GetKind added in v0.13.0

func (os OrderStatus) GetKind() string

GetKind returns the kind of message

func (OrderStatus) GetMetadata added in v0.13.0

func (os OrderStatus) GetMetadata() message.Metadata

GetMetadata returns the metadata of the message

func (OrderStatus) GetValidNext added in v0.13.0

func (os OrderStatus) GetValidNext() []string

GetValidNext returns the valid next message kinds that can follow an orderstatus

func (*OrderStatus) UnmarshalJSON

func (os *OrderStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON validates and unmarshals the input data into an OrderStatus.

func (*OrderStatus) Verify

func (os *OrderStatus) Verify() error

Verify verifies the signature of the OrderStatus.

Jump to

Keyboard shortcuts

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