account

package
v0.0.0-...-4215b1c Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollectionName = "account"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID         primitive.ObjectID `bson:"_id" json:"id"`
	TxId       string             `bson:"tx_id" json:"txId"`
	Increment  int64              `bson:"increment" json:"increment"`
	MarginId   string             `bson:"margin_id" json:"marginId"`
	CreateTime time.Time          `bson:"create_time" json:"createTime"`
}

type IMongoMapper

type IMongoMapper interface {
	Insert(ctx context.Context, a *Account) error
	FindOneByTxId(ctx context.Context, txId string) (*Account, error)
}

type MongoMapper

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

func NewMongoMapper

func NewMongoMapper(config *config.Config) *MongoMapper

func (*MongoMapper) FindOneByTxId

func (m *MongoMapper) FindOneByTxId(ctx context.Context, txId string) (*Account, error)

func (*MongoMapper) Insert

func (m *MongoMapper) Insert(ctx context.Context, a *Account) error

Jump to

Keyboard shortcuts

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