Documentation
¶
Index ¶
- Variables
- type Objects
- type QueueMessage
- type SuiDB
- func (s *SuiDB) ClearData() error
- func (s *SuiDB) ClearPackageData() error
- func (s *SuiDB) CreateObject(tableName string, object Objects) (*Objects, error)
- func (s *SuiDB) CreateQueueMessages(list []QueueMessage) bool
- func (s *SuiDB) CreateTransactions(transactions *TransactionList) (*TransactionList, error)
- func (s *SuiDB) DeleteObjects(tableName string, objectIds string)
- func (s *SuiDB) GetDigestUnknownTransaction(size int) []*TransactionList
- func (s *SuiDB) GetLastTransactionDigest() string
- func (s *SuiDB) GetLeaveOverNeedUpdateObjects(tableName string, from time.Time, limit, offerSet int) []*Objects
- func (s *SuiDB) GetNeedUpdateObjects(tableName string, objects []*Objects) (result []*Objects)
- func (s *SuiDB) GetObjectByIds(tableName string, objectIds ...string) ([]*Objects, error)
- func (s *SuiDB) GetQueueMessage(size int) []*QueueMessage
- func (s *SuiDB) GetRelayMsg(objectType, relayObjectId, relayPoster string, errText []string) bool
- func (s *SuiDB) GetTransactions(transactions []TransactionList) (result []*TransactionList)
- func (s *SuiDB) InsertStartTransaction(number int64) error
- func (s *SuiDB) Migrate() error
- func (s *SuiDB) UpdateObjectToNeedUpdate(tableName string, object Objects) (*Objects, error)
- func (s *SuiDB) UpdateObjects(tableName string, object Objects) bool
- func (s *SuiDB) UpdateQueueMessage(message *QueueMessage)
- func (s *SuiDB) UpdateTransaction(transaction TransactionList) bool
- type TransactionList
Constants ¶
This section is empty.
Variables ¶
View Source
var DuplicateKeyErr = errors.New("record is exists")
Functions ¶
This section is empty.
Types ¶
type Objects ¶
type Objects struct { ObjectId string `gorm:"primaryKey;not null;size:42;unique" json:"objectId"` Version int64 `gorm:"type:bigint;not null;" json:"version"` Digest string `gorm:"not null;size:44;" json:"digest"` Owner datatypes.JSON `gorm:"type:jsonb;" json:"owner"` PreviousTransaction string `gorm:"size:44" json:"previousTransaction"` StorageRebate int64 `gorm:"type:bigint" json:"storageRebate"` Status string `gorm:"size:10" json:"status"` DataType string `gorm:"size:255" json:"dataType"` Type string `gorm:"type:text;" json:"type"` HasPublicTransfer bool `gorm:"type:bool;" json:"hasPublicTransfer"` Fields datatypes.JSON `gorm:"type:jsonb;" json:"fields"` CreateTime time.Time `gorm:"type:timestamp;not null;default:now()" json:"createTime"` UpdateTime time.Time `gorm:"type:timestamp;not null;default:now()" json:"updateTime"` IsUpdate bool `gorm:"type:bool;not null;default:false" json:"isUpdate"` }
type QueueMessage ¶
type QueueMessage struct { Id int64 `gorm:"type:bigint;primaryKey;autoIncrement" json:"id"` Message datatypes.JSON `gorm:"type:jsonb;" json:"message"` GroupId string `gorm:"size:100" json:"groupId"` Topic string `gorm:"size:100;not null" json:"topic"` Key string `gorm:"size:255;" json:"key"` Status string `gorm:"size:10;not null" json:"status"` ManualProcess bool `gorm:"type:bool;not null;default:false" json:"manualProcess"` ErrReason string `gorm:"type:text;" json:"errReason"` CreateTime time.Time `gorm:"type:timestamp;not null;default:now()" json:"createTime"` UpdateTime time.Time `gorm:"type:timestamp;not null;default:now()" json:"updateTime"` AutoCustomCount int `gorm:"type:int;not null;default:1" json:"autoCustomCount"` }
func (QueueMessage) TableName ¶
func (q QueueMessage) TableName() string
type SuiDB ¶
func (*SuiDB) ClearPackageData ¶
func (*SuiDB) CreateObject ¶
func (*SuiDB) CreateQueueMessages ¶
func (s *SuiDB) CreateQueueMessages(list []QueueMessage) bool
func (*SuiDB) CreateTransactions ¶
func (s *SuiDB) CreateTransactions(transactions *TransactionList) (*TransactionList, error)
func (*SuiDB) DeleteObjects ¶
func (*SuiDB) GetDigestUnknownTransaction ¶
func (s *SuiDB) GetDigestUnknownTransaction(size int) []*TransactionList
func (*SuiDB) GetLastTransactionDigest ¶
func (*SuiDB) GetLeaveOverNeedUpdateObjects ¶
func (*SuiDB) GetNeedUpdateObjects ¶
func (*SuiDB) GetObjectByIds ¶
func (*SuiDB) GetQueueMessage ¶
func (s *SuiDB) GetQueueMessage(size int) []*QueueMessage
func (*SuiDB) GetRelayMsg ¶
func (*SuiDB) GetTransactions ¶
func (s *SuiDB) GetTransactions(transactions []TransactionList) (result []*TransactionList)
func (*SuiDB) InsertStartTransaction ¶
func (*SuiDB) UpdateObjectToNeedUpdate ¶
func (*SuiDB) UpdateQueueMessage ¶
func (s *SuiDB) UpdateQueueMessage(message *QueueMessage)
func (*SuiDB) UpdateTransaction ¶
func (s *SuiDB) UpdateTransaction(transaction TransactionList) bool
type TransactionList ¶
type TransactionList struct { Number int64 `gorm:"primaryKey;type:bigint;not null;uniqueIndex;autoincrement" json:"number"` TransactionDigest string `gorm:"size:44;not null;uniqueIndex" json:"transactionDigest"` IsAnalyze bool `gorm:"type:bool;not null" json:"isAnalyze"` CreateTime time.Time `gorm:"type:timestamp;not null;default:now()" json:"createTime"` TimestampMs int64 `gorm:"type:bigint" json:"timestampMs"` UpdateTime time.Time `gorm:"type:timestamp;not null;default:now()" json:"updateTime"` }
func (TransactionList) TableName ¶
func (t TransactionList) TableName() string
Click to show internal directories.
Click to hide internal directories.