Documentation
¶
Overview ¶
Copyright © 2022 Flagship Team [email protected]
Copyright © 2022 Flagship Team [email protected]
Copyright © 2022 Flagship Team [email protected]
Copyright © 2022 Flagship Team [email protected]
Copyright © 2022 Flagship Team [email protected]
Copyright © 2022 Flagship Team [email protected]
Copyright © 2022 Flagship Team [email protected]
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CampaignID string Status string DataRaw string )
View Source
var CampaignCmd = &cobra.Command{ Use: "campaign [create|edit|get|list|delete|switch]", Short: "Manage your campaigns", Long: `Manage your campaigns`, Run: func(cmd *cobra.Command, args []string) { cmd.Help() }, }
campaignCmd represents the campaign command
View Source
var SwitchCmd = &cobra.Command{ Use: "switch [-i <campaign-id> | --id=<campaign-id>] [-s <status> | --status=<status>]", Short: "Switch a campaign state", Long: `Switch a campaign state in your project`, Run: func(cmd *cobra.Command, args []string) { if !(Status == "active" || Status == "paused" || Status == "interrupted") { fmt.Fprintln(cmd.OutOrStdout(), "Status can only have 3 values: active or paused or interrupted") } else { err := httprequest.HTTPSwitchCampaign(CampaignID, Status) if err != nil { log.Fatalf("error occurred: %v", err) } fmt.Fprintf(cmd.OutOrStdout(), "campaign status set to %s\n", Status) } }, }
SwitchCmd represents the Switch command
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.