rpcbinding: adjust comment of FromStackItem
template methods
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
2ce1454ef5
commit
8ae4a1e957
8 changed files with 70 additions and 70 deletions
|
@ -363,8 +363,8 @@ func SetAdminEventsFromApplicationLog(log *result.ApplicationLog) ([]*SetAdminEv
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to SetAdminEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to SetAdminEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *SetAdminEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
@ -456,8 +456,8 @@ func RenewEventsFromApplicationLog(log *result.ApplicationLog) ([]*RenewEvent, e
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to RenewEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to RenewEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *RenewEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
|
4
cli/smartcontract/testdata/nex/nex.go
vendored
4
cli/smartcontract/testdata/nex/nex.go
vendored
|
@ -267,8 +267,8 @@ func OnMintEventsFromApplicationLog(log *result.ApplicationLog) ([]*OnMintEvent,
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to OnMintEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to OnMintEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *OnMintEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
|
|
@ -216,7 +216,7 @@ func itemToLedgerBlock(item stackitem.Item, err error) (*LedgerBlock, error) {
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerBlock from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerBlock) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -338,7 +338,7 @@ func itemToLedgerBlockSR(item stackitem.Item, err error) (*LedgerBlockSR, error)
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerBlockSR from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -476,7 +476,7 @@ func itemToLedgerTransaction(item stackitem.Item, err error) (*LedgerTransaction
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerTransaction from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -572,7 +572,7 @@ func itemToLedgerTransactionSigner(item stackitem.Item, err error) (*LedgerTrans
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerTransactionSigner from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -699,7 +699,7 @@ func itemToLedgerWitnessCondition(item stackitem.Item, err error) (*LedgerWitnes
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerWitnessCondition from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -739,7 +739,7 @@ func itemToLedgerWitnessRule(item stackitem.Item, err error) (*LedgerWitnessRule
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerWitnessRule from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -793,8 +793,8 @@ func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*Com
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to ComplicatedNameEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to ComplicatedNameEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
@ -854,8 +854,8 @@ func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEven
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to SomeMapEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to SomeMapEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
@ -924,8 +924,8 @@ func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStru
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to SomeStructEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to SomeStructEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
@ -989,8 +989,8 @@ func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArray
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to SomeArrayEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to SomeArrayEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *SomeArrayEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
|
|
@ -222,7 +222,7 @@ func itemToCrazyStruct(item stackitem.Item, err error) (*CrazyStruct, error) {
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of CrazyStruct from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *CrazyStruct) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -262,7 +262,7 @@ func itemToLedgerBlock(item stackitem.Item, err error) (*LedgerBlock, error) {
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerBlock from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerBlock) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -384,7 +384,7 @@ func itemToLedgerBlockSR(item stackitem.Item, err error) (*LedgerBlockSR, error)
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerBlockSR from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -522,7 +522,7 @@ func itemToLedgerTransaction(item stackitem.Item, err error) (*LedgerTransaction
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerTransaction from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -618,7 +618,7 @@ func itemToLedgerTransactionSigner(item stackitem.Item, err error) (*LedgerTrans
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerTransactionSigner from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -745,7 +745,7 @@ func itemToLedgerWitnessCondition(item stackitem.Item, err error) (*LedgerWitnes
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerWitnessCondition from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -785,7 +785,7 @@ func itemToLedgerWitnessRule(item stackitem.Item, err error) (*LedgerWitnessRule
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerWitnessRule from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -839,8 +839,8 @@ func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*Com
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to ComplicatedNameEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to ComplicatedNameEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
@ -900,8 +900,8 @@ func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEven
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to SomeMapEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to SomeMapEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
@ -1020,8 +1020,8 @@ func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStru
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to SomeStructEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to SomeStructEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
@ -1072,8 +1072,8 @@ func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArray
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to SomeArrayEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to SomeArrayEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *SomeArrayEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
|
|
@ -222,7 +222,7 @@ func itemToLedgerBlock(item stackitem.Item, err error) (*LedgerBlock, error) {
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerBlock from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerBlock) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -344,7 +344,7 @@ func itemToLedgerBlockSR(item stackitem.Item, err error) (*LedgerBlockSR, error)
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerBlockSR from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -482,7 +482,7 @@ func itemToLedgerTransaction(item stackitem.Item, err error) (*LedgerTransaction
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerTransaction from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -578,7 +578,7 @@ func itemToLedgerTransactionSigner(item stackitem.Item, err error) (*LedgerTrans
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerTransactionSigner from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -705,7 +705,7 @@ func itemToLedgerWitnessCondition(item stackitem.Item, err error) (*LedgerWitnes
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerWitnessCondition from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -745,7 +745,7 @@ func itemToLedgerWitnessRule(item stackitem.Item, err error) (*LedgerWitnessRule
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerWitnessRule from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -785,7 +785,7 @@ func itemToUnnamed(item stackitem.Item, err error) (*Unnamed, error) {
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of Unnamed from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *Unnamed) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -839,8 +839,8 @@ func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*Com
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to ComplicatedNameEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to ComplicatedNameEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
@ -900,8 +900,8 @@ func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEven
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to SomeMapEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to SomeMapEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
@ -1033,8 +1033,8 @@ func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStru
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to SomeStructEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to SomeStructEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
@ -1085,8 +1085,8 @@ func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArray
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to SomeArrayEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to SomeArrayEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *SomeArrayEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
|
|
@ -200,7 +200,7 @@ func itemToLedgerBlock(item stackitem.Item, err error) (*LedgerBlock, error) {
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerBlock from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerBlock) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -322,7 +322,7 @@ func itemToLedgerBlockSR(item stackitem.Item, err error) (*LedgerBlockSR, error)
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerBlockSR from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -460,7 +460,7 @@ func itemToLedgerTransaction(item stackitem.Item, err error) (*LedgerTransaction
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerTransaction from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -556,7 +556,7 @@ func itemToLedgerTransactionSigner(item stackitem.Item, err error) (*LedgerTrans
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerTransactionSigner from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -683,7 +683,7 @@ func itemToLedgerWitnessCondition(item stackitem.Item, err error) (*LedgerWitnes
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerWitnessCondition from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -723,7 +723,7 @@ func itemToLedgerWitnessRule(item stackitem.Item, err error) (*LedgerWitnessRule
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of LedgerWitnessRule from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -763,7 +763,7 @@ func itemToManagementABI(item stackitem.Item, err error) (*ManagementABI, error)
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of ManagementABI from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *ManagementABI) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -829,7 +829,7 @@ func itemToManagementContract(item stackitem.Item, err error) (*ManagementContra
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of ManagementContract from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *ManagementContract) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -897,7 +897,7 @@ func itemToManagementEvent(item stackitem.Item, err error) (*ManagementEvent, er
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of ManagementEvent from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *ManagementEvent) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -959,7 +959,7 @@ func itemToManagementGroup(item stackitem.Item, err error) (*ManagementGroup, er
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of ManagementGroup from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *ManagementGroup) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -1009,7 +1009,7 @@ func itemToManagementManifest(item stackitem.Item, err error) (*ManagementManife
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of ManagementManifest from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *ManagementManifest) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -1201,7 +1201,7 @@ func itemToManagementMethod(item stackitem.Item, err error) (*ManagementMethod,
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of ManagementMethod from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *ManagementMethod) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -1281,7 +1281,7 @@ func itemToManagementParameter(item stackitem.Item, err error) (*ManagementParam
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of ManagementParameter from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *ManagementParameter) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -1330,7 +1330,7 @@ func itemToManagementPermission(item stackitem.Item, err error) (*ManagementPerm
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of ManagementPermission from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *ManagementPermission) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -1402,7 +1402,7 @@ func itemToStructsInternal(item stackitem.Item, err error) (*StructsInternal, er
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of StructsInternal from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *StructsInternal) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
|
|
@ -102,8 +102,8 @@ func HelloWorldEventsFromApplicationLog(log *result.ApplicationLog) ([]*HelloWor
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to HelloWorldEvent and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to HelloWorldEvent or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *HelloWorldEvent) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
|
|
@ -236,7 +236,7 @@ func itemTo{{toTypeName $name}}(item stackitem.Item, err error) (*{{toTypeName $
|
|||
}
|
||||
|
||||
// FromStackItem retrieves fields of {{toTypeName $name}} from the given stack item
|
||||
// and returns an error if so.
|
||||
// or returns an error if it's not possible to do to so.
|
||||
func (res *{{toTypeName $name}}) FromStackItem(item stackitem.Item) error {
|
||||
arr, ok := item.Value().([]stackitem.Item)
|
||||
if !ok {
|
||||
|
@ -287,8 +287,8 @@ func {{$e.Name}}sFromApplicationLog(log *result.ApplicationLog) ([]*{{$e.Name}},
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// FromStackItem converts provided stackitem.Array to {{$e.Name}} and
|
||||
// returns an error if so.
|
||||
// FromStackItem converts provided stackitem.Array to {{$e.Name}} or
|
||||
// returns an error if it's not possible to do to so.
|
||||
func (e *{{$e.Name}}) FromStackItem(item *stackitem.Array) error {
|
||||
if item == nil {
|
||||
return errors.New("nil item")
|
||||
|
|
Loading…
Reference in a new issue