github.com/TrueBlocks/trueblocks-core/src/apps/chifra@v0.0.0-20241022031540-b362680128f7/sdk/list.go (about)

     1  // Copyright 2016, 2024 The TrueBlocks Authors. All rights reserved.
     2  // Use of this source code is governed by a license that can
     3  // be found in the LICENSE file.
     4  /*
     5   * Parts of this file were auto generated. Edit only those parts of
     6   * the code inside of 'EXISTING_CODE' tags.
     7   */
     8  
     9  package sdk
    10  
    11  import (
    12  	"io"
    13  	"net/url"
    14  
    15  	list "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/internal/list"
    16  	"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/output"
    17  	outputHelpers "github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/output/helpers"
    18  )
    19  
    20  // List provides an interface to the command line chifra list through the SDK.
    21  func List(rCtx *output.RenderCtx, w io.Writer, values url.Values) error {
    22  	list.ResetOptions(sdkTestMode)
    23  	opts := list.ListFinishParseInternal(w, values)
    24  	// EXISTING_CODE
    25  	// EXISTING_CODE
    26  	outputHelpers.InitJsonWriterApi("list", w, &opts.Globals)
    27  	err := opts.ListInternal(rCtx)
    28  	outputHelpers.CloseJsonWriterIfNeededApi("list", err, &opts.Globals)
    29  
    30  	return err
    31  }
    32  
    33  // EXISTING_CODE
    34  // EXISTING_CODE