cmd

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "tmc",
	Short: "A CLI client for TM catalogs",
	Long: `tmc is a CLI client for contributing to and searching
ThingModel catalogs.`,
}

RootCmd represents the base command when called without any subcommands

Functions

func AddOutputFormatFlag added in v0.1.3

func AddOutputFormatFlag(cmd *cobra.Command)

func AddRepoConstraintFlags added in v0.1.3

func AddRepoConstraintFlags(cmd *cobra.Command)

AddRepoConstraintFlags adds repo and directory flags for commands that can use multiple repositories (e.g. list)

func AddRepoDisambiguatorFlags added in v0.1.3

func AddRepoDisambiguatorFlags(cmd *cobra.Command)

AddRepoDisambiguatorFlags adds repo and directory flags for commands that use exactly one repository (e.g. delete)

func AddTMFilterFlags added in v0.1.3

func AddTMFilterFlags(cmd *cobra.Command, flags *FilterFlags)

func CreateFiltersFromCLI added in v0.1.3

func CreateFiltersFromCLI(flags FilterFlags, name string) *model.Filters

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the RootCmd.

func RepoSpecFromFlags added in v0.1.3

func RepoSpecFromFlags(cmd *cobra.Command) model.RepoSpec

Types

type FilterFlags added in v0.1.3

type FilterFlags struct {
	FilterAuthor       string
	FilterManufacturer string
	FilterMpn          string
	FilterProtocol     string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL