Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &command.Command{ Cobra: &cobra.Command{ Args: cobra.NoArgs, Use: "get", Short: "Show account information", SilenceUsage: true, PreRunE: func(cmd *cobra.Command, args []string) error { return nil }, RunE: func(cmd *cobra.Command, args []string) error { cons := conswriter.GetTerminal() c, err := cfg.NewTritonConfig() if err != nil { return err } a, err := account.NewAccountClient(c) if err != nil { return err } accDetails, err := a.Get() if err != nil { return err } cons.Write([]byte(fmt.Sprintf("id: %s", accDetails.ID))) cons.Write([]byte(fmt.Sprintf("\nlogin: %s", accDetails.Login))) cons.Write([]byte(fmt.Sprintf("\nemail: %s", accDetails.Email))) cons.Write([]byte(fmt.Sprintf("\ncompanyName: %s", accDetails.CompanyName))) cons.Write([]byte(fmt.Sprintf("\nfirstName: %s", accDetails.FirstName))) cons.Write([]byte(fmt.Sprintf("\nlastName: %s", accDetails.LastName))) cons.Write([]byte(fmt.Sprintf("\npostalCode: %s", accDetails.PostalCode))) cons.Write([]byte(fmt.Sprintf("\ntriton_cns_enabled: %t", accDetails.TritonCNSEnabled))) cons.Write([]byte(fmt.Sprintf("\naddress: %s", accDetails.Address))) cons.Write([]byte(fmt.Sprintf("\ncity: %s", accDetails.City))) cons.Write([]byte(fmt.Sprintf("\nstate: %s", accDetails.State))) cons.Write([]byte(fmt.Sprintf("\ncountry: %s", accDetails.Country))) cons.Write([]byte(fmt.Sprintf("\nphone: %s", accDetails.Phone))) cons.Write([]byte(fmt.Sprintf("\nupdated: %s (%s)", accDetails.Updated.String(), cfg.FormatTime(accDetails.Updated)))) cons.Write([]byte(fmt.Sprintf("\ncreated: %s (%s)", accDetails.Created.String(), cfg.FormatTime(accDetails.Created)))) return nil }, }, Setup: func(parent *command.Command) error { return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.