dto

package
v0.0.0-...-553ec8c Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FailedTransaction

type FailedTransaction struct {
	TransactionID string `json:"transaction_id"`
	Reason        string `json:"reason"`
}

FailedTransaction represents a failed transaction with a transaction ID and a reason for failure.

func (*FailedTransaction) Encode

func (t *FailedTransaction) Encode() ([]byte, error)

Encode converts the FailedTransaction struct to JSON bytes.

type Process

type Process struct {
	From    string `json:"from"`
	ToTopic string `json:"to_topic"`
	Payload any    `json:"payload"`
}

func (*Process) Encode

func (t *Process) Encode() ([]byte, error)

Encode serializes a ProcessedTransaction into a JSON-encoded byte slice.

type SucceededTransaction

type SucceededTransaction struct {
	TransactionID string `json:"transaction_id"`
}

SucceededTransaction represents a successful transaction with a transaction ID.

func (*SucceededTransaction) Encode

func (t *SucceededTransaction) Encode() ([]byte, error)

Encode converts the SucceededTransaction struct to JSON bytes.

Jump to

Keyboard shortcuts

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