Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GetCmd = &cobra.Command{ Use: "get [id]", Short: "get a template", Example: "tink template get [id]", DisableFlagsInUseLine: true, Args: func(c *cobra.Command, args []string) error { if len(args) == 0 { return fmt.Errorf("%v requires an argument", c.UseLine()) } return nil }, Run: func(c *cobra.Command, args []string) { for _, arg := range args { req := template.GetRequest{} if _, err := uuid.Parse(arg); err == nil { req.GetBy = &template.GetRequest_Id{Id: arg} } else { req.GetBy = &template.GetRequest_Name{Name: arg} } t, err := client.TemplateClient.GetTemplate(context.Background(), &req) if err != nil { log.Fatal(err) } fmt.Println(t.Data) } }, }
GetCmd represents the get subcommand for template command.
Functions ¶
func NewCreateCommand ¶ added in v0.5.0
func NewDeleteOptions ¶ added in v0.5.0
func NewGetOptions ¶ added in v0.5.0
func NewListCommand ¶ added in v0.5.0
listCmd represents the list subcommand for template command.
func NewUpdateCommand ¶ added in v0.5.0
updateCmd represents the get subcommand for template command.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.