Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateCmd = &cobra.Command{ Use: "create <mailbox-resource-id>", Short: "Create folder", Long: "Create a new folder in the managed mailbox.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { payload, err := json.Marshal(createBody(cmd)) if err != nil { log.Fatal(err) } r, err := api.Request().CreateFolderWithBodyWithResponse(context.TODO(), args[0], "application/json", bytes.NewReader(payload)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var DeleteCmd = &cobra.Command{ Use: "delete <mailbox-resource-id> <folder>", Short: "Delete folder", Long: "Delete a folder and all of its subfolders.", Args: cobra.MatchAll(cobra.ExactArgs(2)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().DeleteFolderWithResponse(context.TODO(), args[0], args[1]) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var GroupCmd = &cobra.Command{
Use: "folders",
Short: "Folders commands",
}
View Source
var ListCmd = &cobra.Command{ Use: "list <mailbox-resource-id>", Short: "List folders", Long: "Retrieve a paginated list of folders in the managed mailbox.", Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().ListFoldersWithResponse(context.TODO(), args[0], listParams(cmd)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var UpdateCmd = &cobra.Command{ Use: "update <mailbox-resource-id> <folder>", Short: "Update folder", Long: "Rename an existing folder.", Args: cobra.MatchAll(cobra.ExactArgs(2)), Run: func(cmd *cobra.Command, args []string) { payload, err := json.Marshal(updateBody(cmd)) if err != nil { log.Fatal(err) } r, err := api.Request().UpdateFolderWithBodyWithResponse(context.TODO(), args[0], args[1], "application/json", bytes.NewReader(payload)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.