|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- package protocal
-
- import (
- "github.com/dk-lockdown/seata-golang/meta"
- )
-
- type AbstractTransactionResponse struct {
- AbstractResultMessage
- TransactionExceptionCode meta.TransactionExceptionCode
- }
-
- type AbstractBranchEndRequest struct {
- Xid string
- BranchId int64
- BranchType meta.BranchType
- ResourceId string
- ApplicationData []byte
- }
-
- type AbstractBranchEndResponse struct {
- AbstractTransactionResponse
-
- Xid string
- BranchId int64
- BranchStatus meta.BranchStatus
- }
-
- type AbstractGlobalEndRequest struct {
- Xid string
- ExtraData []byte
- }
-
-
- type AbstractGlobalEndResponse struct {
- AbstractTransactionResponse
-
- GlobalStatus meta.GlobalStatus
- }
-
- type BranchRegisterRequest struct {
- Xid string
- BranchType meta.BranchType
- ResourceId string
- LockKey string
- ApplicationData []byte
- }
-
- func (req BranchRegisterRequest) GetTypeCode() int16 {
- return TypeBranchRegister
- }
-
- type BranchRegisterResponse struct {
- AbstractTransactionResponse
-
- BranchId int64
- }
-
- func (resp BranchRegisterResponse) GetTypeCode() int16 {
- return TypeBranchRegisterResult
- }
-
- type BranchReportRequest struct {
- Xid string
- BranchId int64
- ResourceId string
- Status meta.BranchStatus
- ApplicationData []byte
- BranchType meta.BranchType
- }
-
- func (req BranchReportRequest) GetTypeCode() int16 {
- return TypeBranchStatusReport
- }
-
- type BranchReportResponse struct {
- AbstractTransactionResponse
- }
-
- func (resp BranchReportResponse) GetTypeCode() int16 {
- return TypeBranchStatusReportResult
- }
-
- type BranchCommitRequest struct {
- AbstractBranchEndRequest
- }
-
- func (req BranchCommitRequest) GetTypeCode() int16 {
- return TypeBranchCommit
- }
-
- type BranchCommitResponse struct {
- AbstractBranchEndResponse
- }
-
- func (resp BranchCommitResponse) GetTypeCode() int16 {
- return TypeBranchCommitResult
- }
-
- type BranchRollbackRequest struct {
- AbstractBranchEndRequest
- }
-
- func (req BranchRollbackRequest) GetTypeCode() int16 {
- return TypeBranchRollback
- }
-
- type BranchRollbackResponse struct {
- AbstractBranchEndResponse
- }
-
- func (resp BranchRollbackResponse) GetTypeCode() int16 {
- return TypeGlobalRollbackResult
- }
-
- type GlobalBeginRequest struct {
- Timeout int32
- TransactionName string
- }
-
- func (req GlobalBeginRequest) GetTypeCode() int16 {
- return TypeGlobalBegin
- }
-
- type GlobalBeginResponse struct {
- AbstractTransactionResponse
-
- Xid string
- ExtraData []byte
- }
-
- func (resp GlobalBeginResponse) GetTypeCode() int16 {
- return TypeGlobalBeginResult
- }
-
- type GlobalStatusRequest struct {
- AbstractGlobalEndRequest
- }
-
- func (req GlobalStatusRequest) GetTypeCode() int16 {
- return TypeGlobalStatus
- }
-
- type GlobalStatusResponse struct {
- AbstractGlobalEndResponse
- }
-
- func (resp GlobalStatusResponse) GetTypeCode() int16 {
- return TypeGlobalStatusResult
- }
-
- type GlobalLockQueryRequest struct {
- BranchRegisterRequest
- }
-
- func (req GlobalLockQueryRequest) GetTypeCode() int16 {
- return TypeGlobalLockQuery
- }
-
- type GlobalLockQueryResponse struct {
- AbstractTransactionResponse
-
- Lockable bool
- }
-
- func (resp GlobalLockQueryResponse) GetTypeCode() int16 {
- return TypeGlobalLockQueryResult
- }
-
- type GlobalReportRequest struct {
- AbstractGlobalEndRequest
-
- GlobalStatus meta.GlobalStatus
- }
-
- func (req GlobalReportRequest) GetTypeCode() int16 {
- return TypeGlobalStatus
- }
-
- type GlobalReportResponse struct {
- AbstractGlobalEndResponse
- }
-
- func (resp GlobalReportResponse) GetTypeCode() int16 {
- return TypeGlobalStatusResult
- }
-
- type GlobalCommitRequest struct {
- AbstractGlobalEndRequest
- }
-
- func (req GlobalCommitRequest) GetTypeCode() int16 {
- return TypeGlobalCommit
- }
-
- type GlobalCommitResponse struct {
- AbstractGlobalEndResponse
- }
-
- func (resp GlobalCommitResponse) GetTypeCode() int16 {
- return TypeGlobalCommitResult
- }
-
- type GlobalRollbackRequest struct {
- AbstractGlobalEndRequest
- }
-
- func (req GlobalRollbackRequest) GetTypeCode() int16 {
- return TypeGlobalRollback
- }
-
- type GlobalRollbackResponse struct {
- AbstractGlobalEndResponse
- }
-
- func (resp GlobalRollbackResponse) GetTypeCode() int16 {
- return TypeGlobalRollbackResult
- }
-
- type UndoLogDeleteRequest struct {
- ResourceId string
- SaveDays int16
- BranchType meta.BranchType
- }
-
- func (req UndoLogDeleteRequest) GetTypeCode() int16 {
- return TypeRmDeleteUndolog
- }
|