Documentation ¶
Index ¶
Constants ¶
const Kind = "orderstatus"
Kind identifies this message kind
Variables ¶
This section is empty.
Functions ¶
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.
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.