Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Deprecated: "API models are now created automatically by time range.", Use: "setversion NAME SPEC_AKITA_URI", Short: "Sets the version name for an API model.", SilenceUsage: true, Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { version := args[0] modelURI, err := akiuri.Parse(args[1]) if err != nil { return errors.Wrapf(err, "%q is not a well-formed AkitaURI", args[1]) } if !modelURI.ObjectType.IsSpec() { return errors.New("Must specify an API model. For example, \"akita://projectName:spec:specName\"") } if version_names.IsReservedVersionName(version) { return errors.Errorf("'%s' is an Akita-reserved version", version) } setversionArgs := setversion.Args{ ClientID: akiflag.GetClientID(), Domain: akiflag.Domain, ModelURI: modelURI, VersionName: version, } if err := setversion.Run(setversionArgs); err != nil { return cmderr.AkitaErr{Err: err} } return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.