txn

package
v0.0.0-...-53c0529 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// group
	CreateGroup = "create_group"
	JoinGroup   = "join_group"
	LeaveGroup  = "leave_group"

	// message
	SendMessage = "send_message"
	ReadMessage = "read_message"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateGroupType

type CreateGroupType struct {
	User  model.UserID  `json:"user"`
	Group model.GroupID `json:"group"`
}

type TxnHandler

type TxnHandler struct {
	CreateGroupHandler createGroupHandler
	JoinGroupHandler   joinGroupHandler
	LeaveGroupHandler  leaveGroupHandler
	SendMessageHandler sendMessageHandler
	ReadMessageHandler readMessageHandler
}

func CreateNewTxnHandler

func CreateNewTxnHandler(timestamp *model.Timestamp) *TxnHandler

func (TxnHandler) GetTxnHandler

func (txn TxnHandler) GetTxnHandler(t string) TxnHandlerInterface

func (*TxnHandler) Init

func (txn *TxnHandler) Init(timestamp *model.Timestamp) *TxnHandler

type TxnHandlerInterface

type TxnHandlerInterface interface {
	Check(db.DB, interface{}) types.ResponseCheckTx
	Deliver(db.DB, interface{}) types.ResponseDeliverTx
}

Jump to

Keyboard shortcuts

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