bank

package
v0.0.0-...-d26b62e Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Deposit = "Deposit"
View Source
const Rollback = "Rollback"
View Source
const Withdraw = "Withdraw"

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	UserId      string            `json:"userId"`
	CommandType string            `json:"type"`
	Amount      *dtos.CurrencyDto `json:"amount"`
	Time        time.Time         `json:"time"`
	Game        string            `json:"game"`
	Lobby       string            `json:"lobby"`
	Reason      string            `json:"reason"`
}

Command is a default Bank Command used to communicate with the bank

func NewCommand

func NewCommand(commandType, userId string, amount *money.Money, game, lobby string) *Command

NewCommand creates a new bank command

type RabbitBankConnection

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

func NewRabbitBankConnection

func NewRabbitBankConnection(url string) (*RabbitBankConnection, error)

func (*RabbitBankConnection) PublishCommand

func (r *RabbitBankConnection) PublishCommand(command *Command) error

Jump to

Keyboard shortcuts

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