repo
stringlengths
5
67
path
stringlengths
4
218
func_name
stringlengths
0
151
original_string
stringlengths
52
373k
language
stringclasses
6 values
code
stringlengths
52
373k
code_tokens
listlengths
10
512
docstring
stringlengths
3
47.2k
docstring_tokens
listlengths
3
234
sha
stringlengths
40
40
url
stringlengths
85
339
partition
stringclasses
3 values
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
func (u SetOptionsResult) ArmForSwitch(sw int32) (string, bool) { switch SetOptionsResultCode(sw) { case SetOptionsResultCodeSetOptionsSuccess: return "", true default: return "", true } }
go
func (u SetOptionsResult) ArmForSwitch(sw int32) (string, bool) { switch SetOptionsResultCode(sw) { case SetOptionsResultCodeSetOptionsSuccess: return "", true default: return "", true } }
[ "func", "(", "u", "SetOptionsResult", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "SetOptionsResultCode", "(", "sw", ")", "{", "case", "SetOptionsResultCodeSetOptionsSuccess", ":", "return", "\"\"", ",", "true"...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of SetOptionsResult
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "SetOptionsResult" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3250-L3257
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewSetOptionsResult
func NewSetOptionsResult(code SetOptionsResultCode, value interface{}) (result SetOptionsResult, err error) { result.Code = code switch SetOptionsResultCode(code) { case SetOptionsResultCodeSetOptionsSuccess: // void default: // void } return }
go
func NewSetOptionsResult(code SetOptionsResultCode, value interface{}) (result SetOptionsResult, err error) { result.Code = code switch SetOptionsResultCode(code) { case SetOptionsResultCodeSetOptionsSuccess: // void default: // void } return }
[ "func", "NewSetOptionsResult", "(", "code", "SetOptionsResultCode", ",", "value", "interface", "{", "}", ")", "(", "result", "SetOptionsResult", ",", "err", "error", ")", "{", "result", ".", "Code", "=", "code", "\n", "switch", "SetOptionsResultCode", "(", "co...
// NewSetOptionsResult creates a new SetOptionsResult.
[ "NewSetOptionsResult", "creates", "a", "new", "SetOptionsResult", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3260-L3269
test
stellar/go-stellar-base
xdr/xdr_generated.go
ValidEnum
func (e ChangeTrustResultCode) ValidEnum(v int32) bool { _, ok := changeTrustResultCodeMap[v] return ok }
go
func (e ChangeTrustResultCode) ValidEnum(v int32) bool { _, ok := changeTrustResultCodeMap[v] return ok }
[ "func", "(", "e", "ChangeTrustResultCode", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "ok", ":=", "changeTrustResultCodeMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
// ValidEnum validates a proposed value for this enum. Implements // the Enum interface for ChangeTrustResultCode
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "ChangeTrustResultCode" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3305-L3308
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
func (u ChangeTrustResult) ArmForSwitch(sw int32) (string, bool) { switch ChangeTrustResultCode(sw) { case ChangeTrustResultCodeChangeTrustSuccess: return "", true default: return "", true } }
go
func (u ChangeTrustResult) ArmForSwitch(sw int32) (string, bool) { switch ChangeTrustResultCode(sw) { case ChangeTrustResultCodeChangeTrustSuccess: return "", true default: return "", true } }
[ "func", "(", "u", "ChangeTrustResult", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "ChangeTrustResultCode", "(", "sw", ")", "{", "case", "ChangeTrustResultCodeChangeTrustSuccess", ":", "return", "\"\"", ",", "t...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of ChangeTrustResult
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "ChangeTrustResult" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3338-L3345
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewChangeTrustResult
func NewChangeTrustResult(code ChangeTrustResultCode, value interface{}) (result ChangeTrustResult, err error) { result.Code = code switch ChangeTrustResultCode(code) { case ChangeTrustResultCodeChangeTrustSuccess: // void default: // void } return }
go
func NewChangeTrustResult(code ChangeTrustResultCode, value interface{}) (result ChangeTrustResult, err error) { result.Code = code switch ChangeTrustResultCode(code) { case ChangeTrustResultCodeChangeTrustSuccess: // void default: // void } return }
[ "func", "NewChangeTrustResult", "(", "code", "ChangeTrustResultCode", ",", "value", "interface", "{", "}", ")", "(", "result", "ChangeTrustResult", ",", "err", "error", ")", "{", "result", ".", "Code", "=", "code", "\n", "switch", "ChangeTrustResultCode", "(", ...
// NewChangeTrustResult creates a new ChangeTrustResult.
[ "NewChangeTrustResult", "creates", "a", "new", "ChangeTrustResult", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3348-L3357
test
stellar/go-stellar-base
xdr/xdr_generated.go
ValidEnum
func (e AllowTrustResultCode) ValidEnum(v int32) bool { _, ok := allowTrustResultCodeMap[v] return ok }
go
func (e AllowTrustResultCode) ValidEnum(v int32) bool { _, ok := allowTrustResultCodeMap[v] return ok }
[ "func", "(", "e", "AllowTrustResultCode", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "ok", ":=", "allowTrustResultCodeMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
// ValidEnum validates a proposed value for this enum. Implements // the Enum interface for AllowTrustResultCode
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "AllowTrustResultCode" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3393-L3396
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
func (u AllowTrustResult) ArmForSwitch(sw int32) (string, bool) { switch AllowTrustResultCode(sw) { case AllowTrustResultCodeAllowTrustSuccess: return "", true default: return "", true } }
go
func (u AllowTrustResult) ArmForSwitch(sw int32) (string, bool) { switch AllowTrustResultCode(sw) { case AllowTrustResultCodeAllowTrustSuccess: return "", true default: return "", true } }
[ "func", "(", "u", "AllowTrustResult", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "AllowTrustResultCode", "(", "sw", ")", "{", "case", "AllowTrustResultCodeAllowTrustSuccess", ":", "return", "\"\"", ",", "true"...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of AllowTrustResult
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "AllowTrustResult" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3426-L3433
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewAllowTrustResult
func NewAllowTrustResult(code AllowTrustResultCode, value interface{}) (result AllowTrustResult, err error) { result.Code = code switch AllowTrustResultCode(code) { case AllowTrustResultCodeAllowTrustSuccess: // void default: // void } return }
go
func NewAllowTrustResult(code AllowTrustResultCode, value interface{}) (result AllowTrustResult, err error) { result.Code = code switch AllowTrustResultCode(code) { case AllowTrustResultCodeAllowTrustSuccess: // void default: // void } return }
[ "func", "NewAllowTrustResult", "(", "code", "AllowTrustResultCode", ",", "value", "interface", "{", "}", ")", "(", "result", "AllowTrustResult", ",", "err", "error", ")", "{", "result", ".", "Code", "=", "code", "\n", "switch", "AllowTrustResultCode", "(", "co...
// NewAllowTrustResult creates a new AllowTrustResult.
[ "NewAllowTrustResult", "creates", "a", "new", "AllowTrustResult", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3436-L3445
test
stellar/go-stellar-base
xdr/xdr_generated.go
ValidEnum
func (e AccountMergeResultCode) ValidEnum(v int32) bool { _, ok := accountMergeResultCodeMap[v] return ok }
go
func (e AccountMergeResultCode) ValidEnum(v int32) bool { _, ok := accountMergeResultCodeMap[v] return ok }
[ "func", "(", "e", "AccountMergeResultCode", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "ok", ":=", "accountMergeResultCodeMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
// ValidEnum validates a proposed value for this enum. Implements // the Enum interface for AccountMergeResultCode
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "AccountMergeResultCode" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3480-L3483
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
func (u AccountMergeResult) ArmForSwitch(sw int32) (string, bool) { switch AccountMergeResultCode(sw) { case AccountMergeResultCodeAccountMergeSuccess: return "SourceAccountBalance", true default: return "", true } }
go
func (u AccountMergeResult) ArmForSwitch(sw int32) (string, bool) { switch AccountMergeResultCode(sw) { case AccountMergeResultCodeAccountMergeSuccess: return "SourceAccountBalance", true default: return "", true } }
[ "func", "(", "u", "AccountMergeResult", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "AccountMergeResultCode", "(", "sw", ")", "{", "case", "AccountMergeResultCodeAccountMergeSuccess", ":", "return", "\"SourceAccoun...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of AccountMergeResult
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "AccountMergeResult" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3514-L3521
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewAccountMergeResult
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") retu...
go
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") retu...
[ "func", "NewAccountMergeResult", "(", "code", "AccountMergeResultCode", ",", "value", "interface", "{", "}", ")", "(", "result", "AccountMergeResult", ",", "err", "error", ")", "{", "result", ".", "Code", "=", "code", "\n", "switch", "AccountMergeResultCode", "(...
// NewAccountMergeResult creates a new AccountMergeResult.
[ "NewAccountMergeResult", "creates", "a", "new", "AccountMergeResult", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3524-L3538
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustSourceAccountBalance
func (u AccountMergeResult) MustSourceAccountBalance() Int64 { val, ok := u.GetSourceAccountBalance() if !ok { panic("arm SourceAccountBalance is not set") } return val }
go
func (u AccountMergeResult) MustSourceAccountBalance() Int64 { val, ok := u.GetSourceAccountBalance() if !ok { panic("arm SourceAccountBalance is not set") } return val }
[ "func", "(", "u", "AccountMergeResult", ")", "MustSourceAccountBalance", "(", ")", "Int64", "{", "val", ",", "ok", ":=", "u", ".", "GetSourceAccountBalance", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm SourceAccountBalance is not set\"", ")", "\...
// MustSourceAccountBalance retrieves the SourceAccountBalance value from the union, // panicing if the value is not set.
[ "MustSourceAccountBalance", "retrieves", "the", "SourceAccountBalance", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3542-L3550
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetSourceAccountBalance
func (u AccountMergeResult) GetSourceAccountBalance() (result Int64, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Code)) if armName == "SourceAccountBalance" { result = *u.SourceAccountBalance ok = true } return }
go
func (u AccountMergeResult) GetSourceAccountBalance() (result Int64, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Code)) if armName == "SourceAccountBalance" { result = *u.SourceAccountBalance ok = true } return }
[ "func", "(", "u", "AccountMergeResult", ")", "GetSourceAccountBalance", "(", ")", "(", "result", "Int64", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Code", ")", ")", "\n", "if", "ar...
// GetSourceAccountBalance retrieves the SourceAccountBalance value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetSourceAccountBalance", "retrieves", "the", "SourceAccountBalance", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3554-L3563
test
stellar/go-stellar-base
xdr/xdr_generated.go
ValidEnum
func (e InflationResultCode) ValidEnum(v int32) bool { _, ok := inflationResultCodeMap[v] return ok }
go
func (e InflationResultCode) ValidEnum(v int32) bool { _, ok := inflationResultCodeMap[v] return ok }
[ "func", "(", "e", "InflationResultCode", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "ok", ":=", "inflationResultCodeMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
// ValidEnum validates a proposed value for this enum. Implements // the Enum interface for InflationResultCode
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "InflationResultCode" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3589-L3592
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
func (u InflationResult) ArmForSwitch(sw int32) (string, bool) { switch InflationResultCode(sw) { case InflationResultCodeInflationSuccess: return "Payouts", true default: return "", true } }
go
func (u InflationResult) ArmForSwitch(sw int32) (string, bool) { switch InflationResultCode(sw) { case InflationResultCodeInflationSuccess: return "Payouts", true default: return "", true } }
[ "func", "(", "u", "InflationResult", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "InflationResultCode", "(", "sw", ")", "{", "case", "InflationResultCodeInflationSuccess", ":", "return", "\"Payouts\"", ",", "tr...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of InflationResult
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "InflationResult" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3636-L3643
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewInflationResult
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") ...
go
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") ...
[ "func", "NewInflationResult", "(", "code", "InflationResultCode", ",", "value", "interface", "{", "}", ")", "(", "result", "InflationResult", ",", "err", "error", ")", "{", "result", ".", "Code", "=", "code", "\n", "switch", "InflationResultCode", "(", "code",...
// NewInflationResult creates a new InflationResult.
[ "NewInflationResult", "creates", "a", "new", "InflationResult", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3646-L3660
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustPayouts
func (u InflationResult) MustPayouts() []InflationPayout { val, ok := u.GetPayouts() if !ok { panic("arm Payouts is not set") } return val }
go
func (u InflationResult) MustPayouts() []InflationPayout { val, ok := u.GetPayouts() if !ok { panic("arm Payouts is not set") } return val }
[ "func", "(", "u", "InflationResult", ")", "MustPayouts", "(", ")", "[", "]", "InflationPayout", "{", "val", ",", "ok", ":=", "u", ".", "GetPayouts", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm Payouts is not set\"", ")", "\n", "}", "\n",...
// MustPayouts retrieves the Payouts value from the union, // panicing if the value is not set.
[ "MustPayouts", "retrieves", "the", "Payouts", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3664-L3672
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetPayouts
func (u InflationResult) GetPayouts() (result []InflationPayout, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Code)) if armName == "Payouts" { result = *u.Payouts ok = true } return }
go
func (u InflationResult) GetPayouts() (result []InflationPayout, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Code)) if armName == "Payouts" { result = *u.Payouts ok = true } return }
[ "func", "(", "u", "InflationResult", ")", "GetPayouts", "(", ")", "(", "result", "[", "]", "InflationPayout", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Code", ")", ")", "\n", "if...
// GetPayouts retrieves the Payouts value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetPayouts", "retrieves", "the", "Payouts", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3676-L3685
test
stellar/go-stellar-base
xdr/xdr_generated.go
ValidEnum
func (e ManageDataResultCode) ValidEnum(v int32) bool { _, ok := manageDataResultCodeMap[v] return ok }
go
func (e ManageDataResultCode) ValidEnum(v int32) bool { _, ok := manageDataResultCodeMap[v] return ok }
[ "func", "(", "e", "ManageDataResultCode", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "ok", ":=", "manageDataResultCodeMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
// ValidEnum validates a proposed value for this enum. Implements // the Enum interface for ManageDataResultCode
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "ManageDataResultCode" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3720-L3723
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
func (u ManageDataResult) ArmForSwitch(sw int32) (string, bool) { switch ManageDataResultCode(sw) { case ManageDataResultCodeManageDataSuccess: return "", true default: return "", true } }
go
func (u ManageDataResult) ArmForSwitch(sw int32) (string, bool) { switch ManageDataResultCode(sw) { case ManageDataResultCodeManageDataSuccess: return "", true default: return "", true } }
[ "func", "(", "u", "ManageDataResult", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "ManageDataResultCode", "(", "sw", ")", "{", "case", "ManageDataResultCodeManageDataSuccess", ":", "return", "\"\"", ",", "true"...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of ManageDataResult
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "ManageDataResult" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3753-L3760
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewManageDataResult
func NewManageDataResult(code ManageDataResultCode, value interface{}) (result ManageDataResult, err error) { result.Code = code switch ManageDataResultCode(code) { case ManageDataResultCodeManageDataSuccess: // void default: // void } return }
go
func NewManageDataResult(code ManageDataResultCode, value interface{}) (result ManageDataResult, err error) { result.Code = code switch ManageDataResultCode(code) { case ManageDataResultCodeManageDataSuccess: // void default: // void } return }
[ "func", "NewManageDataResult", "(", "code", "ManageDataResultCode", ",", "value", "interface", "{", "}", ")", "(", "result", "ManageDataResult", ",", "err", "error", ")", "{", "result", ".", "Code", "=", "code", "\n", "switch", "ManageDataResultCode", "(", "co...
// NewManageDataResult creates a new ManageDataResult.
[ "NewManageDataResult", "creates", "a", "new", "ManageDataResult", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3763-L3772
test
stellar/go-stellar-base
xdr/xdr_generated.go
ValidEnum
func (e OperationResultCode) ValidEnum(v int32) bool { _, ok := operationResultCodeMap[v] return ok }
go
func (e OperationResultCode) ValidEnum(v int32) bool { _, ok := operationResultCodeMap[v] return ok }
[ "func", "(", "e", "OperationResultCode", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "ok", ":=", "operationResultCodeMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
// ValidEnum validates a proposed value for this enum. Implements // the Enum interface for OperationResultCode
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "OperationResultCode" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3800-L3803
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
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 OperationTypeManageOff...
go
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 OperationTypeManageOff...
[ "func", "(", "u", "OperationResultTr", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "OperationType", "(", "sw", ")", "{", "case", "OperationTypeCreateAccount", ":", "return", "\"CreateAccountResult\"", ",", "tru...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of OperationResultTr
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "OperationResultTr" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3862-L3888
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewOperationResultTr
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 ...
go
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 ...
[ "func", "NewOperationResultTr", "(", "aType", "OperationType", ",", "value", "interface", "{", "}", ")", "(", "result", "OperationResultTr", ",", "err", "error", ")", "{", "result", ".", "Type", "=", "aType", "\n", "switch", "OperationType", "(", "aType", ")...
// NewOperationResultTr creates a new OperationResultTr.
[ "NewOperationResultTr", "creates", "a", "new", "OperationResultTr", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3891-L3973
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustCreateAccountResult
func (u OperationResultTr) MustCreateAccountResult() CreateAccountResult { val, ok := u.GetCreateAccountResult() if !ok { panic("arm CreateAccountResult is not set") } return val }
go
func (u OperationResultTr) MustCreateAccountResult() CreateAccountResult { val, ok := u.GetCreateAccountResult() if !ok { panic("arm CreateAccountResult is not set") } return val }
[ "func", "(", "u", "OperationResultTr", ")", "MustCreateAccountResult", "(", ")", "CreateAccountResult", "{", "val", ",", "ok", ":=", "u", ".", "GetCreateAccountResult", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm CreateAccountResult is not set\"", ...
// MustCreateAccountResult retrieves the CreateAccountResult value from the union, // panicing if the value is not set.
[ "MustCreateAccountResult", "retrieves", "the", "CreateAccountResult", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3977-L3985
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetCreateAccountResult
func (u OperationResultTr) GetCreateAccountResult() (result CreateAccountResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "CreateAccountResult" { result = *u.CreateAccountResult ok = true } return }
go
func (u OperationResultTr) GetCreateAccountResult() (result CreateAccountResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "CreateAccountResult" { result = *u.CreateAccountResult ok = true } return }
[ "func", "(", "u", "OperationResultTr", ")", "GetCreateAccountResult", "(", ")", "(", "result", "CreateAccountResult", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", ...
// GetCreateAccountResult retrieves the CreateAccountResult value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetCreateAccountResult", "retrieves", "the", "CreateAccountResult", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L3989-L3998
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustPaymentResult
func (u OperationResultTr) MustPaymentResult() PaymentResult { val, ok := u.GetPaymentResult() if !ok { panic("arm PaymentResult is not set") } return val }
go
func (u OperationResultTr) MustPaymentResult() PaymentResult { val, ok := u.GetPaymentResult() if !ok { panic("arm PaymentResult is not set") } return val }
[ "func", "(", "u", "OperationResultTr", ")", "MustPaymentResult", "(", ")", "PaymentResult", "{", "val", ",", "ok", ":=", "u", ".", "GetPaymentResult", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm PaymentResult is not set\"", ")", "\n", "}", "...
// MustPaymentResult retrieves the PaymentResult value from the union, // panicing if the value is not set.
[ "MustPaymentResult", "retrieves", "the", "PaymentResult", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4002-L4010
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetPaymentResult
func (u OperationResultTr) GetPaymentResult() (result PaymentResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "PaymentResult" { result = *u.PaymentResult ok = true } return }
go
func (u OperationResultTr) GetPaymentResult() (result PaymentResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "PaymentResult" { result = *u.PaymentResult ok = true } return }
[ "func", "(", "u", "OperationResultTr", ")", "GetPaymentResult", "(", ")", "(", "result", "PaymentResult", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if", "ar...
// GetPaymentResult retrieves the PaymentResult value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetPaymentResult", "retrieves", "the", "PaymentResult", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4014-L4023
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustPathPaymentResult
func (u OperationResultTr) MustPathPaymentResult() PathPaymentResult { val, ok := u.GetPathPaymentResult() if !ok { panic("arm PathPaymentResult is not set") } return val }
go
func (u OperationResultTr) MustPathPaymentResult() PathPaymentResult { val, ok := u.GetPathPaymentResult() if !ok { panic("arm PathPaymentResult is not set") } return val }
[ "func", "(", "u", "OperationResultTr", ")", "MustPathPaymentResult", "(", ")", "PathPaymentResult", "{", "val", ",", "ok", ":=", "u", ".", "GetPathPaymentResult", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm PathPaymentResult is not set\"", ")", ...
// MustPathPaymentResult retrieves the PathPaymentResult value from the union, // panicing if the value is not set.
[ "MustPathPaymentResult", "retrieves", "the", "PathPaymentResult", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4027-L4035
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetPathPaymentResult
func (u OperationResultTr) GetPathPaymentResult() (result PathPaymentResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "PathPaymentResult" { result = *u.PathPaymentResult ok = true } return }
go
func (u OperationResultTr) GetPathPaymentResult() (result PathPaymentResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "PathPaymentResult" { result = *u.PathPaymentResult ok = true } return }
[ "func", "(", "u", "OperationResultTr", ")", "GetPathPaymentResult", "(", ")", "(", "result", "PathPaymentResult", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if...
// GetPathPaymentResult retrieves the PathPaymentResult value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetPathPaymentResult", "retrieves", "the", "PathPaymentResult", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4039-L4048
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustManageOfferResult
func (u OperationResultTr) MustManageOfferResult() ManageOfferResult { val, ok := u.GetManageOfferResult() if !ok { panic("arm ManageOfferResult is not set") } return val }
go
func (u OperationResultTr) MustManageOfferResult() ManageOfferResult { val, ok := u.GetManageOfferResult() if !ok { panic("arm ManageOfferResult is not set") } return val }
[ "func", "(", "u", "OperationResultTr", ")", "MustManageOfferResult", "(", ")", "ManageOfferResult", "{", "val", ",", "ok", ":=", "u", ".", "GetManageOfferResult", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm ManageOfferResult is not set\"", ")", ...
// MustManageOfferResult retrieves the ManageOfferResult value from the union, // panicing if the value is not set.
[ "MustManageOfferResult", "retrieves", "the", "ManageOfferResult", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4052-L4060
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetManageOfferResult
func (u OperationResultTr) GetManageOfferResult() (result ManageOfferResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "ManageOfferResult" { result = *u.ManageOfferResult ok = true } return }
go
func (u OperationResultTr) GetManageOfferResult() (result ManageOfferResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "ManageOfferResult" { result = *u.ManageOfferResult ok = true } return }
[ "func", "(", "u", "OperationResultTr", ")", "GetManageOfferResult", "(", ")", "(", "result", "ManageOfferResult", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if...
// GetManageOfferResult retrieves the ManageOfferResult value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetManageOfferResult", "retrieves", "the", "ManageOfferResult", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4064-L4073
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustCreatePassiveOfferResult
func (u OperationResultTr) MustCreatePassiveOfferResult() ManageOfferResult { val, ok := u.GetCreatePassiveOfferResult() if !ok { panic("arm CreatePassiveOfferResult is not set") } return val }
go
func (u OperationResultTr) MustCreatePassiveOfferResult() ManageOfferResult { val, ok := u.GetCreatePassiveOfferResult() if !ok { panic("arm CreatePassiveOfferResult is not set") } return val }
[ "func", "(", "u", "OperationResultTr", ")", "MustCreatePassiveOfferResult", "(", ")", "ManageOfferResult", "{", "val", ",", "ok", ":=", "u", ".", "GetCreatePassiveOfferResult", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm CreatePassiveOfferResult is ...
// MustCreatePassiveOfferResult retrieves the CreatePassiveOfferResult value from the union, // panicing if the value is not set.
[ "MustCreatePassiveOfferResult", "retrieves", "the", "CreatePassiveOfferResult", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4077-L4085
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustSetOptionsResult
func (u OperationResultTr) MustSetOptionsResult() SetOptionsResult { val, ok := u.GetSetOptionsResult() if !ok { panic("arm SetOptionsResult is not set") } return val }
go
func (u OperationResultTr) MustSetOptionsResult() SetOptionsResult { val, ok := u.GetSetOptionsResult() if !ok { panic("arm SetOptionsResult is not set") } return val }
[ "func", "(", "u", "OperationResultTr", ")", "MustSetOptionsResult", "(", ")", "SetOptionsResult", "{", "val", ",", "ok", ":=", "u", ".", "GetSetOptionsResult", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm SetOptionsResult is not set\"", ")", "\n"...
// MustSetOptionsResult retrieves the SetOptionsResult value from the union, // panicing if the value is not set.
[ "MustSetOptionsResult", "retrieves", "the", "SetOptionsResult", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4102-L4110
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetSetOptionsResult
func (u OperationResultTr) GetSetOptionsResult() (result SetOptionsResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "SetOptionsResult" { result = *u.SetOptionsResult ok = true } return }
go
func (u OperationResultTr) GetSetOptionsResult() (result SetOptionsResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "SetOptionsResult" { result = *u.SetOptionsResult ok = true } return }
[ "func", "(", "u", "OperationResultTr", ")", "GetSetOptionsResult", "(", ")", "(", "result", "SetOptionsResult", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if",...
// GetSetOptionsResult retrieves the SetOptionsResult value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetSetOptionsResult", "retrieves", "the", "SetOptionsResult", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4114-L4123
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustChangeTrustResult
func (u OperationResultTr) MustChangeTrustResult() ChangeTrustResult { val, ok := u.GetChangeTrustResult() if !ok { panic("arm ChangeTrustResult is not set") } return val }
go
func (u OperationResultTr) MustChangeTrustResult() ChangeTrustResult { val, ok := u.GetChangeTrustResult() if !ok { panic("arm ChangeTrustResult is not set") } return val }
[ "func", "(", "u", "OperationResultTr", ")", "MustChangeTrustResult", "(", ")", "ChangeTrustResult", "{", "val", ",", "ok", ":=", "u", ".", "GetChangeTrustResult", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm ChangeTrustResult is not set\"", ")", ...
// MustChangeTrustResult retrieves the ChangeTrustResult value from the union, // panicing if the value is not set.
[ "MustChangeTrustResult", "retrieves", "the", "ChangeTrustResult", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4127-L4135
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetChangeTrustResult
func (u OperationResultTr) GetChangeTrustResult() (result ChangeTrustResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "ChangeTrustResult" { result = *u.ChangeTrustResult ok = true } return }
go
func (u OperationResultTr) GetChangeTrustResult() (result ChangeTrustResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "ChangeTrustResult" { result = *u.ChangeTrustResult ok = true } return }
[ "func", "(", "u", "OperationResultTr", ")", "GetChangeTrustResult", "(", ")", "(", "result", "ChangeTrustResult", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if...
// GetChangeTrustResult retrieves the ChangeTrustResult value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetChangeTrustResult", "retrieves", "the", "ChangeTrustResult", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4139-L4148
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustAllowTrustResult
func (u OperationResultTr) MustAllowTrustResult() AllowTrustResult { val, ok := u.GetAllowTrustResult() if !ok { panic("arm AllowTrustResult is not set") } return val }
go
func (u OperationResultTr) MustAllowTrustResult() AllowTrustResult { val, ok := u.GetAllowTrustResult() if !ok { panic("arm AllowTrustResult is not set") } return val }
[ "func", "(", "u", "OperationResultTr", ")", "MustAllowTrustResult", "(", ")", "AllowTrustResult", "{", "val", ",", "ok", ":=", "u", ".", "GetAllowTrustResult", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm AllowTrustResult is not set\"", ")", "\n"...
// MustAllowTrustResult retrieves the AllowTrustResult value from the union, // panicing if the value is not set.
[ "MustAllowTrustResult", "retrieves", "the", "AllowTrustResult", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4152-L4160
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetAllowTrustResult
func (u OperationResultTr) GetAllowTrustResult() (result AllowTrustResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "AllowTrustResult" { result = *u.AllowTrustResult ok = true } return }
go
func (u OperationResultTr) GetAllowTrustResult() (result AllowTrustResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "AllowTrustResult" { result = *u.AllowTrustResult ok = true } return }
[ "func", "(", "u", "OperationResultTr", ")", "GetAllowTrustResult", "(", ")", "(", "result", "AllowTrustResult", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if",...
// GetAllowTrustResult retrieves the AllowTrustResult value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetAllowTrustResult", "retrieves", "the", "AllowTrustResult", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4164-L4173
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustAccountMergeResult
func (u OperationResultTr) MustAccountMergeResult() AccountMergeResult { val, ok := u.GetAccountMergeResult() if !ok { panic("arm AccountMergeResult is not set") } return val }
go
func (u OperationResultTr) MustAccountMergeResult() AccountMergeResult { val, ok := u.GetAccountMergeResult() if !ok { panic("arm AccountMergeResult is not set") } return val }
[ "func", "(", "u", "OperationResultTr", ")", "MustAccountMergeResult", "(", ")", "AccountMergeResult", "{", "val", ",", "ok", ":=", "u", ".", "GetAccountMergeResult", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm AccountMergeResult is not set\"", ")"...
// MustAccountMergeResult retrieves the AccountMergeResult value from the union, // panicing if the value is not set.
[ "MustAccountMergeResult", "retrieves", "the", "AccountMergeResult", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4177-L4185
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetAccountMergeResult
func (u OperationResultTr) GetAccountMergeResult() (result AccountMergeResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "AccountMergeResult" { result = *u.AccountMergeResult ok = true } return }
go
func (u OperationResultTr) GetAccountMergeResult() (result AccountMergeResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "AccountMergeResult" { result = *u.AccountMergeResult ok = true } return }
[ "func", "(", "u", "OperationResultTr", ")", "GetAccountMergeResult", "(", ")", "(", "result", "AccountMergeResult", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "...
// GetAccountMergeResult retrieves the AccountMergeResult value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetAccountMergeResult", "retrieves", "the", "AccountMergeResult", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4189-L4198
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustInflationResult
func (u OperationResultTr) MustInflationResult() InflationResult { val, ok := u.GetInflationResult() if !ok { panic("arm InflationResult is not set") } return val }
go
func (u OperationResultTr) MustInflationResult() InflationResult { val, ok := u.GetInflationResult() if !ok { panic("arm InflationResult is not set") } return val }
[ "func", "(", "u", "OperationResultTr", ")", "MustInflationResult", "(", ")", "InflationResult", "{", "val", ",", "ok", ":=", "u", ".", "GetInflationResult", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm InflationResult is not set\"", ")", "\n", ...
// MustInflationResult retrieves the InflationResult value from the union, // panicing if the value is not set.
[ "MustInflationResult", "retrieves", "the", "InflationResult", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4202-L4210
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetInflationResult
func (u OperationResultTr) GetInflationResult() (result InflationResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "InflationResult" { result = *u.InflationResult ok = true } return }
go
func (u OperationResultTr) GetInflationResult() (result InflationResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "InflationResult" { result = *u.InflationResult ok = true } return }
[ "func", "(", "u", "OperationResultTr", ")", "GetInflationResult", "(", ")", "(", "result", "InflationResult", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if", ...
// GetInflationResult retrieves the InflationResult value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetInflationResult", "retrieves", "the", "InflationResult", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4214-L4223
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustManageDataResult
func (u OperationResultTr) MustManageDataResult() ManageDataResult { val, ok := u.GetManageDataResult() if !ok { panic("arm ManageDataResult is not set") } return val }
go
func (u OperationResultTr) MustManageDataResult() ManageDataResult { val, ok := u.GetManageDataResult() if !ok { panic("arm ManageDataResult is not set") } return val }
[ "func", "(", "u", "OperationResultTr", ")", "MustManageDataResult", "(", ")", "ManageDataResult", "{", "val", ",", "ok", ":=", "u", ".", "GetManageDataResult", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm ManageDataResult is not set\"", ")", "\n"...
// MustManageDataResult retrieves the ManageDataResult value from the union, // panicing if the value is not set.
[ "MustManageDataResult", "retrieves", "the", "ManageDataResult", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4227-L4235
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetManageDataResult
func (u OperationResultTr) GetManageDataResult() (result ManageDataResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "ManageDataResult" { result = *u.ManageDataResult ok = true } return }
go
func (u OperationResultTr) GetManageDataResult() (result ManageDataResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "ManageDataResult" { result = *u.ManageDataResult ok = true } return }
[ "func", "(", "u", "OperationResultTr", ")", "GetManageDataResult", "(", ")", "(", "result", "ManageDataResult", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if",...
// GetManageDataResult retrieves the ManageDataResult value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetManageDataResult", "retrieves", "the", "ManageDataResult", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4239-L4248
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
func (u OperationResult) ArmForSwitch(sw int32) (string, bool) { switch OperationResultCode(sw) { case OperationResultCodeOpInner: return "Tr", true default: return "", true } }
go
func (u OperationResult) ArmForSwitch(sw int32) (string, bool) { switch OperationResultCode(sw) { case OperationResultCodeOpInner: return "Tr", true default: return "", true } }
[ "func", "(", "u", "OperationResult", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "OperationResultCode", "(", "sw", ")", "{", "case", "OperationResultCodeOpInner", ":", "return", "\"Tr\"", ",", "true", "\n", ...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of OperationResult
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "OperationResult" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4298-L4305
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewOperationResult
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 ...
go
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 ...
[ "func", "NewOperationResult", "(", "code", "OperationResultCode", ",", "value", "interface", "{", "}", ")", "(", "result", "OperationResult", ",", "err", "error", ")", "{", "result", ".", "Code", "=", "code", "\n", "switch", "OperationResultCode", "(", "code",...
// NewOperationResult creates a new OperationResult.
[ "NewOperationResult", "creates", "a", "new", "OperationResult", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4308-L4322
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustTr
func (u OperationResult) MustTr() OperationResultTr { val, ok := u.GetTr() if !ok { panic("arm Tr is not set") } return val }
go
func (u OperationResult) MustTr() OperationResultTr { val, ok := u.GetTr() if !ok { panic("arm Tr is not set") } return val }
[ "func", "(", "u", "OperationResult", ")", "MustTr", "(", ")", "OperationResultTr", "{", "val", ",", "ok", ":=", "u", ".", "GetTr", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm Tr is not set\"", ")", "\n", "}", "\n", "return", "val", "\n...
// MustTr retrieves the Tr value from the union, // panicing if the value is not set.
[ "MustTr", "retrieves", "the", "Tr", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4326-L4334
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetTr
func (u OperationResult) GetTr() (result OperationResultTr, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Code)) if armName == "Tr" { result = *u.Tr ok = true } return }
go
func (u OperationResult) GetTr() (result OperationResultTr, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Code)) if armName == "Tr" { result = *u.Tr ok = true } return }
[ "func", "(", "u", "OperationResult", ")", "GetTr", "(", ")", "(", "result", "OperationResultTr", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Code", ")", ")", "\n", "if", "armName", ...
// GetTr retrieves the Tr value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetTr", "retrieves", "the", "Tr", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4338-L4347
test
stellar/go-stellar-base
xdr/xdr_generated.go
ValidEnum
func (e TransactionResultCode) ValidEnum(v int32) bool { _, ok := transactionResultCodeMap[v] return ok }
go
func (e TransactionResultCode) ValidEnum(v int32) bool { _, ok := transactionResultCodeMap[v] return ok }
[ "func", "(", "e", "TransactionResultCode", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "ok", ":=", "transactionResultCodeMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
// ValidEnum validates a proposed value for this enum. Implements // the Enum interface for TransactionResultCode
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "TransactionResultCode" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4404-L4407
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
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
func (u TransactionResultResult) ArmForSwitch(sw int32) (string, bool) { switch TransactionResultCode(sw) { case TransactionResultCodeTxSuccess: return "Results", true case TransactionResultCodeTxFailed: return "Results", true default: return "", true } }
[ "func", "(", "u", "TransactionResultResult", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "TransactionResultCode", "(", "sw", ")", "{", "case", "TransactionResultCodeTxSuccess", ":", "return", "\"Results\"", ",", ...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of TransactionResultResult
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "TransactionResultResult" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4439-L4448
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewTransactionResultResult
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 []Oper...
go
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 []Oper...
[ "func", "NewTransactionResultResult", "(", "code", "TransactionResultCode", ",", "value", "interface", "{", "}", ")", "(", "result", "TransactionResultResult", ",", "err", "error", ")", "{", "result", ".", "Code", "=", "code", "\n", "switch", "TransactionResultCod...
// NewTransactionResultResult creates a new TransactionResultResult.
[ "NewTransactionResultResult", "creates", "a", "new", "TransactionResultResult", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4451-L4472
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustResults
func (u TransactionResultResult) MustResults() []OperationResult { val, ok := u.GetResults() if !ok { panic("arm Results is not set") } return val }
go
func (u TransactionResultResult) MustResults() []OperationResult { val, ok := u.GetResults() if !ok { panic("arm Results is not set") } return val }
[ "func", "(", "u", "TransactionResultResult", ")", "MustResults", "(", ")", "[", "]", "OperationResult", "{", "val", ",", "ok", ":=", "u", ".", "GetResults", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm Results is not set\"", ")", "\n", "}",...
// MustResults retrieves the Results value from the union, // panicing if the value is not set.
[ "MustResults", "retrieves", "the", "Results", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4476-L4484
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetResults
func (u TransactionResultResult) GetResults() (result []OperationResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Code)) if armName == "Results" { result = *u.Results ok = true } return }
go
func (u TransactionResultResult) GetResults() (result []OperationResult, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Code)) if armName == "Results" { result = *u.Results ok = true } return }
[ "func", "(", "u", "TransactionResultResult", ")", "GetResults", "(", ")", "(", "result", "[", "]", "OperationResult", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Code", ")", ")", "\n...
// GetResults retrieves the Results value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetResults", "retrieves", "the", "Results", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4488-L4497
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewTransactionResultExt
func NewTransactionResultExt(v int32, value interface{}) (result TransactionResultExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
go
func NewTransactionResultExt(v int32, value interface{}) (result TransactionResultExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
[ "func", "NewTransactionResultExt", "(", "v", "int32", ",", "value", "interface", "{", "}", ")", "(", "result", "TransactionResultExt", ",", "err", "error", ")", "{", "result", ".", "V", "=", "v", "\n", "switch", "int32", "(", "v", ")", "{", "case", "0"...
// NewTransactionResultExt creates a new TransactionResultExt.
[ "NewTransactionResultExt", "creates", "a", "new", "TransactionResultExt", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4528-L4535
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewStellarValueExt
func NewStellarValueExt(v int32, value interface{}) (result StellarValueExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
go
func NewStellarValueExt(v int32, value interface{}) (result StellarValueExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
[ "func", "NewStellarValueExt", "(", "v", "int32", ",", "value", "interface", "{", "}", ")", "(", "result", "StellarValueExt", ",", "err", "error", ")", "{", "result", ".", "V", "=", "v", "\n", "switch", "int32", "(", "v", ")", "{", "case", "0", ":", ...
// NewStellarValueExt creates a new StellarValueExt.
[ "NewStellarValueExt", "creates", "a", "new", "StellarValueExt", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4603-L4610
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewLedgerHeaderExt
func NewLedgerHeaderExt(v int32, value interface{}) (result LedgerHeaderExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
go
func NewLedgerHeaderExt(v int32, value interface{}) (result LedgerHeaderExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
[ "func", "NewLedgerHeaderExt", "(", "v", "int32", ",", "value", "interface", "{", "}", ")", "(", "result", "LedgerHeaderExt", ",", "err", "error", ")", "{", "result", ".", "V", "=", "v", "\n", "switch", "int32", "(", "v", ")", "{", "case", "0", ":", ...
// NewLedgerHeaderExt creates a new LedgerHeaderExt.
[ "NewLedgerHeaderExt", "creates", "a", "new", "LedgerHeaderExt", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4671-L4678
test
stellar/go-stellar-base
xdr/xdr_generated.go
ValidEnum
func (e LedgerUpgradeType) ValidEnum(v int32) bool { _, ok := ledgerUpgradeTypeMap[v] return ok }
go
func (e LedgerUpgradeType) ValidEnum(v int32) bool { _, ok := ledgerUpgradeTypeMap[v] return ok }
[ "func", "(", "e", "LedgerUpgradeType", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "ok", ":=", "ledgerUpgradeTypeMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
// ValidEnum validates a proposed value for this enum. Implements // the Enum interface for LedgerUpgradeType
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "LedgerUpgradeType" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4763-L4766
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
func (u LedgerUpgrade) ArmForSwitch(sw int32) (string, bool) { switch LedgerUpgradeType(sw) { case LedgerUpgradeTypeLedgerUpgradeVersion: return "NewLedgerVersion", true case LedgerUpgradeTypeLedgerUpgradeBaseFee: return "NewBaseFee", true case LedgerUpgradeTypeLedgerUpgradeMaxTxSetSize: return "NewMaxTxSetSi...
go
func (u LedgerUpgrade) ArmForSwitch(sw int32) (string, bool) { switch LedgerUpgradeType(sw) { case LedgerUpgradeTypeLedgerUpgradeVersion: return "NewLedgerVersion", true case LedgerUpgradeTypeLedgerUpgradeBaseFee: return "NewBaseFee", true case LedgerUpgradeTypeLedgerUpgradeMaxTxSetSize: return "NewMaxTxSetSi...
[ "func", "(", "u", "LedgerUpgrade", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "LedgerUpgradeType", "(", "sw", ")", "{", "case", "LedgerUpgradeTypeLedgerUpgradeVersion", ":", "return", "\"NewLedgerVersion\"", ","...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of LedgerUpgrade
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "LedgerUpgrade" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4801-L4811
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewLedgerUpgrade
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.New...
go
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.New...
[ "func", "NewLedgerUpgrade", "(", "aType", "LedgerUpgradeType", ",", "value", "interface", "{", "}", ")", "(", "result", "LedgerUpgrade", ",", "err", "error", ")", "{", "result", ".", "Type", "=", "aType", "\n", "switch", "LedgerUpgradeType", "(", "aType", ")...
// NewLedgerUpgrade creates a new LedgerUpgrade.
[ "NewLedgerUpgrade", "creates", "a", "new", "LedgerUpgrade", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4814-L4840
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustNewLedgerVersion
func (u LedgerUpgrade) MustNewLedgerVersion() Uint32 { val, ok := u.GetNewLedgerVersion() if !ok { panic("arm NewLedgerVersion is not set") } return val }
go
func (u LedgerUpgrade) MustNewLedgerVersion() Uint32 { val, ok := u.GetNewLedgerVersion() if !ok { panic("arm NewLedgerVersion is not set") } return val }
[ "func", "(", "u", "LedgerUpgrade", ")", "MustNewLedgerVersion", "(", ")", "Uint32", "{", "val", ",", "ok", ":=", "u", ".", "GetNewLedgerVersion", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm NewLedgerVersion is not set\"", ")", "\n", "}", "\n...
// MustNewLedgerVersion retrieves the NewLedgerVersion value from the union, // panicing if the value is not set.
[ "MustNewLedgerVersion", "retrieves", "the", "NewLedgerVersion", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4844-L4852
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetNewLedgerVersion
func (u LedgerUpgrade) GetNewLedgerVersion() (result Uint32, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "NewLedgerVersion" { result = *u.NewLedgerVersion ok = true } return }
go
func (u LedgerUpgrade) GetNewLedgerVersion() (result Uint32, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "NewLedgerVersion" { result = *u.NewLedgerVersion ok = true } return }
[ "func", "(", "u", "LedgerUpgrade", ")", "GetNewLedgerVersion", "(", ")", "(", "result", "Uint32", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if", "armName", ...
// GetNewLedgerVersion retrieves the NewLedgerVersion value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetNewLedgerVersion", "retrieves", "the", "NewLedgerVersion", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4856-L4865
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustNewBaseFee
func (u LedgerUpgrade) MustNewBaseFee() Uint32 { val, ok := u.GetNewBaseFee() if !ok { panic("arm NewBaseFee is not set") } return val }
go
func (u LedgerUpgrade) MustNewBaseFee() Uint32 { val, ok := u.GetNewBaseFee() if !ok { panic("arm NewBaseFee is not set") } return val }
[ "func", "(", "u", "LedgerUpgrade", ")", "MustNewBaseFee", "(", ")", "Uint32", "{", "val", ",", "ok", ":=", "u", ".", "GetNewBaseFee", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm NewBaseFee is not set\"", ")", "\n", "}", "\n", "return", "...
// MustNewBaseFee retrieves the NewBaseFee value from the union, // panicing if the value is not set.
[ "MustNewBaseFee", "retrieves", "the", "NewBaseFee", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4869-L4877
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetNewBaseFee
func (u LedgerUpgrade) GetNewBaseFee() (result Uint32, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "NewBaseFee" { result = *u.NewBaseFee ok = true } return }
go
func (u LedgerUpgrade) GetNewBaseFee() (result Uint32, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "NewBaseFee" { result = *u.NewBaseFee ok = true } return }
[ "func", "(", "u", "LedgerUpgrade", ")", "GetNewBaseFee", "(", ")", "(", "result", "Uint32", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if", "armName", "=="...
// GetNewBaseFee retrieves the NewBaseFee value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetNewBaseFee", "retrieves", "the", "NewBaseFee", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4881-L4890
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustNewMaxTxSetSize
func (u LedgerUpgrade) MustNewMaxTxSetSize() Uint32 { val, ok := u.GetNewMaxTxSetSize() if !ok { panic("arm NewMaxTxSetSize is not set") } return val }
go
func (u LedgerUpgrade) MustNewMaxTxSetSize() Uint32 { val, ok := u.GetNewMaxTxSetSize() if !ok { panic("arm NewMaxTxSetSize is not set") } return val }
[ "func", "(", "u", "LedgerUpgrade", ")", "MustNewMaxTxSetSize", "(", ")", "Uint32", "{", "val", ",", "ok", ":=", "u", ".", "GetNewMaxTxSetSize", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm NewMaxTxSetSize is not set\"", ")", "\n", "}", "\n", ...
// MustNewMaxTxSetSize retrieves the NewMaxTxSetSize value from the union, // panicing if the value is not set.
[ "MustNewMaxTxSetSize", "retrieves", "the", "NewMaxTxSetSize", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4894-L4902
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetNewMaxTxSetSize
func (u LedgerUpgrade) GetNewMaxTxSetSize() (result Uint32, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "NewMaxTxSetSize" { result = *u.NewMaxTxSetSize ok = true } return }
go
func (u LedgerUpgrade) GetNewMaxTxSetSize() (result Uint32, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "NewMaxTxSetSize" { result = *u.NewMaxTxSetSize ok = true } return }
[ "func", "(", "u", "LedgerUpgrade", ")", "GetNewMaxTxSetSize", "(", ")", "(", "result", "Uint32", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if", "armName", ...
// GetNewMaxTxSetSize retrieves the NewMaxTxSetSize value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetNewMaxTxSetSize", "retrieves", "the", "NewMaxTxSetSize", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L4906-L4915
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
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 "-", f...
go
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 "-", f...
[ "func", "(", "u", "LedgerKey", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "LedgerEntryType", "(", "sw", ")", "{", "case", "LedgerEntryTypeAccount", ":", "return", "\"Account\"", ",", "true", "\n", "case", ...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of LedgerKey
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "LedgerKey" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5015-L5027
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewLedgerKey
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 = ...
go
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 = ...
[ "func", "NewLedgerKey", "(", "aType", "LedgerEntryType", ",", "value", "interface", "{", "}", ")", "(", "result", "LedgerKey", ",", "err", "error", ")", "{", "result", ".", "Type", "=", "aType", "\n", "switch", "LedgerEntryType", "(", "aType", ")", "{", ...
// NewLedgerKey creates a new LedgerKey.
[ "NewLedgerKey", "creates", "a", "new", "LedgerKey", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5030-L5063
test
stellar/go-stellar-base
xdr/xdr_generated.go
ValidEnum
func (e BucketEntryType) ValidEnum(v int32) bool { _, ok := bucketEntryTypeMap[v] return ok }
go
func (e BucketEntryType) ValidEnum(v int32) bool { _, ok := bucketEntryTypeMap[v] return ok }
[ "func", "(", "e", "BucketEntryType", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "ok", ":=", "bucketEntryTypeMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
// ValidEnum validates a proposed value for this enum. Implements // the Enum interface for BucketEntryType
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "BucketEntryType" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5187-L5190
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
func (u BucketEntry) ArmForSwitch(sw int32) (string, bool) { switch BucketEntryType(sw) { case BucketEntryTypeLiveentry: return "LiveEntry", true case BucketEntryTypeDeadentry: return "DeadEntry", true } return "-", false }
go
func (u BucketEntry) ArmForSwitch(sw int32) (string, bool) { switch BucketEntryType(sw) { case BucketEntryTypeLiveentry: return "LiveEntry", true case BucketEntryTypeDeadentry: return "DeadEntry", true } return "-", false }
[ "func", "(", "u", "BucketEntry", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "BucketEntryType", "(", "sw", ")", "{", "case", "BucketEntryTypeLiveentry", ":", "return", "\"LiveEntry\"", ",", "true", "\n", "c...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of BucketEntry
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "BucketEntry" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5223-L5231
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewBucketEntry
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 = &t...
go
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 = &t...
[ "func", "NewBucketEntry", "(", "aType", "BucketEntryType", ",", "value", "interface", "{", "}", ")", "(", "result", "BucketEntry", ",", "err", "error", ")", "{", "result", ".", "Type", "=", "aType", "\n", "switch", "BucketEntryType", "(", "aType", ")", "{"...
// NewBucketEntry creates a new BucketEntry.
[ "NewBucketEntry", "creates", "a", "new", "BucketEntry", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5234-L5253
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustLiveEntry
func (u BucketEntry) MustLiveEntry() LedgerEntry { val, ok := u.GetLiveEntry() if !ok { panic("arm LiveEntry is not set") } return val }
go
func (u BucketEntry) MustLiveEntry() LedgerEntry { val, ok := u.GetLiveEntry() if !ok { panic("arm LiveEntry is not set") } return val }
[ "func", "(", "u", "BucketEntry", ")", "MustLiveEntry", "(", ")", "LedgerEntry", "{", "val", ",", "ok", ":=", "u", ".", "GetLiveEntry", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm LiveEntry is not set\"", ")", "\n", "}", "\n", "return", "...
// MustLiveEntry retrieves the LiveEntry value from the union, // panicing if the value is not set.
[ "MustLiveEntry", "retrieves", "the", "LiveEntry", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5257-L5265
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetLiveEntry
func (u BucketEntry) GetLiveEntry() (result LedgerEntry, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "LiveEntry" { result = *u.LiveEntry ok = true } return }
go
func (u BucketEntry) GetLiveEntry() (result LedgerEntry, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "LiveEntry" { result = *u.LiveEntry ok = true } return }
[ "func", "(", "u", "BucketEntry", ")", "GetLiveEntry", "(", ")", "(", "result", "LedgerEntry", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if", "armName", "=...
// GetLiveEntry retrieves the LiveEntry value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetLiveEntry", "retrieves", "the", "LiveEntry", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5269-L5278
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustDeadEntry
func (u BucketEntry) MustDeadEntry() LedgerKey { val, ok := u.GetDeadEntry() if !ok { panic("arm DeadEntry is not set") } return val }
go
func (u BucketEntry) MustDeadEntry() LedgerKey { val, ok := u.GetDeadEntry() if !ok { panic("arm DeadEntry is not set") } return val }
[ "func", "(", "u", "BucketEntry", ")", "MustDeadEntry", "(", ")", "LedgerKey", "{", "val", ",", "ok", ":=", "u", ".", "GetDeadEntry", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm DeadEntry is not set\"", ")", "\n", "}", "\n", "return", "va...
// MustDeadEntry retrieves the DeadEntry value from the union, // panicing if the value is not set.
[ "MustDeadEntry", "retrieves", "the", "DeadEntry", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5282-L5290
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetDeadEntry
func (u BucketEntry) GetDeadEntry() (result LedgerKey, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "DeadEntry" { result = *u.DeadEntry ok = true } return }
go
func (u BucketEntry) GetDeadEntry() (result LedgerKey, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "DeadEntry" { result = *u.DeadEntry ok = true } return }
[ "func", "(", "u", "BucketEntry", ")", "GetDeadEntry", "(", ")", "(", "result", "LedgerKey", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if", "armName", "=="...
// GetDeadEntry retrieves the DeadEntry value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetDeadEntry", "retrieves", "the", "DeadEntry", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5294-L5303
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewTransactionHistoryEntryExt
func NewTransactionHistoryEntryExt(v int32, value interface{}) (result TransactionHistoryEntryExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
go
func NewTransactionHistoryEntryExt(v int32, value interface{}) (result TransactionHistoryEntryExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
[ "func", "NewTransactionHistoryEntryExt", "(", "v", "int32", ",", "value", "interface", "{", "}", ")", "(", "result", "TransactionHistoryEntryExt", ",", "err", "error", ")", "{", "result", ".", "V", "=", "v", "\n", "switch", "int32", "(", "v", ")", "{", "...
// NewTransactionHistoryEntryExt creates a new TransactionHistoryEntryExt.
[ "NewTransactionHistoryEntryExt", "creates", "a", "new", "TransactionHistoryEntryExt", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5377-L5384
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
func (u TransactionHistoryResultEntryExt) ArmForSwitch(sw int32) (string, bool) { switch int32(sw) { case 0: return "", true } return "-", false }
go
func (u TransactionHistoryResultEntryExt) ArmForSwitch(sw int32) (string, bool) { switch int32(sw) { case 0: return "", true } return "-", false }
[ "func", "(", "u", "TransactionHistoryResultEntryExt", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "int32", "(", "sw", ")", "{", "case", "0", ":", "return", "\"\"", ",", "true", "\n", "}", "\n", "return"...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of TransactionHistoryResultEntryExt
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "TransactionHistoryResultEntryExt" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5428-L5434
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewTransactionHistoryResultEntryExt
func NewTransactionHistoryResultEntryExt(v int32, value interface{}) (result TransactionHistoryResultEntryExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
go
func NewTransactionHistoryResultEntryExt(v int32, value interface{}) (result TransactionHistoryResultEntryExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
[ "func", "NewTransactionHistoryResultEntryExt", "(", "v", "int32", ",", "value", "interface", "{", "}", ")", "(", "result", "TransactionHistoryResultEntryExt", ",", "err", "error", ")", "{", "result", ".", "V", "=", "v", "\n", "switch", "int32", "(", "v", ")"...
// NewTransactionHistoryResultEntryExt creates a new TransactionHistoryResultEntryExt.
[ "NewTransactionHistoryResultEntryExt", "creates", "a", "new", "TransactionHistoryResultEntryExt", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5437-L5444
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewLedgerHeaderHistoryEntryExt
func NewLedgerHeaderHistoryEntryExt(v int32, value interface{}) (result LedgerHeaderHistoryEntryExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
go
func NewLedgerHeaderHistoryEntryExt(v int32, value interface{}) (result LedgerHeaderHistoryEntryExt, err error) { result.V = v switch int32(v) { case 0: // void } return }
[ "func", "NewLedgerHeaderHistoryEntryExt", "(", "v", "int32", ",", "value", "interface", "{", "}", ")", "(", "result", "LedgerHeaderHistoryEntryExt", ",", "err", "error", ")", "{", "result", ".", "V", "=", "v", "\n", "switch", "int32", "(", "v", ")", "{", ...
// NewLedgerHeaderHistoryEntryExt creates a new LedgerHeaderHistoryEntryExt.
[ "NewLedgerHeaderHistoryEntryExt", "creates", "a", "new", "LedgerHeaderHistoryEntryExt", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5497-L5504
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewScpHistoryEntry
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
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 }
[ "func", "NewScpHistoryEntry", "(", "v", "int32", ",", "value", "interface", "{", "}", ")", "(", "result", "ScpHistoryEntry", ",", "err", "error", ")", "{", "result", ".", "V", "=", "v", "\n", "switch", "int32", "(", "v", ")", "{", "case", "0", ":", ...
// NewScpHistoryEntry creates a new ScpHistoryEntry.
[ "NewScpHistoryEntry", "creates", "a", "new", "ScpHistoryEntry", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5584-L5596
test
stellar/go-stellar-base
xdr/xdr_generated.go
ValidEnum
func (e LedgerEntryChangeType) ValidEnum(v int32) bool { _, ok := ledgerEntryChangeTypeMap[v] return ok }
go
func (e LedgerEntryChangeType) ValidEnum(v int32) bool { _, ok := ledgerEntryChangeTypeMap[v] return ok }
[ "func", "(", "e", "LedgerEntryChangeType", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "ok", ":=", "ledgerEntryChangeTypeMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
// ValidEnum validates a proposed value for this enum. Implements // the Enum interface for LedgerEntryChangeType
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "LedgerEntryChangeType" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5651-L5654
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
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 ...
go
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 ...
[ "func", "(", "u", "LedgerEntryChange", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "LedgerEntryChangeType", "(", "sw", ")", "{", "case", "LedgerEntryChangeTypeLedgerEntryCreated", ":", "return", "\"Created\"", ",...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of LedgerEntryChange
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "LedgerEntryChange" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5692-L5704
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewLedgerEntryChange
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"...
go
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"...
[ "func", "NewLedgerEntryChange", "(", "aType", "LedgerEntryChangeType", ",", "value", "interface", "{", "}", ")", "(", "result", "LedgerEntryChange", ",", "err", "error", ")", "{", "result", ".", "Type", "=", "aType", "\n", "switch", "LedgerEntryChangeType", "(",...
// NewLedgerEntryChange creates a new LedgerEntryChange.
[ "NewLedgerEntryChange", "creates", "a", "new", "LedgerEntryChange", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5707-L5740
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustCreated
func (u LedgerEntryChange) MustCreated() LedgerEntry { val, ok := u.GetCreated() if !ok { panic("arm Created is not set") } return val }
go
func (u LedgerEntryChange) MustCreated() LedgerEntry { val, ok := u.GetCreated() if !ok { panic("arm Created is not set") } return val }
[ "func", "(", "u", "LedgerEntryChange", ")", "MustCreated", "(", ")", "LedgerEntry", "{", "val", ",", "ok", ":=", "u", ".", "GetCreated", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm Created is not set\"", ")", "\n", "}", "\n", "return", "...
// MustCreated retrieves the Created value from the union, // panicing if the value is not set.
[ "MustCreated", "retrieves", "the", "Created", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5744-L5752
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetCreated
func (u LedgerEntryChange) GetCreated() (result LedgerEntry, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "Created" { result = *u.Created ok = true } return }
go
func (u LedgerEntryChange) GetCreated() (result LedgerEntry, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "Created" { result = *u.Created ok = true } return }
[ "func", "(", "u", "LedgerEntryChange", ")", "GetCreated", "(", ")", "(", "result", "LedgerEntry", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if", "armName", ...
// GetCreated retrieves the Created value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetCreated", "retrieves", "the", "Created", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5756-L5765
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustUpdated
func (u LedgerEntryChange) MustUpdated() LedgerEntry { val, ok := u.GetUpdated() if !ok { panic("arm Updated is not set") } return val }
go
func (u LedgerEntryChange) MustUpdated() LedgerEntry { val, ok := u.GetUpdated() if !ok { panic("arm Updated is not set") } return val }
[ "func", "(", "u", "LedgerEntryChange", ")", "MustUpdated", "(", ")", "LedgerEntry", "{", "val", ",", "ok", ":=", "u", ".", "GetUpdated", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm Updated is not set\"", ")", "\n", "}", "\n", "return", "...
// MustUpdated retrieves the Updated value from the union, // panicing if the value is not set.
[ "MustUpdated", "retrieves", "the", "Updated", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5769-L5777
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetUpdated
func (u LedgerEntryChange) GetUpdated() (result LedgerEntry, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "Updated" { result = *u.Updated ok = true } return }
go
func (u LedgerEntryChange) GetUpdated() (result LedgerEntry, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "Updated" { result = *u.Updated ok = true } return }
[ "func", "(", "u", "LedgerEntryChange", ")", "GetUpdated", "(", ")", "(", "result", "LedgerEntry", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if", "armName", ...
// GetUpdated retrieves the Updated value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetUpdated", "retrieves", "the", "Updated", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5781-L5790
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustRemoved
func (u LedgerEntryChange) MustRemoved() LedgerKey { val, ok := u.GetRemoved() if !ok { panic("arm Removed is not set") } return val }
go
func (u LedgerEntryChange) MustRemoved() LedgerKey { val, ok := u.GetRemoved() if !ok { panic("arm Removed is not set") } return val }
[ "func", "(", "u", "LedgerEntryChange", ")", "MustRemoved", "(", ")", "LedgerKey", "{", "val", ",", "ok", ":=", "u", ".", "GetRemoved", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm Removed is not set\"", ")", "\n", "}", "\n", "return", "va...
// MustRemoved retrieves the Removed value from the union, // panicing if the value is not set.
[ "MustRemoved", "retrieves", "the", "Removed", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5794-L5802
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetRemoved
func (u LedgerEntryChange) GetRemoved() (result LedgerKey, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "Removed" { result = *u.Removed ok = true } return }
go
func (u LedgerEntryChange) GetRemoved() (result LedgerKey, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "Removed" { result = *u.Removed ok = true } return }
[ "func", "(", "u", "LedgerEntryChange", ")", "GetRemoved", "(", ")", "(", "result", "LedgerKey", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if", "armName", ...
// GetRemoved retrieves the Removed value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetRemoved", "retrieves", "the", "Removed", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5806-L5815
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustState
func (u LedgerEntryChange) MustState() LedgerEntry { val, ok := u.GetState() if !ok { panic("arm State is not set") } return val }
go
func (u LedgerEntryChange) MustState() LedgerEntry { val, ok := u.GetState() if !ok { panic("arm State is not set") } return val }
[ "func", "(", "u", "LedgerEntryChange", ")", "MustState", "(", ")", "LedgerEntry", "{", "val", ",", "ok", ":=", "u", ".", "GetState", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm State is not set\"", ")", "\n", "}", "\n", "return", "val", ...
// MustState retrieves the State value from the union, // panicing if the value is not set.
[ "MustState", "retrieves", "the", "State", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5819-L5827
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetState
func (u LedgerEntryChange) GetState() (result LedgerEntry, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "State" { result = *u.State ok = true } return }
go
func (u LedgerEntryChange) GetState() (result LedgerEntry, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "State" { result = *u.State ok = true } return }
[ "func", "(", "u", "LedgerEntryChange", ")", "GetState", "(", ")", "(", "result", "LedgerEntry", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if", "armName", ...
// GetState retrieves the State value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetState", "retrieves", "the", "State", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5831-L5840
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewTransactionMeta
func NewTransactionMeta(v int32, value interface{}) (result TransactionMeta, err error) { result.V = v switch int32(v) { case 0: tv, ok := value.([]OperationMeta) if !ok { err = fmt.Errorf("invalid value, must be []OperationMeta") return } result.Operations = &tv } return }
go
func NewTransactionMeta(v int32, value interface{}) (result TransactionMeta, err error) { result.V = v switch int32(v) { case 0: tv, ok := value.([]OperationMeta) if !ok { err = fmt.Errorf("invalid value, must be []OperationMeta") return } result.Operations = &tv } return }
[ "func", "NewTransactionMeta", "(", "v", "int32", ",", "value", "interface", "{", "}", ")", "(", "result", "TransactionMeta", ",", "err", "error", ")", "{", "result", ".", "V", "=", "v", "\n", "switch", "int32", "(", "v", ")", "{", "case", "0", ":", ...
// NewTransactionMeta creates a new TransactionMeta.
[ "NewTransactionMeta", "creates", "a", "new", "TransactionMeta", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5889-L5901
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustOperations
func (u TransactionMeta) MustOperations() []OperationMeta { val, ok := u.GetOperations() if !ok { panic("arm Operations is not set") } return val }
go
func (u TransactionMeta) MustOperations() []OperationMeta { val, ok := u.GetOperations() if !ok { panic("arm Operations is not set") } return val }
[ "func", "(", "u", "TransactionMeta", ")", "MustOperations", "(", ")", "[", "]", "OperationMeta", "{", "val", ",", "ok", ":=", "u", ".", "GetOperations", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm Operations is not set\"", ")", "\n", "}", ...
// MustOperations retrieves the Operations value from the union, // panicing if the value is not set.
[ "MustOperations", "retrieves", "the", "Operations", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5905-L5913
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetOperations
func (u TransactionMeta) GetOperations() (result []OperationMeta, ok bool) { armName, _ := u.ArmForSwitch(int32(u.V)) if armName == "Operations" { result = *u.Operations ok = true } return }
go
func (u TransactionMeta) GetOperations() (result []OperationMeta, ok bool) { armName, _ := u.ArmForSwitch(int32(u.V)) if armName == "Operations" { result = *u.Operations ok = true } return }
[ "func", "(", "u", "TransactionMeta", ")", "GetOperations", "(", ")", "(", "result", "[", "]", "OperationMeta", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "V", ")", ")", "\n", "if",...
// GetOperations retrieves the Operations value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetOperations", "retrieves", "the", "Operations", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5917-L5926
test
stellar/go-stellar-base
xdr/xdr_generated.go
ValidEnum
func (e ErrorCode) ValidEnum(v int32) bool { _, ok := errorCodeMap[v] return ok }
go
func (e ErrorCode) ValidEnum(v int32) bool { _, ok := errorCodeMap[v] return ok }
[ "func", "(", "e", "ErrorCode", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "ok", ":=", "errorCodeMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
// ValidEnum validates a proposed value for this enum. Implements // the Enum interface for ErrorCode
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "ErrorCode" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L5959-L5962
test
stellar/go-stellar-base
xdr/xdr_generated.go
ValidEnum
func (e IpAddrType) ValidEnum(v int32) bool { _, ok := ipAddrTypeMap[v] return ok }
go
func (e IpAddrType) ValidEnum(v int32) bool { _, ok := ipAddrTypeMap[v] return ok }
[ "func", "(", "e", "IpAddrType", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "ok", ":=", "ipAddrTypeMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
// ValidEnum validates a proposed value for this enum. Implements // the Enum interface for IpAddrType
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "IpAddrType" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L6060-L6063
test
stellar/go-stellar-base
xdr/xdr_generated.go
ArmForSwitch
func (u PeerAddressIp) ArmForSwitch(sw int32) (string, bool) { switch IpAddrType(sw) { case IpAddrTypeIPv4: return "Ipv4", true case IpAddrTypeIPv6: return "Ipv6", true } return "-", false }
go
func (u PeerAddressIp) ArmForSwitch(sw int32) (string, bool) { switch IpAddrType(sw) { case IpAddrTypeIPv4: return "Ipv4", true case IpAddrTypeIPv6: return "Ipv6", true } return "-", false }
[ "func", "(", "u", "PeerAddressIp", ")", "ArmForSwitch", "(", "sw", "int32", ")", "(", "string", ",", "bool", ")", "{", "switch", "IpAddrType", "(", "sw", ")", "{", "case", "IpAddrTypeIPv4", ":", "return", "\"Ipv4\"", ",", "true", "\n", "case", "IpAddrTyp...
// ArmForSwitch returns which field name should be used for storing // the value for an instance of PeerAddressIp
[ "ArmForSwitch", "returns", "which", "field", "name", "should", "be", "used", "for", "storing", "the", "value", "for", "an", "instance", "of", "PeerAddressIp" ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L6095-L6103
test
stellar/go-stellar-base
xdr/xdr_generated.go
NewPeerAddressIp
func NewPeerAddressIp(aType IpAddrType, value interface{}) (result PeerAddressIp, err error) { result.Type = aType switch IpAddrType(aType) { case IpAddrTypeIPv4: tv, ok := value.([4]byte) if !ok { err = fmt.Errorf("invalid value, must be [4]byte") return } result.Ipv4 = &tv case IpAddrTypeIPv6: tv,...
go
func NewPeerAddressIp(aType IpAddrType, value interface{}) (result PeerAddressIp, err error) { result.Type = aType switch IpAddrType(aType) { case IpAddrTypeIPv4: tv, ok := value.([4]byte) if !ok { err = fmt.Errorf("invalid value, must be [4]byte") return } result.Ipv4 = &tv case IpAddrTypeIPv6: tv,...
[ "func", "NewPeerAddressIp", "(", "aType", "IpAddrType", ",", "value", "interface", "{", "}", ")", "(", "result", "PeerAddressIp", ",", "err", "error", ")", "{", "result", ".", "Type", "=", "aType", "\n", "switch", "IpAddrType", "(", "aType", ")", "{", "c...
// NewPeerAddressIp creates a new PeerAddressIp.
[ "NewPeerAddressIp", "creates", "a", "new", "PeerAddressIp", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L6106-L6125
test
stellar/go-stellar-base
xdr/xdr_generated.go
MustIpv4
func (u PeerAddressIp) MustIpv4() [4]byte { val, ok := u.GetIpv4() if !ok { panic("arm Ipv4 is not set") } return val }
go
func (u PeerAddressIp) MustIpv4() [4]byte { val, ok := u.GetIpv4() if !ok { panic("arm Ipv4 is not set") } return val }
[ "func", "(", "u", "PeerAddressIp", ")", "MustIpv4", "(", ")", "[", "4", "]", "byte", "{", "val", ",", "ok", ":=", "u", ".", "GetIpv4", "(", ")", "\n", "if", "!", "ok", "{", "panic", "(", "\"arm Ipv4 is not set\"", ")", "\n", "}", "\n", "return", ...
// MustIpv4 retrieves the Ipv4 value from the union, // panicing if the value is not set.
[ "MustIpv4", "retrieves", "the", "Ipv4", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L6129-L6137
test
stellar/go-stellar-base
xdr/xdr_generated.go
GetIpv4
func (u PeerAddressIp) GetIpv4() (result [4]byte, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "Ipv4" { result = *u.Ipv4 ok = true } return }
go
func (u PeerAddressIp) GetIpv4() (result [4]byte, ok bool) { armName, _ := u.ArmForSwitch(int32(u.Type)) if armName == "Ipv4" { result = *u.Ipv4 ok = true } return }
[ "func", "(", "u", "PeerAddressIp", ")", "GetIpv4", "(", ")", "(", "result", "[", "4", "]", "byte", ",", "ok", "bool", ")", "{", "armName", ",", "_", ":=", "u", ".", "ArmForSwitch", "(", "int32", "(", "u", ".", "Type", ")", ")", "\n", "if", "arm...
// GetIpv4 retrieves the Ipv4 value from the union, // returning ok if the union's switch indicated the value is valid.
[ "GetIpv4", "retrieves", "the", "Ipv4", "value", "from", "the", "union", "returning", "ok", "if", "the", "union", "s", "switch", "indicated", "the", "value", "is", "valid", "." ]
79c570612c0b461db178aa8949d9f13cafc2a7c9
https://github.com/stellar/go-stellar-base/blob/79c570612c0b461db178aa8949d9f13cafc2a7c9/xdr/xdr_generated.go#L6141-L6150
test