github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/cli/commands/resources/smartops/edit.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  	"github.com/taubyte/tau-cli/flags"
     8  	smartopsI18n "github.com/taubyte/tau-cli/i18n/smartops"
     9  	smartopsLib "github.com/taubyte/tau-cli/lib/smartops"
    10  	smartopsPrompts "github.com/taubyte/tau-cli/prompts/smartops"
    11  	smartopsTable "github.com/taubyte/tau-cli/table/smartops"
    12  )
    13  
    14  func (link) Edit() common.Command {
    15  	return (&resources.Edit[*structureSpec.SmartOp]{
    16  		PromptsGetOrSelect: smartopsPrompts.GetOrSelect,
    17  		PromptsEdit:        smartopsPrompts.Edit,
    18  		TableConfirm:       smartopsTable.Confirm,
    19  		PromptsEditThis:    smartopsPrompts.EditThis,
    20  		LibSet:             smartopsLib.Set,
    21  		I18nEdited:         smartopsI18n.Edited,
    22  
    23  		UniqueFlags: flags.Combine(
    24  			flags.Timeout,
    25  			flags.Memory,
    26  			flags.MemoryUnit,
    27  			flags.Source,
    28  			flags.Call,
    29  		),
    30  	}).Default()
    31  }