github.com/koko1123/flow-go-1@v0.29.6/engine/access/rest/request/get_execution_result.go (about) 1 package request 2 3 import ( 4 "fmt" 5 6 "github.com/koko1123/flow-go-1/model/flow" 7 ) 8 9 const idQuery = "id" 10 11 type GetExecutionResultByBlockIDs struct { 12 BlockIDs []flow.Identifier 13 } 14 15 func (g *GetExecutionResultByBlockIDs) Build(r *Request) error { 16 return g.Parse( 17 r.GetQueryParams(blockIDQuery), 18 ) 19 } 20 21 func (g *GetExecutionResultByBlockIDs) Parse(rawIDs []string) error { 22 var ids IDs 23 err := ids.Parse(rawIDs) 24 if err != nil { 25 return err 26 } 27 g.BlockIDs = ids.Flow() 28 29 if len(g.BlockIDs) == 0 { 30 return fmt.Errorf("no block IDs provided") 31 } 32 33 return nil 34 } 35 36 type GetExecutionResult struct { 37 GetByIDRequest 38 }