Documentation
¶
Index ¶
- Variables
- func CompleteMailNotification(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective)
- func FormatCustomFieldValues(items []models.CustomFieldValue) string
- func NewCmdUser(f *cmdutil.Factory) *cobra.Command
- func UserStatusName(status int) string
- func ValidateMailNotification(value string) error
Constants ¶
This section is empty.
Variables ¶
var AllowedMailNotifications = map[string]struct{}{
"all": {},
"only_my_events": {},
"only_assigned": {},
"only_owner": {},
"none": {},
}
AllowedMailNotifications lists the Redmine mail notification preference values. The wiki documents only "only_my_events" and "none"; the full set comes from app/models/user.rb in Redmine.
Functions ¶
func CompleteMailNotification ¶ added in v2.6.0
func CompleteMailNotification(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective)
CompleteMailNotification provides shell completion for --mail-notification.
func FormatCustomFieldValues ¶ added in v2.6.0
func FormatCustomFieldValues(items []models.CustomFieldValue) string
FormatCustomFieldValues renders "Name: Value; ..." for custom field arrays. Exported so the my-account command group can reuse it.
func NewCmdUser ¶
NewCmdUser creates the parent users command.
func UserStatusName ¶ added in v2.6.0
UserStatusName renders a numeric Redmine user status as a human label.
func ValidateMailNotification ¶ added in v2.6.0
ValidateMailNotification accepts the empty string (meaning "unset") and any value from AllowedMailNotifications. Used by both the users and my-account command groups to fail fast before hitting the API.
Types ¶
This section is empty.