github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/cli/commands/resources/smartops/query.go (about)

     1  package smartops
     2  
     3  import (
     4  	structureSpec "github.com/taubyte/go-specs/structure"
     5  	resources "github.com/taubyte/tau-cli/cli/commands/resources/common"
     6  	"github.com/taubyte/tau-cli/cli/common"
     7  	smartopsLib "github.com/taubyte/tau-cli/lib/smartops"
     8  	smartopsPrompts "github.com/taubyte/tau-cli/prompts/smartops"
     9  	smartopsTable "github.com/taubyte/tau-cli/table/smartops"
    10  )
    11  
    12  func (link) Query() common.Command {
    13  	return (&resources.Query[*structureSpec.SmartOp]{
    14  		LibListResources:   smartopsLib.ListResources,
    15  		TableList:          smartopsTable.List,
    16  		PromptsGetOrSelect: smartopsPrompts.GetOrSelect,
    17  		TableQuery:         smartopsTable.Query,
    18  	}).Default()
    19  }
    20  
    21  func (link) List() common.Command {
    22  	return (&resources.List[*structureSpec.SmartOp]{
    23  		LibListResources: smartopsLib.ListResources,
    24  		TableList:        smartopsTable.List,
    25  	}).Default()
    26  }