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

     1  package messaging
     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  	messagingLib "github.com/taubyte/tau-cli/lib/messaging"
     8  	messagingPrompts "github.com/taubyte/tau-cli/prompts/messaging"
     9  	messagingTable "github.com/taubyte/tau-cli/table/messaging"
    10  )
    11  
    12  func (link) Query() common.Command {
    13  	return (&resources.Query[*structureSpec.Messaging]{
    14  		LibListResources:   messagingLib.ListResources,
    15  		TableList:          messagingTable.List,
    16  		PromptsGetOrSelect: messagingPrompts.GetOrSelect,
    17  		TableQuery:         messagingTable.Query,
    18  	}).Default()
    19  }
    20  
    21  func (link) List() common.Command {
    22  	return (&resources.List[*structureSpec.Messaging]{
    23  		LibListResources: messagingLib.ListResources,
    24  		TableList:        messagingTable.List,
    25  	}).Default()
    26  }