github.com/algorand/go-algorand-sdk@v1.24.0/client/v2/indexer/searchForApplicationBoxes.go (about) 1 package indexer 2 3 import ( 4 "context" 5 "fmt" 6 7 "github.com/algorand/go-algorand-sdk/client/v2/common" 8 "github.com/algorand/go-algorand-sdk/client/v2/common/models" 9 ) 10 11 // SearchForApplicationBoxesParams contains all of the query parameters for url serialization. 12 type SearchForApplicationBoxesParams struct { 13 14 // Limit maximum number of results to return. There could be additional pages even 15 // if the limit is not reached. 16 Limit uint64 `url:"limit,omitempty"` 17 18 // Next the next page of results. Use the next token provided by the previous 19 // results. 20 Next string `url:"next,omitempty"` 21 } 22 23 // SearchForApplicationBoxes given an application ID, returns the box names of that 24 // application sorted lexicographically. 25 type SearchForApplicationBoxes struct { 26 c *Client 27 28 applicationId uint64 29 30 p SearchForApplicationBoxesParams 31 } 32 33 // Limit maximum number of results to return. There could be additional pages even 34 // if the limit is not reached. 35 func (s *SearchForApplicationBoxes) Limit(Limit uint64) *SearchForApplicationBoxes { 36 s.p.Limit = Limit 37 38 return s 39 } 40 41 // Next the next page of results. Use the next token provided by the previous 42 // results. 43 func (s *SearchForApplicationBoxes) Next(Next string) *SearchForApplicationBoxes { 44 s.p.Next = Next 45 46 return s 47 } 48 49 // Do performs the HTTP request 50 func (s *SearchForApplicationBoxes) Do(ctx context.Context, headers ...*common.Header) (response models.BoxesResponse, err error) { 51 err = s.c.get(ctx, &response, fmt.Sprintf("/v2/applications/%s/boxes", common.EscapeParams(s.applicationId)...), s.p, headers) 52 return 53 }