Documentation
¶
Overview ¶
Package cli contains all business logic needed by the CLI command.
Index ¶
- Constants
- Variables
- func AddProfileAction(c *cli.Context, args addOrUpdateProfileArgs) error
- func ConnectToApp(ctx context.Context, logger logging.Logger) (*appClient.ViamClient, error)
- func ConnectToMachine(ctx context.Context, hostname string, logger logging.Logger) (robot.Robot, error)
- func CreateCustomIndexAction(c *cli.Context, args createCustomIndexArgs) error
- func CreateMachineAction(c *cli.Context, args createMachineActionArgs) error
- func CreateModuleAction(c *cli.Context, args createModuleActionArgs) error
- func CreateOAuthAppAction(c *cli.Context, args createOAuthAppArgs) error
- func DataAddToDatasetByFilter(c *cli.Context, args dataAddToDatasetByFilterArgs) error
- func DataAddToDatasetByIDs(c *cli.Context, args dataAddToDatasetByIDsArgs) error
- func DataCancelTrainingJob(c *cli.Context, args dataCancelTrainingJobArgs) error
- func DataConfigureDatabaseUser(c *cli.Context, args dataConfigureDatabaseUserArgs) error
- func DataConfigureDatabaseUserConfirmation(c *cli.Context, args dataConfigureDatabaseUserArgs) error
- func DataDeleteBinaryAction(c *cli.Context, args emptyArgs) error
- func DataDeleteTabularAction(c *cli.Context, args dataDeleteTabularArgs) error
- func DataExportBinaryAction(cCtx *cli.Context, args dataExportBinaryArgs) error
- func DataExportBinaryIDsAction(cCtx *cli.Context, args dataExportBinaryIDsArgs) error
- func DataExportTabularAction(cCtx *cli.Context, args dataExportTabularArgs) error
- func DataGetDatabaseConnection(c *cli.Context, args dataGetDatabaseConnectionArgs) error
- func DataGetTrainingJob(c *cli.Context, args dataGetTrainingJobArgs) error
- func DataListTrainingJobs(c *cli.Context, args dataListTrainingJobsArgs) error
- func DataRemoveFromDataset(c *cli.Context, args dataRemoveFromDatasetArgs) error
- func DataRemoveFromDatasetByFilter(c *cli.Context, args dataRemoveFromDatasetByFilterArgs) error
- func DataTagActionByFilter(c *cli.Context, args dataTagByFilterArgs) error
- func DataTagActionByIDs(c *cli.Context, args dataTagByIDsArgs) error
- func DatapipelineCreateAction(c *cli.Context, args datapipelineCreateArgs) error
- func DatapipelineDeleteAction(c *cli.Context, args datapipelineDeleteArgs) error
- func DatapipelineDescribeAction(c *cli.Context, args datapipelineDescribeArgs) error
- func DatapipelineDisableAction(c *cli.Context, args datapipelineDisableArgs) error
- func DatapipelineEnableAction(c *cli.Context, args datapipelineEnableArgs) error
- func DatapipelineListAction(c *cli.Context, args datapipelineListArgs) error
- func DatapipelineRenameAction(c *cli.Context, args datapipelineRenameArgs) error
- func DatasetCreateAction(c *cli.Context, args datasetCreateArgs) error
- func DatasetDeleteAction(c *cli.Context, args datasetDeleteArgs) error
- func DatasetDownloadAction(c *cli.Context, args datasetDownloadArgs) error
- func DatasetListAction(c *cli.Context, args datasetListArgs) error
- func DatasetMergeAction(c *cli.Context, args datasetMergeArgs) error
- func DatasetRenameAction(c *cli.Context, args datasetRenameArgs) error
- func DeleteCustomIndexAction(c *cli.Context, args deleteCustomIndexArgs) error
- func DeleteMachineAction(c *cli.Context, args deleteMachineActionArgs) error
- func DeleteOAuthAppAction(c *cli.Context, args deleteOAuthAppArgs) error
- func DeleteOAuthAppConfirmation(c *cli.Context, args deleteOAuthAppArgs) error
- func DisableAuthServiceAction(cCtx *cli.Context, args disableAuthServiceArgs) error
- func DisableAuthServiceConfirmation(c *cli.Context, args disableAuthServiceArgs) error
- func DownloadModuleAction(c *cli.Context, flags downloadModuleFlags) error
- func EnableAuthServiceAction(cCtx *cli.Context, args enableAuthServiceArgs) error
- func Errorf(w io.Writer, format string, a ...interface{})
- func FTDCParseAction(c *cli.Context, args ftdcArgs) error
- func GenerateModuleAction(cCtx *cli.Context, args generateModuleArgs) error
- func GetBillingConfigAction(cCtx *cli.Context, args getBillingConfigArgs) error
- func ListCustomIndexesAction(c *cli.Context, args listCustomIndexesArgs) error
- func ListLocationsAction(c *cli.Context, args listLocationsArgs) error
- func ListOAuthAppsAction(cCtx *cli.Context, args listOAuthAppsArgs) error
- func ListOrganizationsAction(cCtx *cli.Context, args emptyArgs) error
- func ListProfilesAction(c *cli.Context, args emptyArgs) error
- func ListRobotsAction(c *cli.Context, args listRobotsActionArgs) error
- func LocalAppTestingAction(ctx *cli.Context, args localAppTestingArgs) error
- func LocationAPIKeyCreateAction(cCtx *cli.Context, args locationAPIKeyCreateArgs) error
- func LoginAction(cCtx *cli.Context, args loginActionArgs) error
- func LoginWithAPIKeyAction(cCtx *cli.Context, args loginWithAPIKeyArgs) error
- func LogoutAction(cCtx *cli.Context, args emptyArgs) error
- func MLGetTrainingJobLogs(c *cli.Context, args mlGetTrainingJobLogsArgs) error
- func MLInferenceInferAction(c *cli.Context, args mlInferenceInferArgs) error
- func MLListContainers(c *cli.Context, args mlListContainersArgs) error
- func MLSubmitCustomTrainingJob(c *cli.Context, args mlSubmitCustomTrainingJobArgs) error
- func MLSubmitCustomTrainingJobWithUpload(c *cli.Context, args mlSubmitCustomTrainingJobWithUploadArgs) error
- func MLSubmitTrainingJob(c *cli.Context, args mlSubmitTrainingJobArgs) error
- func MLTrainingScriptTestLocalAction(c *cli.Context, args mlTrainingScriptTestLocalArgs) error
- func MLTrainingUpdateAction(c *cli.Context, args mlTrainingUpdateArgs) error
- func MLTrainingUploadAction(c *cli.Context, args mlTrainingUploadArgs) error
- func MachinesPartCopyFilesAction(c *cli.Context, args machinesPartCopyFilesArgs) error
- func MachinesPartGetFTDCAction(c *cli.Context, args machinesPartGetFTDCArgs) error
- func MachinesPartListAction(c *cli.Context, args machinesPartListArgs) error
- func MachinesPartRunAction(c *cli.Context, args machinesPartRunArgs) error
- func MetadataReadAction(ctx *cli.Context, args metadataReadArgs) error
- func ModuleBuildLinkRepoAction(c *cli.Context, args moduleBuildLinkRepoArgs) error
- func ModuleBuildListAction(cCtx *cli.Context, args moduleBuildListArgs) error
- func ModuleBuildLocalAction(cCtx *cli.Context, args moduleBuildLocalArgs) error
- func ModuleBuildLogsAction(c *cli.Context, args moduleBuildLogsArgs) error
- func ModuleBuildStartAction(cCtx *cli.Context, args moduleBuildStartArgs) error
- func ModuleRestartAction(c *cli.Context, args moduleRestartArgs) error
- func NewApp(out, errOut io.Writer) *cli.App
- func OrganizationDisableBillingServiceAction(cCtx *cli.Context, args organizationDisableBillingServiceArgs) error
- func OrganizationEnableBillingServiceAction(cCtx *cli.Context, args organizationEnableBillingServiceArgs) error
- func OrganizationLogoSetAction(cCtx *cli.Context, args organizationsLogoSetArgs) error
- func OrganizationsAPIKeyCreateAction(cCtx *cli.Context, args organizationsAPIKeyCreateArgs) error
- func OrganizationsLogoGetAction(cCtx *cli.Context, args organizationsLogoGetArgs) error
- func OrganizationsSupportEmailGetAction(cCtx *cli.Context, args organizationsSupportEmailGetArgs) error
- func OrganizationsSupportEmailSetAction(cCtx *cli.Context, args organizationsSupportEmailSetArgs) error
- func PackageExportAction(c *cli.Context, args packageExportArgs) error
- func PackageUploadAction(c *cli.Context, args packageUploadArgs) error
- func ParseFileType(raw string) string
- func PrintAccessTokenAction(cCtx *cli.Context, args emptyArgs) error
- func ReadOAuthAppAction(c *cli.Context, args readOAuthAppArgs) error
- func ReloadModuleAction(c *cli.Context, args reloadModuleArgs) error
- func ReloadModuleLocalAction(c *cli.Context, args reloadModuleArgs) error
- func RemoveProfileAction(c *cli.Context, args removeProfileArgs) error
- func RobotAPIKeyCreateAction(cCtx *cli.Context, args robotAPIKeyCreateArgs) error
- func RobotsLogsAction(c *cli.Context, args robotsLogsArgs) error
- func RobotsPartLogsAction(c *cli.Context, args robotsPartLogsArgs) error
- func RobotsPartRestartAction(c *cli.Context, args robotsPartRestartArgs) error
- func RobotsPartShellAction(c *cli.Context, args robotsPartShellArgs) error
- func RobotsPartStatusAction(c *cli.Context, args robotsPartStatusArgs) error
- func RobotsPartTunnelAction(c *cli.Context, args robotsPartTunnelArgs) error
- func RobotsStatusAction(c *cli.Context, args robotsStatusArgs) error
- func UpdateBillingServiceAction(cCtx *cli.Context, args updateBillingServiceArgs) error
- func UpdateCLIAction(c *cli.Context, args emptyArgs) error
- func UpdateMachineAction(c *cli.Context, args updateMachineActionArgs) error
- func UpdateModelsAction(c *cli.Context, args updateModelsArgs) error
- func UpdateModuleAction(c *cli.Context, args updateModuleArgs) error
- func UpdateOAuthAppAction(c *cli.Context, args updateOAuthAppArgs) error
- func UpdateProfileAction(c *cli.Context, args addOrUpdateProfileArgs) error
- func UploadModuleAction(c *cli.Context, args uploadModuleArgs) error
- func VersionAction(c *cli.Context, args emptyArgs) error
- func WhoAmIAction(cCtx *cli.Context, args emptyArgs) error
- type AliasStringFlag
- type Annotation
- type AppComponent
- type AppCustomizations
- type BBoxAnnotation
- type Config
- type ImageMetadata
- type MLMetadata
- type MachinePickerCustomizations
- type ModelFramework
- type ModelType
- type ModuleComponent
- type ModuleManifest
- type ModuleMap
- type PackageType
- type ProgressManager
- func (pm *ProgressManager) Complete(stepID string) error
- func (pm *ProgressManager) CompleteWithMessage(stepID, message string) error
- func (pm *ProgressManager) Fail(stepID string, err error) error
- func (pm *ProgressManager) FailWithMessage(stepID, message string) error
- func (pm *ProgressManager) Start(stepID string) error
- func (pm *ProgressManager) Stop()
- func (pm *ProgressManager) UpdateText(text string)
- type ProgressManagerOption
- type ResourceMap
- type Step
- type StepStatus
Constants ¶
const ( PKCEUnspecified pkce = "unspecified" PKCERequired pkce = "required" PKCENotRequired pkce = "not_required" PKCENotRequiredWhenUsingClientAuthentication pkce = "not_required_when_using_client_authentication" )
the valid pkce values.
const ( ClientAuthenticationUnspecified clientAuthentication = "unspecified" ClientAuthenticationRequired clientAuthentication = "required" ClientAuthenticationNotRequired clientAuthentication = "not_required" ClientAuthenticationNotRequiredWhenUsingPKCE clientAuthentication = "not_required_when_using_pkce" )
the valid client authentication values.
const ( URLValidationUnspecified urlValidation = "unspecified" URLValidationExactMatch urlValidation = "exact_match" URLValidationAllowWildcards urlValidation = "allow_wildcards" )
the accepted url validation values.
const ( EnabledGrantUnspecified enabledGrant = "unspecified" EnabledGrantAuthorizationCode enabledGrant = "authorization_code" EnabledGrantImplicit enabledGrant = "implicit" EnabledGrantPassword enabledGrant = "password" EnabledGrantRefreshToken enabledGrant = "refresh_token" EnabledGrantDeviceCode enabledGrant = "device_code" )
the accepted enabled grant values.
const ( ModelTypeUnspecified = ModelType("unspecified") ModelTypeSingleLabelClassification = ModelType("single_label_classification") ModelTypeMultiLabelClassification = ModelType("multi_label_classification") ModelTypeObjectDetection = ModelType("object_detection") )
ModelType enumeration.
const ( ModelFrameworkUnspecified = ModelFramework("unspecified") ModelFrameworkTFLite = ModelFramework("tflite") ModelFrameworkTensorFlow = ModelFramework("tensorflow") ModelFrameworkPyTorch = ModelFramework("pytorch") ModelFrameworkONNX = ModelFramework("onnx") )
ModelFramework enumeration.
const ( PackageTypeUnspecified = PackageType("unspecified") PackageTypeArchive = PackageType("archive") PackageTypeMLModel = PackageType("ml_model") PackageTypeModule = PackageType("module") PackageTypeSLAMMap = PackageType("slam_map") PackageTypeMLTraining = PackageType("ml_training") )
PackageType enumeration.
Variables ¶
var ( StandardDataSourceType = "standard" HotStorageDataSourceType = "hotstorage" )
dataSourceType constants for data source types.
Functions ¶
func AddProfileAction ¶ added in v0.56.0
AddProfileAction adds a new CLI profile.
func ConnectToApp ¶ added in v0.99.0
ConnectToApp connects to the Viam app using the cached CLI token.
func ConnectToMachine ¶ added in v0.99.0
func ConnectToMachine(ctx context.Context, hostname string, logger logging.Logger) (robot.Robot, error)
ConnectToMachine connects to a Viam machine using the cached CLI token.
func CreateCustomIndexAction ¶ added in v0.100.0
CreateCustomIndexAction creates a custom index for a specified organization and collection type using the provided index specification file in the arguments.
func CreateMachineAction ¶ added in v0.107.0
CreateMachineAction is the corresponding action for 'machines create'.
func CreateModuleAction ¶ added in v0.7.3
CreateModuleAction is the corresponding Action for 'module create'. It runs the command to create a module. This includes both a gRPC call to register the module on app.viam.com and creating the manifest file.
func CreateOAuthAppAction ¶ added in v0.58.0
CreateOAuthAppAction is the corresponding action for 'oauth-app create'.
func DataAddToDatasetByFilter ¶ added in v0.16.0
DataAddToDatasetByFilter is the corresponding action for 'dataset data add filter'.
func DataAddToDatasetByIDs ¶ added in v0.16.0
DataAddToDatasetByIDs is the corresponding action for 'dataset data add ids'.
func DataCancelTrainingJob ¶ added in v0.11.0
DataCancelTrainingJob is the corresponding action for 'data train cancel'.
func DataConfigureDatabaseUser ¶ added in v0.13.0
DataConfigureDatabaseUser is the corresponding action for 'data database configure'.
func DataConfigureDatabaseUserConfirmation ¶ added in v0.39.0
func DataConfigureDatabaseUserConfirmation(c *cli.Context, args dataConfigureDatabaseUserArgs) error
DataConfigureDatabaseUserConfirmation is the Before action for 'data database configure'. it asks for the user to confirm that they are aware that they are changing the authentication credentials of their database.
func DataDeleteBinaryAction ¶ added in v0.8.0
DataDeleteBinaryAction is the corresponding action for 'data delete'.
func DataDeleteTabularAction ¶ added in v0.8.0
DataDeleteTabularAction is the corresponding action for 'data delete-tabular'.
func DataExportBinaryAction ¶ added in v0.56.0
DataExportBinaryAction is the corresponding action for 'data export binary'.
func DataExportBinaryIDsAction ¶ added in v0.78.2
DataExportBinaryIDsAction is the corresponding action for 'data export binary ids'.
func DataExportTabularAction ¶ added in v0.56.0
DataExportTabularAction is the corresponding action for 'data export tabular'.
func DataGetDatabaseConnection ¶ added in v0.13.0
DataGetDatabaseConnection is the corresponding action for 'data database hostname'.
func DataGetTrainingJob ¶ added in v0.11.0
DataGetTrainingJob is the corresponding action for 'data train get'.
func DataListTrainingJobs ¶ added in v0.11.0
DataListTrainingJobs is the corresponding action for 'data train list'.
func DataRemoveFromDataset ¶ added in v0.10.0
DataRemoveFromDataset is the corresponding action for 'dataset data remove ids'.
func DataRemoveFromDatasetByFilter ¶ added in v0.63.0
DataRemoveFromDatasetByFilter is the corresponding action for 'dataset data remove filter'.
func DataTagActionByFilter ¶ added in v0.24.0
DataTagActionByFilter is the corresponding action for 'data tag filter'.
func DataTagActionByIDs ¶ added in v0.83.0
DataTagActionByIDs is the corresponding action for 'data tag'.
func DatapipelineCreateAction ¶ added in v0.73.0
DatapipelineCreateAction creates a new data pipeline.
func DatapipelineDeleteAction ¶ added in v0.73.0
DatapipelineDeleteAction deletes a data pipeline.
func DatapipelineDescribeAction ¶ added in v0.73.0
DatapipelineDescribeAction describes a data pipeline and its status.
func DatapipelineDisableAction ¶ added in v0.73.0
DatapipelineDisableAction disables a data pipeline.
func DatapipelineEnableAction ¶ added in v0.73.0
DatapipelineEnableAction enables a data pipeline.
func DatapipelineListAction ¶ added in v0.73.0
DatapipelineListAction lists all data pipelines for an organization.
func DatapipelineRenameAction ¶ added in v0.88.0
DatapipelineRenameAction renames an existing data pipeline.
func DatasetCreateAction ¶ added in v0.10.0
DatasetCreateAction is the corresponding action for 'dataset create'.
func DatasetDeleteAction ¶ added in v0.10.0
DatasetDeleteAction is the corresponding action for 'dataset delete'.
func DatasetDownloadAction ¶ added in v0.33.0
DatasetDownloadAction is the corresponding action for 'dataset export'.
func DatasetListAction ¶ added in v0.10.0
DatasetListAction is the corresponding action for 'dataset list'.
func DatasetMergeAction ¶ added in v0.89.0
DatasetMergeAction is the corresponding action for 'dataset merge'.
func DatasetRenameAction ¶ added in v0.10.0
DatasetRenameAction is the corresponding action for 'dataset rename'.
func DeleteCustomIndexAction ¶ added in v0.100.0
DeleteCustomIndexAction deletes a custom index for a specified organization and collection type using the provided index name.
func DeleteMachineAction ¶ added in v0.107.0
DeleteMachineAction is the corresponding action for 'machines delete'.
func DeleteOAuthAppAction ¶ added in v0.57.0
DeleteOAuthAppAction is the corresponding action for 'oauth-app delete'.
func DeleteOAuthAppConfirmation ¶ added in v0.57.0
DeleteOAuthAppConfirmation is the Before action for 'organizations auth-service oauth-app delete'. It asks for the user to confirm that they want to delete the oauth app.
func DisableAuthServiceAction ¶ added in v0.58.0
DisableAuthServiceAction corresponds to 'organizations auth-service disable'.
func DisableAuthServiceConfirmation ¶ added in v0.58.0
DisableAuthServiceConfirmation is the Before action for 'organizations auth-service disable'. It asks for the user to confirm that they want to disable the auth service.
func DownloadModuleAction ¶ added in v0.42.0
DownloadModuleAction downloads a module.
func EnableAuthServiceAction ¶ added in v0.58.0
EnableAuthServiceAction corresponds to 'organizations auth-service enable'.
func Errorf ¶ added in v0.7.3
Errorf prints a message prefixed with a bold red "Error: " prefix and exits with 1. It also capitalizes the first letter of the message.
func FTDCParseAction ¶ added in v0.89.0
FTDCParseAction is the cli action to parse an ftdc file.
func GenerateModuleAction ¶ added in v0.47.0
GenerateModuleAction runs the module generate cli and generates necessary module templates based on user input.
func GetBillingConfigAction ¶ added in v0.54.0
GetBillingConfigAction corresponds to `organizations billing get`.
func ListCustomIndexesAction ¶ added in v0.100.0
ListCustomIndexesAction lists all custom indexes for a specified organization and collection type.
func ListLocationsAction ¶ added in v0.7.3
ListLocationsAction is the corresponding Action for 'locations list'.
func ListOAuthAppsAction ¶ added in v0.58.0
ListOAuthAppsAction corresponds to `organizations auth-service oauth-app list`.
func ListOrganizationsAction ¶ added in v0.7.3
ListOrganizationsAction is the corresponding Action for 'organizations list'.
func ListProfilesAction ¶ added in v0.56.0
ListProfilesAction lists all currently supported profiles.
func ListRobotsAction ¶ added in v0.7.3
ListRobotsAction is the corresponding Action for 'machines list'.
func LocalAppTestingAction ¶ added in v0.84.0
LocalAppTestingAction is the action for the local-app-testing command.
func LocationAPIKeyCreateAction ¶ added in v0.11.0
LocationAPIKeyCreateAction corresponds to `location api-key create`.
func LoginAction ¶ added in v0.7.3
LoginAction is the corresponding Action for 'login'.
func LoginWithAPIKeyAction ¶ added in v0.9.0
LoginWithAPIKeyAction is the corresponding Action for `login api-key`.
func LogoutAction ¶ added in v0.7.3
LogoutAction is the corresponding Action for 'logout'.
func MLGetTrainingJobLogs ¶ added in v0.40.0
MLGetTrainingJobLogs is the corresponding action for 'data train logs'.
func MLInferenceInferAction ¶ added in v0.62.0
MLInferenceInferAction is the corresponding action for 'inference infer'.
func MLListContainers ¶ added in v0.104.0
MLListContainers is the corresponding action for 'train containers'.
func MLSubmitCustomTrainingJob ¶ added in v0.27.0
MLSubmitCustomTrainingJob is the corresponding action for 'train submit-custom'.
func MLSubmitCustomTrainingJobWithUpload ¶ added in v0.28.0
func MLSubmitCustomTrainingJobWithUpload(c *cli.Context, args mlSubmitCustomTrainingJobWithUploadArgs) error
MLSubmitCustomTrainingJobWithUpload is the corresponding action for 'train submit-custom'.
func MLSubmitTrainingJob ¶ added in v0.27.0
MLSubmitTrainingJob is the corresponding action for 'train submit'.
func MLTrainingScriptTestLocalAction ¶ added in v0.106.0
MLTrainingScriptTestLocalAction runs training locally in a Docker container.
func MLTrainingUpdateAction ¶ added in v0.29.0
MLTrainingUpdateAction updates the visibility of training scripts.
func MLTrainingUploadAction ¶ added in v0.26.0
MLTrainingUploadAction uploads a new custom training script.
func MachinesPartCopyFilesAction ¶ added in v0.27.0
MachinesPartCopyFilesAction is the corresponding Action for 'machines part cp'.
func MachinesPartGetFTDCAction ¶ added in v0.78.0
MachinesPartGetFTDCAction is the corresponding Action for 'machines part get-ftdc'.
func MachinesPartListAction ¶ added in v0.63.0
MachinesPartListAction is the corresponding Action for 'machines part list'.
func MachinesPartRunAction ¶ added in v0.59.0
MachinesPartRunAction is the corresponding Action for 'machines part run'.
func MetadataReadAction ¶ added in v0.85.0
MetadataReadAction is the action for the CLI command "viam metadata read".
func ModuleBuildLinkRepoAction ¶ added in v0.40.0
ModuleBuildLinkRepoAction links a github repo to your module.
func ModuleBuildListAction ¶ added in v0.17.0
ModuleBuildListAction lists the module's build jobs.
func ModuleBuildLocalAction ¶ added in v0.15.0
ModuleBuildLocalAction runs the module's build commands locally.
func ModuleBuildLogsAction ¶ added in v0.17.0
ModuleBuildLogsAction retrieves the logs for a specific build step.
func ModuleBuildStartAction ¶ added in v0.17.0
ModuleBuildStartAction starts a cloud build.
func ModuleRestartAction ¶ added in v0.98.0
ModuleRestartAction triggers a restart of the requested module.
func NewApp ¶ added in v0.7.3
NewApp returns a new app with the CLI API, Writer set to out, and ErrWriter set to errOut.
func OrganizationDisableBillingServiceAction ¶ added in v0.55.0
func OrganizationDisableBillingServiceAction(cCtx *cli.Context, args organizationDisableBillingServiceArgs) error
OrganizationDisableBillingServiceAction corresponds to `organizations billing disable`.
func OrganizationEnableBillingServiceAction ¶ added in v0.56.0
func OrganizationEnableBillingServiceAction(cCtx *cli.Context, args organizationEnableBillingServiceArgs) error
OrganizationEnableBillingServiceAction corresponds to `organizations billing enable`.
func OrganizationLogoSetAction ¶ added in v0.55.0
OrganizationLogoSetAction corresponds to `organizations logo set`.
func OrganizationsAPIKeyCreateAction ¶ added in v0.9.0
OrganizationsAPIKeyCreateAction corresponds to `organizations api-key create`.
func OrganizationsLogoGetAction ¶ added in v0.55.0
OrganizationsLogoGetAction corresponds to `organizations logo get`.
func OrganizationsSupportEmailGetAction ¶ added in v0.54.0
func OrganizationsSupportEmailGetAction(cCtx *cli.Context, args organizationsSupportEmailGetArgs) error
OrganizationsSupportEmailGetAction corresponds to `organizations support-email get`.
func OrganizationsSupportEmailSetAction ¶ added in v0.54.0
func OrganizationsSupportEmailSetAction(cCtx *cli.Context, args organizationsSupportEmailSetArgs) error
OrganizationsSupportEmailSetAction corresponds to `organizations support-email set`.
func PackageExportAction ¶ added in v0.26.0
PackageExportAction is the corresponding action for 'package export'.
func PackageUploadAction ¶ added in v0.28.0
PackageUploadAction is the corresponding action for "packages upload".
func ParseFileType ¶ added in v0.37.0
ParseFileType parses output from the `file` command. Returns a platform string like "linux/amd64". Empty string means failed to parse.
func PrintAccessTokenAction ¶ added in v0.7.3
PrintAccessTokenAction is the corresponding Action for 'print-access-token'.
func ReadOAuthAppAction ¶ added in v0.58.0
ReadOAuthAppAction is the corresponding action for 'organizations auth-service oauth-app read'.
func ReloadModuleAction ¶ added in v0.26.0
ReloadModuleAction builds a module, configures it on a robot, and starts or restarts it.
func ReloadModuleLocalAction ¶ added in v0.98.0
ReloadModuleLocalAction builds a module locally, configures it on a robot, and starts or restarts it.
func RemoveProfileAction ¶ added in v0.56.0
RemoveProfileAction removes a CLI profile.
func RobotAPIKeyCreateAction ¶ added in v0.11.0
RobotAPIKeyCreateAction corresponds to `machine api-key create`.
func RobotsLogsAction ¶ added in v0.9.0
RobotsLogsAction is the corresponding Action for 'machines logs'.
func RobotsPartLogsAction ¶ added in v0.9.0
RobotsPartLogsAction is the corresponding Action for 'machines part logs'.
func RobotsPartRestartAction ¶ added in v0.38.0
RobotsPartRestartAction is the corresponding Action for 'machines part restart'.
func RobotsPartShellAction ¶ added in v0.9.0
RobotsPartShellAction is the corresponding Action for 'machines part shell'.
func RobotsPartStatusAction ¶ added in v0.9.0
RobotsPartStatusAction is the corresponding Action for 'machines part status'.
func RobotsPartTunnelAction ¶ added in v0.61.0
RobotsPartTunnelAction is the corresponding Action for 'machines part tunnel'.
func RobotsStatusAction ¶ added in v0.9.0
RobotsStatusAction is the corresponding Action for 'machines status'.
func UpdateBillingServiceAction ¶ added in v0.55.0
UpdateBillingServiceAction corresponds to `organizations billing-service update`.
func UpdateCLIAction ¶ added in v0.108.0
UpdateCLIAction updates the CLI to the latest version.
func UpdateMachineAction ¶ added in v0.107.0
UpdateMachineAction is the corresponding action for 'machines move'.
func UpdateModelsAction ¶ added in v0.12.0
UpdateModelsAction figures out the models that a module supports and updates it's metadata file.
func UpdateModuleAction ¶ added in v0.7.3
UpdateModuleAction is the corresponding Action for 'module update'. It runs the command to update a module. This includes updating the meta.json to include the public namespace (if set on the org).
func UpdateOAuthAppAction ¶ added in v0.58.0
UpdateOAuthAppAction is the corresponding action for 'oauth-app update'.
func UpdateProfileAction ¶ added in v0.56.0
UpdateProfileAction updates an existing CLI profile, or adds it if it doesn't already exist.
func UploadModuleAction ¶ added in v0.7.3
UploadModuleAction is the corresponding action for 'module upload'.
func VersionAction ¶ added in v0.7.3
VersionAction is the corresponding Action for 'version'.
func WhoAmIAction ¶ added in v0.7.3
WhoAmIAction is the corresponding Action for 'whoami'.
Types ¶
type AliasStringFlag ¶ added in v0.17.0
type AliasStringFlag struct {
cli.StringFlag
}
AliasStringFlag returns f.Name as the last member of Names(), and hides aliases from the String representation of the flag. This is useful for decluttering error messages and help text when aliases shouldn't be exposed to the user. Otherwise it is the same as cli.StringFlag.
func (AliasStringFlag) Names ¶ added in v0.17.0
func (f AliasStringFlag) Names() []string
Names have to be overwritten to prevent required flag errors from using aliases in its message. This returns f.Name as the last member of Names(), which is what the required flag error uses in its message.
func (*AliasStringFlag) String ¶ added in v0.63.0
func (f *AliasStringFlag) String() string
String has to be overwritten to avoid cluttering help text with all aliases for a flag, (e.g., `--organization, --org-id, --org-name, --org`). Instead, the string representation includes just the expected, canonical flag name.
type Annotation ¶ added in v0.33.0
type Annotation struct {
AnnotationLabel string `json:"annotation_label"`
}
Annotation holds the label associated with the image.
type AppComponent ¶ added in v0.67.0
type AppComponent struct {
Name string `json:"name"`
Type string `json:"type"`
Entrypoint string `json:"entrypoint"`
FragmentIDs []string `json:"fragmentIds,omitempty"`
LogoPath string `json:"logoPath,omitempty"`
Customizations *AppCustomizations `json:"customizations,omitempty"`
}
AppComponent represents metadata used to distinguish and describe an app.
type AppCustomizations ¶ added in v0.82.0
type AppCustomizations struct {
MachinePicker *MachinePickerCustomizations `json:"machinePicker,omitempty"`
}
AppCustomizations holds customizations for different app UI components.
type BBoxAnnotation ¶ added in v0.33.0
type BBoxAnnotation struct {
AnnotationLabel string `json:"annotation_label"`
XMinNormalized float64 `json:"x_min_normalized"`
XMaxNormalized float64 `json:"x_max_normalized"`
YMinNormalized float64 `json:"y_min_normalized"`
YMaxNormalized float64 `json:"y_max_normalized"`
}
BBoxAnnotation holds the information associated with each bounding box.
type Config ¶
type Config struct {
BaseURL string `json:"base_url"`
Auth authMethod `json:"auth"`
LastUpdateCheck string `json:"last_update_check"`
LatestVersion string `json:"latest_version"`
DefaultOrg string `json:"default_org"`
DefaultLocation string `json:"default_location"`
// contains filtered or unexported fields
}
Config is the schema for saved CLI credentials.
func ConfigFromCache ¶ added in v0.29.0
ConfigFromCache parses the cached json into a Config. Removes the config from cache on any error. TODO(RSDK-7812): maybe move shared code to common location.
func (*Config) DialOptions ¶ added in v0.29.0
func (conf *Config) DialOptions() ([]rpc.DialOption, error)
DialOptions constructs an rpc.DialOption slice from config.
type ImageMetadata ¶ added in v0.33.0
type ImageMetadata struct {
ImagePath string `json:"image_path"`
ClassificationAnnotations []Annotation `json:"classification_annotations"`
BBoxAnnotations []BBoxAnnotation `json:"bounding_box_annotations"`
Timestamp string `json:"timestamp"`
BinaryDataID string `json:"binary_data_id,omitempty"`
OrganizationID string `json:"organization_id,omitempty"`
RobotID string `json:"robot_id,omitempty"`
LocationID string `json:"location_id,omitempty"`
PartID string `json:"part_id,omitempty"`
ComponentName string `json:"component_name,omitempty"`
}
ImageMetadata defines the format of the data in jsonlines for custom training.
type MLMetadata ¶ added in v0.26.0
MLMetadata struct stores package info for ML training packages.
type MachinePickerCustomizations ¶ added in v0.82.0
type MachinePickerCustomizations struct {
Heading string `json:"heading,omitempty"`
Subheading string `json:"subheading,omitempty"`
}
MachinePickerCustomizations holds custom branding text for the machine picker UI.
type ModelFramework ¶ added in v0.26.0
type ModelFramework string
ModelFramework refers to the backend framework of the model.
type ModuleComponent ¶ added in v0.5.0
type ModuleComponent struct {
API string `json:"api"`
Model string `json:"model"`
Description *string `json:"short_description,omitempty"`
MarkdownLink *string `json:"markdown_link,omitempty"`
}
ModuleComponent represents an api - model pair.
type ModuleManifest ¶ added in v0.5.0
type ModuleManifest struct {
Schema string `json:"$schema"`
ModuleID string `json:"module_id"`
Visibility string `json:"visibility"`
URL string `json:"url"`
Description string `json:"description"`
Models []ModuleComponent `json:"models,omitempty"`
Apps []AppComponent `json:"applications"`
MarkdownLink *string `json:"markdown_link,omitempty"`
// JsonManifest provides fields shared with RDK proper.
modconfig.JSONManifest
Build *manifestBuildInfo `json:"build,omitempty"`
}
ModuleManifest is used to create & parse manifest.json. Detailed user-facing docs for this are in module.schema.json.
type ModuleMap ¶ added in v0.26.0
ModuleMap is a type alias to indicate where a map represents a module config. We don't convert to rdkConfig.Module because it can get out of date with what's in the db. Using maps directly also saves a lot of high-maintenance ser/des work.
type PackageType ¶ added in v0.26.0
type PackageType string
PackageType refers to the type of the package.
type ProgressManager ¶ added in v0.100.0
type ProgressManager struct {
// contains filtered or unexported fields
}
ProgressManager manages a sequence of steps with spinners (sequential display).
func NewProgressManager ¶ added in v0.100.0
func NewProgressManager(steps []*Step, opts ...ProgressManagerOption) *ProgressManager
NewProgressManager creates a new ProgressManager with all steps registered upfront.
func (*ProgressManager) Complete ¶ added in v0.100.0
func (pm *ProgressManager) Complete(stepID string) error
Complete marks a step as completed with a success message.
func (*ProgressManager) CompleteWithMessage ¶ added in v0.100.0
func (pm *ProgressManager) CompleteWithMessage(stepID, message string) error
CompleteWithMessage marks a step as completed with a custom message.
func (*ProgressManager) Fail ¶ added in v0.100.0
func (pm *ProgressManager) Fail(stepID string, err error) error
Fail marks a step as failed with an error message.
func (*ProgressManager) FailWithMessage ¶ added in v0.100.0
func (pm *ProgressManager) FailWithMessage(stepID, message string) error
FailWithMessage marks a step as failed with a custom message.
func (*ProgressManager) Start ¶ added in v0.100.0
func (pm *ProgressManager) Start(stepID string) error
Start begins animating the spinner for the given step ID.
func (*ProgressManager) Stop ¶ added in v0.100.0
func (pm *ProgressManager) Stop()
Stop stops any active spinner.
func (*ProgressManager) UpdateText ¶ added in v0.100.0
func (pm *ProgressManager) UpdateText(text string)
UpdateText updates the text of the currently active spinner (for progress updates).
type ProgressManagerOption ¶ added in v0.100.0
type ProgressManagerOption func(*ProgressManager)
ProgressManagerOption allows customizing ProgressManager behavior at creation time.
func WithProgressOutput ¶ added in v0.100.0
func WithProgressOutput(enabled bool) ProgressManagerOption
WithProgressOutput enables or disables terminal output for a ProgressManager.
type ResourceMap ¶ added in v0.90.0
ResourceMap is the same kind of thing as ModuleMap (see above), a map representing a single resource.
type Step ¶ added in v0.100.0
type Step struct {
ID string
Message string
Status StepStatus
CompletedMsg string // Optional: Custom message when completed
FailedMsg string // Optional: Custom message when failed
IndentLevel int // 0 = root, 1 = child (→), 2 = nested child, etc.
// contains filtered or unexported fields
}
Step represents a single progress step.
type StepStatus ¶ added in v0.100.0
type StepStatus int
StepStatus represents the state of a progress step.
const ( // StepPending indicates a step has not yet started. StepPending StepStatus = iota // StepRunning indicates a step is currently in progress. StepRunning // StepCompleted indicates a step finished successfully. StepCompleted // StepFailed indicates a step encountered an error. StepFailed )
Source Files
¶
- app.go
- archive.go
- auth.go
- client.go
- config.go
- customindex.go
- data.go
- datapipelines.go
- dataset.go
- defaults.go
- flags.go
- ftdc.go
- metadata_read.go
- ml_inference.go
- ml_training.go
- module_build.go
- module_generate.go
- module_local_viam_apps_setup.go
- module_registry.go
- module_reload.go
- motion.go
- packages.go
- print.go
- profile.go
- progress_manager.go
- syscall_unix.go
- traces.go
- utils.go
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
cli_lint
command
Package main is the CLI-specific linter itself.
|
Package main is the CLI-specific linter itself. |
|
module_generate
|
|
|
modulegen
Package modulegen contains defined types used for module generation
|
Package modulegen contains defined types used for module generation |
|
scripts
Package scripts contains scripts that generate method stubs for modules
|
Package scripts contains scripts that generate method stubs for modules |
|
Package main is the CLI command itself.
|
Package main is the CLI command itself. |