_id
stringlengths
2
7
title
stringlengths
1
118
partition
stringclasses
3 values
text
stringlengths
52
85.5k
language
stringclasses
1 value
meta_information
dict
q182100
NewPaymentResult
test
func NewPaymentResult(code PaymentResultCode, value interface{}) (result PaymentResult, err error) { result.Code = code switch PaymentResultCode(code) { case PaymentResultCodePaymentSuccess: // void default: // void } return }
go
{ "resource": "" }
q182101
ValidEnum
test
func (e PathPaymentResultCode) ValidEnum(v int32) bool { _, ok := pathPaymentResultCodeMap[v] return ok }
go
{ "resource": "" }
q182102
ArmForSwitch
test
func (u PathPaymentResult) ArmForSwitch(sw int32) (string, bool) { switch PathPaymentResultCode(sw) { case PathPaymentResultCodePathPaymentSuccess: return "Success", true case PathPaymentResultCodePathPaymentNoIssuer: return "NoIssuer", true default: return "", true } }
go
{ "resource": "" }
q182103
NewPathPaymentResult
test
func NewPathPaymentResult(code PathPaymentResultCode, value interface{}) (result PathPaymentResult, err error) { result.Code = code switch PathPaymentResultCode(code) { case PathPaymentResultCodePathPaymentSuccess: tv, ok := value.(PathPaymentResultSuccess) if !ok { err = fmt.Errorf("invalid value, must be PathPaymentResultSuccess") return } result.Success = &tv case PathPaymentResultCodePathPaymentNoIssuer: tv, ok := value.(Asset) if !ok { err = fmt.Errorf("invalid value, must be Asset") return } result.NoIssuer = &tv default: // void } return }
go
{ "resource": "" }
q182104
MustNoIssuer
test
func (u PathPaymentResult) MustNoIssuer() Asset { val, ok := u.GetNoIssuer() if !ok { panic("arm NoIssuer is not set") } return val }
go
{ "resource": "" }
q182105
GetNoIssuer
test
func (u PathPaymentResult) GetNoIssuer() (result Asset, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Code)) if armName == "NoIssuer" { result = *u.NoIssuer ok = true } return }
go
{ "resource": "" }
q182106
ValidEnum
test
func (e ManageOfferResultCode) ValidEnum(v int32) bool { _, ok := manageOfferResultCodeMap[v] return ok }
go
{ "resource": "" }
q182107
ValidEnum
test
func (e ManageOfferEffect) ValidEnum(v int32) bool { _, ok := manageOfferEffectMap[v] return ok }
go
{ "resource": "" }
q182108
ArmForSwitch
test
func (u ManageOfferSuccessResultOffer) ArmForSwitch(sw int32) (string, bool) { switch ManageOfferEffect(sw) { case ManageOfferEffectManageOfferCreated: return "Offer", true case ManageOfferEffectManageOfferUpdated: return "Offer", true default: return "", true } }
go
{ "resource": "" }
q182109
NewManageOfferSuccessResultOffer
test
func NewManageOfferSuccessResultOffer(effect ManageOfferEffect, value interface{}) (result ManageOfferSuccessResultOffer, err error) { result.Effect = effect switch ManageOfferEffect(effect) { case ManageOfferEffectManageOfferCreated: tv, ok := value.(OfferEntry) if !ok { err = fmt.Errorf("invalid value, must be OfferEntry") return } result.Offer = &tv case ManageOfferEffectManageOfferUpdated: tv, ok := value.(OfferEntry) if !ok { err = fmt.Errorf("invalid value, must be OfferEntry") return } result.Offer = &tv default: // void } return }
go
{ "resource": "" }
q182110
ArmForSwitch
test
func (u ManageOfferResult) ArmForSwitch(sw int32) (string, bool) { switch ManageOfferResultCode(sw) { case ManageOfferResultCodeManageOfferSuccess: return "Success", true default: return "", true } }
go
{ "resource": "" }
q182111
NewManageOfferResult
test
func NewManageOfferResult(code ManageOfferResultCode, value interface{}) (result ManageOfferResult, err error) { result.Code = code switch ManageOfferResultCode(code) { case ManageOfferResultCodeManageOfferSuccess: tv, ok := value.(ManageOfferSuccessResult) if !ok { err = fmt.Errorf("invalid value, must be ManageOfferSuccessResult") return } result.Success = &tv default: // void } return }
go
{ "resource": "" }
q182112
ValidEnum
test
func (e SetOptionsResultCode) ValidEnum(v int32) bool { _, ok := setOptionsResultCodeMap[v] return ok }
go
{ "resource": "" }
q182113
ArmForSwitch
test
func (u SetOptionsResult) ArmForSwitch(sw int32) (string, bool) { switch SetOptionsResultCode(sw) { case SetOptionsResultCodeSetOptionsSuccess: return "", true default: return "", true } }
go
{ "resource": "" }
q182114
NewSetOptionsResult
test
func NewSetOptionsResult(code SetOptionsResultCode, value interface{}) (result SetOptionsResult, err error) { result.Code = code switch SetOptionsResultCode(code) { case SetOptionsResultCodeSetOptionsSuccess: // void default: // void } return }
go
{ "resource": "" }
q182115
ValidEnum
test
func (e ChangeTrustResultCode) ValidEnum(v int32) bool { _, ok := changeTrustResultCodeMap[v] return ok }
go
{ "resource": "" }
q182116
ArmForSwitch
test
func (u ChangeTrustResult) ArmForSwitch(sw int32) (string, bool) { switch ChangeTrustResultCode(sw) { case ChangeTrustResultCodeChangeTrustSuccess: return "", true default: return "", true } }
go
{ "resource": "" }
q182117
NewChangeTrustResult
test
func NewChangeTrustResult(code ChangeTrustResultCode, value interface{}) (result ChangeTrustResult, err error) { result.Code = code switch ChangeTrustResultCode(code) { case ChangeTrustResultCodeChangeTrustSuccess: // void default: // void } return }
go
{ "resource": "" }
q182118
ValidEnum
test
func (e AllowTrustResultCode) ValidEnum(v int32) bool { _, ok := allowTrustResultCodeMap[v] return ok }
go
{ "resource": "" }
q182119
ArmForSwitch
test
func (u AllowTrustResult) ArmForSwitch(sw int32) (string, bool) { switch AllowTrustResultCode(sw) { case AllowTrustResultCodeAllowTrustSuccess: return "", true default: return "", true } }
go
{ "resource": "" }
q182120
NewAllowTrustResult
test
func NewAllowTrustResult(code AllowTrustResultCode, value interface{}) (result AllowTrustResult, err error) { result.Code = code switch AllowTrustResultCode(code) { case AllowTrustResultCodeAllowTrustSuccess: // void default: // void } return }
go
{ "resource": "" }
q182121
ValidEnum
test
func (e AccountMergeResultCode) ValidEnum(v int32) bool { _, ok := accountMergeResultCodeMap[v] return ok }
go
{ "resource": "" }
q182122
ArmForSwitch
test
func (u AccountMergeResult) ArmForSwitch(sw int32) (string, bool) { switch AccountMergeResultCode(sw) { case AccountMergeResultCodeAccountMergeSuccess: return "SourceAccountBalance", true default: return "", true } }
go
{ "resource": "" }
q182123
NewAccountMergeResult
test
func NewAccountMergeResult(code AccountMergeResultCode, value interface{}) (result AccountMergeResult, err error) { result.Code = code switch AccountMergeResultCode(code) { case AccountMergeResultCodeAccountMergeSuccess: tv, ok := value.(Int64) if !ok { err = fmt.Errorf("invalid value, must be Int64") return } result.SourceAccountBalance = &tv default: // void } return }
go
{ "resource": "" }
q182124
MustSourceAccountBalance
test
func (u AccountMergeResult) MustSourceAccountBalance() Int64 { val, ok := u.GetSourceAccountBalance() if !ok { panic("arm SourceAccountBalance is not set") } return val }
go
{ "resource": "" }
q182125
GetSourceAccountBalance
test
func (u AccountMergeResult) GetSourceAccountBalance() (result Int64, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Code)) if armName == "SourceAccountBalance" { result = *u.SourceAccountBalance ok = true } return }
go
{ "resource": "" }
q182126
ValidEnum
test
func (e InflationResultCode) ValidEnum(v int32) bool { _, ok := inflationResultCodeMap[v] return ok }
go
{ "resource": "" }
q182127
ArmForSwitch
test
func (u InflationResult) ArmForSwitch(sw int32) (string, bool) { switch InflationResultCode(sw) { case InflationResultCodeInflationSuccess: return "Payouts", true default: return "", true } }
go
{ "resource": "" }
q182128
NewInflationResult
test
func NewInflationResult(code InflationResultCode, value interface{}) (result InflationResult, err error) { result.Code = code switch InflationResultCode(code) { case InflationResultCodeInflationSuccess: tv, ok := value.([]InflationPayout) if !ok { err = fmt.Errorf("invalid value, must be []InflationPayout") return } result.Payouts = &tv default: // void } return }
go
{ "resource": "" }
q182129
MustPayouts
test
func (u InflationResult) MustPayouts() []InflationPayout { val, ok := u.GetPayouts() if !ok { panic("arm Payouts is not set") } return val }
go
{ "resource": "" }
q182130
GetPayouts
test
func (u InflationResult) GetPayouts() (result []InflationPayout, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Code)) if armName == "Payouts" { result = *u.Payouts ok = true } return }
go
{ "resource": "" }
q182131
ValidEnum
test
func (e ManageDataResultCode) ValidEnum(v int32) bool { _, ok := manageDataResultCodeMap[v] return ok }
go
{ "resource": "" }
q182132
ArmForSwitch
test
func (u ManageDataResult) ArmForSwitch(sw int32) (string, bool) { switch ManageDataResultCode(sw) { case ManageDataResultCodeManageDataSuccess: return "", true default: return "", true } }
go
{ "resource": "" }
q182133
NewManageDataResult
test
func NewManageDataResult(code ManageDataResultCode, value interface{}) (result ManageDataResult, err error) { result.Code = code switch ManageDataResultCode(code) { case ManageDataResultCodeManageDataSuccess: // void default: // void } return }
go
{ "resource": "" }
q182134
ValidEnum
test
func (e OperationResultCode) ValidEnum(v int32) bool { _, ok := operationResultCodeMap[v] return ok }
go
{ "resource": "" }
q182135
ArmForSwitch
test
func (u OperationResultTr) ArmForSwitch(sw int32) (string, bool) { switch OperationType(sw) { case OperationTypeCreateAccount: return "CreateAccountResult", true case OperationTypePayment: return "PaymentResult", true case OperationTypePathPayment: return "PathPaymentResult", true case OperationTypeManageOffer: return "ManageOfferResult", true case OperationTypeCreatePassiveOffer: return "CreatePassiveOfferResult", true case OperationTypeSetOptions: return "SetOptionsResult", true case OperationTypeChangeTrust: return "ChangeTrustResult", true case OperationTypeAllowTrust: return "AllowTrustResult", true case OperationTypeAccountMerge: return "AccountMergeResult", true case OperationTypeInflation: return "InflationResult", true case OperationTypeManageData: return "ManageDataResult", true } return "-", false }
go
{ "resource": "" }
q182136
NewOperationResultTr
test
func NewOperationResultTr(aType OperationType, value interface{}) (result OperationResultTr, err error) { result.Type = aType switch OperationType(aType) { case OperationTypeCreateAccount: tv, ok := value.(CreateAccountResult) if !ok { err = fmt.Errorf("invalid value, must be CreateAccountResult") return } result.CreateAccountResult = &tv case OperationTypePayment: tv, ok := value.(PaymentResult) if !ok { err = fmt.Errorf("invalid value, must be PaymentResult") return } result.PaymentResult = &tv case OperationTypePathPayment: tv, ok := value.(PathPaymentResult) if !ok { err = fmt.Errorf("invalid value, must be PathPaymentResult") return } result.PathPaymentResult = &tv case OperationTypeManageOffer: tv, ok := value.(ManageOfferResult) if !ok { err = fmt.Errorf("invalid value, must be ManageOfferResult") return } result.ManageOfferResult = &tv case OperationTypeCreatePassiveOffer: tv, ok := value.(ManageOfferResult) if !ok { err = fmt.Errorf("invalid value, must be ManageOfferResult") return } result.CreatePassiveOfferResult = &tv case OperationTypeSetOptions: tv, ok := value.(SetOptionsResult) if !ok { err = fmt.Errorf("invalid value, must be SetOptionsResult") return } result.SetOptionsResult = &tv case OperationTypeChangeTrust: tv, ok := value.(ChangeTrustResult) if !ok { err = fmt.Errorf("invalid value, must be ChangeTrustResult") return } result.ChangeTrustResult = &tv case OperationTypeAllowTrust: tv, ok := value.(AllowTrustResult) if !ok { err = fmt.Errorf("invalid value, must be AllowTrustResult") return } result.AllowTrustResult = &tv case OperationTypeAccountMerge: tv, ok := value.(AccountMergeResult) if !ok { err = fmt.Errorf("invalid value, must be AccountMergeResult") return } result.AccountMergeResult = &tv case OperationTypeInflation: tv, ok := value.(InflationResult) if !ok { err = fmt.Errorf("invalid value, must be InflationResult") return } result.InflationResult = &tv case OperationTypeManageData: tv, ok := value.(ManageDataResult) if !ok { err = fmt.Errorf("invalid value, must be ManageDataResult") return } result.ManageDataResult = &tv } return }
go
{ "resource": "" }
q182137
MustCreateAccountResult
test
func (u OperationResultTr) MustCreateAccountResult() CreateAccountResult { val, ok := u.GetCreateAccountResult() if !ok { panic("arm CreateAccountResult is not set") } return val }
go
{ "resource": "" }
q182138
GetCreateAccountResult
test
func (u OperationResultTr) GetCreateAccountResult() (result CreateAccountResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "CreateAccountResult" { result = *u.CreateAccountResult ok = true } return }
go
{ "resource": "" }
q182139
MustPaymentResult
test
func (u OperationResultTr) MustPaymentResult() PaymentResult { val, ok := u.GetPaymentResult() if !ok { panic("arm PaymentResult is not set") } return val }
go
{ "resource": "" }
q182140
GetPaymentResult
test
func (u OperationResultTr) GetPaymentResult() (result PaymentResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "PaymentResult" { result = *u.PaymentResult ok = true } return }
go
{ "resource": "" }
q182141
MustPathPaymentResult
test
func (u OperationResultTr) MustPathPaymentResult() PathPaymentResult { val, ok := u.GetPathPaymentResult() if !ok { panic("arm PathPaymentResult is not set") } return val }
go
{ "resource": "" }
q182142
GetPathPaymentResult
test
func (u OperationResultTr) GetPathPaymentResult() (result PathPaymentResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "PathPaymentResult" { result = *u.PathPaymentResult ok = true } return }
go
{ "resource": "" }
q182143
MustManageOfferResult
test
func (u OperationResultTr) MustManageOfferResult() ManageOfferResult { val, ok := u.GetManageOfferResult() if !ok { panic("arm ManageOfferResult is not set") } return val }
go
{ "resource": "" }
q182144
GetManageOfferResult
test
func (u OperationResultTr) GetManageOfferResult() (result ManageOfferResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "ManageOfferResult" { result = *u.ManageOfferResult ok = true } return }
go
{ "resource": "" }
q182145
MustCreatePassiveOfferResult
test
func (u OperationResultTr) MustCreatePassiveOfferResult() ManageOfferResult { val, ok := u.GetCreatePassiveOfferResult() if !ok { panic("arm CreatePassiveOfferResult is not set") } return val }
go
{ "resource": "" }
q182146
MustSetOptionsResult
test
func (u OperationResultTr) MustSetOptionsResult() SetOptionsResult { val, ok := u.GetSetOptionsResult() if !ok { panic("arm SetOptionsResult is not set") } return val }
go
{ "resource": "" }
q182147
GetSetOptionsResult
test
func (u OperationResultTr) GetSetOptionsResult() (result SetOptionsResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "SetOptionsResult" { result = *u.SetOptionsResult ok = true } return }
go
{ "resource": "" }
q182148
MustChangeTrustResult
test
func (u OperationResultTr) MustChangeTrustResult() ChangeTrustResult { val, ok := u.GetChangeTrustResult() if !ok { panic("arm ChangeTrustResult is not set") } return val }
go
{ "resource": "" }
q182149
GetChangeTrustResult
test
func (u OperationResultTr) GetChangeTrustResult() (result ChangeTrustResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "ChangeTrustResult" { result = *u.ChangeTrustResult ok = true } return }
go
{ "resource": "" }
q182150
MustAllowTrustResult
test
func (u OperationResultTr) MustAllowTrustResult() AllowTrustResult { val, ok := u.GetAllowTrustResult() if !ok { panic("arm AllowTrustResult is not set") } return val }
go
{ "resource": "" }
q182151
GetAllowTrustResult
test
func (u OperationResultTr) GetAllowTrustResult() (result AllowTrustResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "AllowTrustResult" { result = *u.AllowTrustResult ok = true } return }
go
{ "resource": "" }
q182152
MustAccountMergeResult
test
func (u OperationResultTr) MustAccountMergeResult() AccountMergeResult { val, ok := u.GetAccountMergeResult() if !ok { panic("arm AccountMergeResult is not set") } return val }
go
{ "resource": "" }
q182153
GetAccountMergeResult
test
func (u OperationResultTr) GetAccountMergeResult() (result AccountMergeResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "AccountMergeResult" { result = *u.AccountMergeResult ok = true } return }
go
{ "resource": "" }
q182154
MustInflationResult
test
func (u OperationResultTr) MustInflationResult() InflationResult { val, ok := u.GetInflationResult() if !ok { panic("arm InflationResult is not set") } return val }
go
{ "resource": "" }
q182155
GetInflationResult
test
func (u OperationResultTr) GetInflationResult() (result InflationResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "InflationResult" { result = *u.InflationResult ok = true } return }
go
{ "resource": "" }
q182156
MustManageDataResult
test
func (u OperationResultTr) MustManageDataResult() ManageDataResult { val, ok := u.GetManageDataResult() if !ok { panic("arm ManageDataResult is not set") } return val }
go
{ "resource": "" }
q182157
GetManageDataResult
test
func (u OperationResultTr) GetManageDataResult() (result ManageDataResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "ManageDataResult" { result = *u.ManageDataResult ok = true } return }
go
{ "resource": "" }
q182158
ArmForSwitch
test
func (u OperationResult) ArmForSwitch(sw int32) (string, bool) { switch OperationResultCode(sw) { case OperationResultCodeOpInner: return "Tr", true default: return "", true } }
go
{ "resource": "" }
q182159
NewOperationResult
test
func NewOperationResult(code OperationResultCode, value interface{}) (result OperationResult, err error) { result.Code = code switch OperationResultCode(code) { case OperationResultCodeOpInner: tv, ok := value.(OperationResultTr) if !ok { err = fmt.Errorf("invalid value, must be OperationResultTr") return } result.Tr = &tv default: // void } return }
go
{ "resource": "" }
q182160
MustTr
test
func (u OperationResult) MustTr() OperationResultTr { val, ok := u.GetTr() if !ok { panic("arm Tr is not set") } return val }
go
{ "resource": "" }
q182161
GetTr
test
func (u OperationResult) GetTr() (result OperationResultTr, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Code)) if armName == "Tr" { result = *u.Tr ok = true } return }
go
{ "resource": "" }
q182162
ValidEnum
test
func (e TransactionResultCode) ValidEnum(v int32) bool { _, ok := transactionResultCodeMap[v] return ok }
go
{ "resource": "" }
q182163
ArmForSwitch
test
func (u TransactionResultResult) ArmForSwitch(sw int32) (string, bool) { switch TransactionResultCode(sw) { case TransactionResultCodeTxSuccess: return "Results", true case TransactionResultCodeTxFailed: return "Results", true default: return "", true } }
go
{ "resource": "" }
q182164
NewTransactionResultResult
test
func NewTransactionResultResult(code TransactionResultCode, value interface{}) (result TransactionResultResult, err error) { result.Code = code switch TransactionResultCode(code) { case TransactionResultCodeTxSuccess: tv, ok := value.([]OperationResult) if !ok { err = fmt.Errorf("invalid value, must be []OperationResult") return } result.Results = &tv case TransactionResultCodeTxFailed: tv, ok := value.([]OperationResult) if !ok { err = fmt.Errorf("invalid value, must be []OperationResult") return } result.Results = &tv default: // void } return }
go
{ "resource": "" }
q182165
MustResults
test
func (u TransactionResultResult) MustResults() []OperationResult { val, ok := u.GetResults() if !ok { panic("arm Results is not set") } return val }
go
{ "resource": "" }
q182166
GetResults
test
func (u TransactionResultResult) GetResults() (result []OperationResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Code)) if armName == "Results" { result = *u.Results ok = true } return }
go
{ "resource": "" }
q182167
NewTransactionResultExt
test
func NewTransactionResultExt(v int32, value interface{}) (result TransactionResultExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
go
{ "resource": "" }
q182168
NewStellarValueExt
test
func NewStellarValueExt(v int32, value interface{}) (result StellarValueExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
go
{ "resource": "" }
q182169
NewLedgerHeaderExt
test
func NewLedgerHeaderExt(v int32, value interface{}) (result LedgerHeaderExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
go
{ "resource": "" }
q182170
ValidEnum
test
func (e LedgerUpgradeType) ValidEnum(v int32) bool { _, ok := ledgerUpgradeTypeMap[v] return ok }
go
{ "resource": "" }
q182171
ArmForSwitch
test
func (u LedgerUpgrade) ArmForSwitch(sw int32) (string, bool) { switch LedgerUpgradeType(sw) { case LedgerUpgradeTypeLedgerUpgradeVersion: return "NewLedgerVersion", true case LedgerUpgradeTypeLedgerUpgradeBaseFee: return "NewBaseFee", true case LedgerUpgradeTypeLedgerUpgradeMaxTxSetSize: return "NewMaxTxSetSize", true } return "-", false }
go
{ "resource": "" }
q182172
NewLedgerUpgrade
test
func NewLedgerUpgrade(aType LedgerUpgradeType, value interface{}) (result LedgerUpgrade, err error) { result.Type = aType switch LedgerUpgradeType(aType) { case LedgerUpgradeTypeLedgerUpgradeVersion: tv, ok := value.(Uint32) if !ok { err = fmt.Errorf("invalid value, must be Uint32") return } result.NewLedgerVersion = &tv case LedgerUpgradeTypeLedgerUpgradeBaseFee: tv, ok := value.(Uint32) if !ok { err = fmt.Errorf("invalid value, must be Uint32") return } result.NewBaseFee = &tv case LedgerUpgradeTypeLedgerUpgradeMaxTxSetSize: tv, ok := value.(Uint32) if !ok { err = fmt.Errorf("invalid value, must be Uint32") return } result.NewMaxTxSetSize = &tv } return }
go
{ "resource": "" }
q182173
MustNewLedgerVersion
test
func (u LedgerUpgrade) MustNewLedgerVersion() Uint32 { val, ok := u.GetNewLedgerVersion() if !ok { panic("arm NewLedgerVersion is not set") } return val }
go
{ "resource": "" }
q182174
GetNewLedgerVersion
test
func (u LedgerUpgrade) GetNewLedgerVersion() (result Uint32, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "NewLedgerVersion" { result = *u.NewLedgerVersion ok = true } return }
go
{ "resource": "" }
q182175
MustNewBaseFee
test
func (u LedgerUpgrade) MustNewBaseFee() Uint32 { val, ok := u.GetNewBaseFee() if !ok { panic("arm NewBaseFee is not set") } return val }
go
{ "resource": "" }
q182176
GetNewBaseFee
test
func (u LedgerUpgrade) GetNewBaseFee() (result Uint32, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "NewBaseFee" { result = *u.NewBaseFee ok = true } return }
go
{ "resource": "" }
q182177
MustNewMaxTxSetSize
test
func (u LedgerUpgrade) MustNewMaxTxSetSize() Uint32 { val, ok := u.GetNewMaxTxSetSize() if !ok { panic("arm NewMaxTxSetSize is not set") } return val }
go
{ "resource": "" }
q182178
GetNewMaxTxSetSize
test
func (u LedgerUpgrade) GetNewMaxTxSetSize() (result Uint32, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "NewMaxTxSetSize" { result = *u.NewMaxTxSetSize ok = true } return }
go
{ "resource": "" }
q182179
ArmForSwitch
test
func (u LedgerKey) ArmForSwitch(sw int32) (string, bool) { switch LedgerEntryType(sw) { case LedgerEntryTypeAccount: return "Account", true case LedgerEntryTypeTrustline: return "TrustLine", true case LedgerEntryTypeOffer: return "Offer", true case LedgerEntryTypeData: return "Data", true } return "-", false }
go
{ "resource": "" }
q182180
NewLedgerKey
test
func NewLedgerKey(aType LedgerEntryType, value interface{}) (result LedgerKey, err error) { result.Type = aType switch LedgerEntryType(aType) { case LedgerEntryTypeAccount: tv, ok := value.(LedgerKeyAccount) if !ok { err = fmt.Errorf("invalid value, must be LedgerKeyAccount") return } result.Account = &tv case LedgerEntryTypeTrustline: tv, ok := value.(LedgerKeyTrustLine) if !ok { err = fmt.Errorf("invalid value, must be LedgerKeyTrustLine") return } result.TrustLine = &tv case LedgerEntryTypeOffer: tv, ok := value.(LedgerKeyOffer) if !ok { err = fmt.Errorf("invalid value, must be LedgerKeyOffer") return } result.Offer = &tv case LedgerEntryTypeData: tv, ok := value.(LedgerKeyData) if !ok { err = fmt.Errorf("invalid value, must be LedgerKeyData") return } result.Data = &tv } return }
go
{ "resource": "" }
q182181
ValidEnum
test
func (e BucketEntryType) ValidEnum(v int32) bool { _, ok := bucketEntryTypeMap[v] return ok }
go
{ "resource": "" }
q182182
ArmForSwitch
test
func (u BucketEntry) ArmForSwitch(sw int32) (string, bool) { switch BucketEntryType(sw) { case BucketEntryTypeLiveentry: return "LiveEntry", true case BucketEntryTypeDeadentry: return "DeadEntry", true } return "-", false }
go
{ "resource": "" }
q182183
NewBucketEntry
test
func NewBucketEntry(aType BucketEntryType, value interface{}) (result BucketEntry, err error) { result.Type = aType switch BucketEntryType(aType) { case BucketEntryTypeLiveentry: tv, ok := value.(LedgerEntry) if !ok { err = fmt.Errorf("invalid value, must be LedgerEntry") return } result.LiveEntry = &tv case BucketEntryTypeDeadentry: tv, ok := value.(LedgerKey) if !ok { err = fmt.Errorf("invalid value, must be LedgerKey") return } result.DeadEntry = &tv } return }
go
{ "resource": "" }
q182184
MustLiveEntry
test
func (u BucketEntry) MustLiveEntry() LedgerEntry { val, ok := u.GetLiveEntry() if !ok { panic("arm LiveEntry is not set") } return val }
go
{ "resource": "" }
q182185
GetLiveEntry
test
func (u BucketEntry) GetLiveEntry() (result LedgerEntry, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "LiveEntry" { result = *u.LiveEntry ok = true } return }
go
{ "resource": "" }
q182186
MustDeadEntry
test
func (u BucketEntry) MustDeadEntry() LedgerKey { val, ok := u.GetDeadEntry() if !ok { panic("arm DeadEntry is not set") } return val }
go
{ "resource": "" }
q182187
GetDeadEntry
test
func (u BucketEntry) GetDeadEntry() (result LedgerKey, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "DeadEntry" { result = *u.DeadEntry ok = true } return }
go
{ "resource": "" }
q182188
NewTransactionHistoryEntryExt
test
func NewTransactionHistoryEntryExt(v int32, value interface{}) (result TransactionHistoryEntryExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
go
{ "resource": "" }
q182189
ArmForSwitch
test
func (u TransactionHistoryResultEntryExt) ArmForSwitch(sw int32) (string, bool) { switch int32(sw) { case 0: return "", true } return "-", false }
go
{ "resource": "" }
q182190
NewTransactionHistoryResultEntryExt
test
func NewTransactionHistoryResultEntryExt(v int32, value interface{}) (result TransactionHistoryResultEntryExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
go
{ "resource": "" }
q182191
NewLedgerHeaderHistoryEntryExt
test
func NewLedgerHeaderHistoryEntryExt(v int32, value interface{}) (result LedgerHeaderHistoryEntryExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
go
{ "resource": "" }
q182192
NewScpHistoryEntry
test
func NewScpHistoryEntry(v int32, value interface{}) (result ScpHistoryEntry, err error) { result.V = v switch int32(v) { case 0: tv, ok := value.(ScpHistoryEntryV0) if !ok { err = fmt.Errorf("invalid value, must be ScpHistoryEntryV0") return } result.V0 = &tv } return }
go
{ "resource": "" }
q182193
ValidEnum
test
func (e LedgerEntryChangeType) ValidEnum(v int32) bool { _, ok := ledgerEntryChangeTypeMap[v] return ok }
go
{ "resource": "" }
q182194
ArmForSwitch
test
func (u LedgerEntryChange) ArmForSwitch(sw int32) (string, bool) { switch LedgerEntryChangeType(sw) { case LedgerEntryChangeTypeLedgerEntryCreated: return "Created", true case LedgerEntryChangeTypeLedgerEntryUpdated: return "Updated", true case LedgerEntryChangeTypeLedgerEntryRemoved: return "Removed", true case LedgerEntryChangeTypeLedgerEntryState: return "State", true } return "-", false }
go
{ "resource": "" }
q182195
NewLedgerEntryChange
test
func NewLedgerEntryChange(aType LedgerEntryChangeType, value interface{}) (result LedgerEntryChange, err error) { result.Type = aType switch LedgerEntryChangeType(aType) { case LedgerEntryChangeTypeLedgerEntryCreated: tv, ok := value.(LedgerEntry) if !ok { err = fmt.Errorf("invalid value, must be LedgerEntry") return } result.Created = &tv case LedgerEntryChangeTypeLedgerEntryUpdated: tv, ok := value.(LedgerEntry) if !ok { err = fmt.Errorf("invalid value, must be LedgerEntry") return } result.Updated = &tv case LedgerEntryChangeTypeLedgerEntryRemoved: tv, ok := value.(LedgerKey) if !ok { err = fmt.Errorf("invalid value, must be LedgerKey") return } result.Removed = &tv case LedgerEntryChangeTypeLedgerEntryState: tv, ok := value.(LedgerEntry) if !ok { err = fmt.Errorf("invalid value, must be LedgerEntry") return } result.State = &tv } return }
go
{ "resource": "" }
q182196
MustCreated
test
func (u LedgerEntryChange) MustCreated() LedgerEntry { val, ok := u.GetCreated() if !ok { panic("arm Created is not set") } return val }
go
{ "resource": "" }
q182197
GetCreated
test
func (u LedgerEntryChange) GetCreated() (result LedgerEntry, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "Created" { result = *u.Created ok = true } return }
go
{ "resource": "" }
q182198
MustUpdated
test
func (u LedgerEntryChange) MustUpdated() LedgerEntry { val, ok := u.GetUpdated() if !ok { panic("arm Updated is not set") } return val }
go
{ "resource": "" }
q182199
GetUpdated
test
func (u LedgerEntryChange) GetUpdated() (result LedgerEntry, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "Updated" { result = *u.Updated ok = true } return }
go
{ "resource": "" }