Documentation ¶
Overview ¶
Package app contains the interfaces that manage a machine fleet with code instead of with the graphical interface of the Viam App.
Package app contains a gRPC based data client.
Package app contains all logic needed for communication and interaction with app.
Index ¶
- Constants
- func BsonToGo(rawData [][]byte) ([]map[string]interface{}, error)
- type APIKey
- type APIKeyAuthorization
- type APIKeyWithAuthorizations
- type Annotations
- type AppClient
- func (c *AppClient) AddRole(ctx context.Context, orgID, identityID string, role AuthRole, ...) error
- func (c *AppClient) ChangeRole(ctx context.Context, oldAuthorization *Authorization, ...) error
- func (c *AppClient) CheckPermissions(ctx context.Context, permissions []*AuthorizedPermissions) ([]*AuthorizedPermissions, error)
- func (c *AppClient) CreateFragment(ctx context.Context, orgID, name string, config map[string]interface{}, ...) (*Fragment, error)
- func (c *AppClient) CreateKey(ctx context.Context, orgID string, keyAuthorizations []APIKeyAuthorization, ...) (string, string, error)
- func (c *AppClient) CreateKeyFromExistingKeyAuthorizations(ctx context.Context, id string) (string, string, error)
- func (c *AppClient) CreateLocation(ctx context.Context, orgID, name string, opts *CreateLocationOptions) (*Location, error)
- func (c *AppClient) CreateLocationSecret(ctx context.Context, locationID string) (*LocationAuth, error)
- func (c *AppClient) CreateModule(ctx context.Context, orgID, name string) (string, string, error)
- func (c *AppClient) CreateOrganization(ctx context.Context, name string) (*Organization, error)
- func (c *AppClient) CreateOrganizationInvite(ctx context.Context, orgID, email string, authorizations []*Authorization, ...) (*OrganizationInvite, error)
- func (c *AppClient) CreateRegistryItem(ctx context.Context, orgID, name string, packageType PackageType) error
- func (c *AppClient) CreateRobotPartSecret(ctx context.Context, partID string) (*RobotPart, error)
- func (c *AppClient) DeleteFragment(ctx context.Context, id string) error
- func (c *AppClient) DeleteKey(ctx context.Context, id string) error
- func (c *AppClient) DeleteLocation(ctx context.Context, locationID string) error
- func (c *AppClient) DeleteLocationSecret(ctx context.Context, locationID, secretID string) error
- func (c *AppClient) DeleteOrganization(ctx context.Context, orgID string) error
- func (c *AppClient) DeleteOrganizationInvite(ctx context.Context, orgID, email string) error
- func (c *AppClient) DeleteOrganizationMember(ctx context.Context, orgID, userID string) error
- func (c *AppClient) DeleteRegistryItem(ctx context.Context, itemID string) error
- func (c *AppClient) DeleteRobot(ctx context.Context, id string) error
- func (c *AppClient) DeleteRobotPart(ctx context.Context, partID string) error
- func (c *AppClient) DeleteRobotPartSecret(ctx context.Context, partID, secretID string) error
- func (c *AppClient) DisableBillingService(ctx context.Context, orgID string) error
- func (c *AppClient) EnableBillingService(ctx context.Context, orgID string, billingAddress *BillingAddress) error
- func (c *AppClient) GetBillingServiceConfig(ctx context.Context, orgID string) (*pb.GetBillingServiceConfigResponse, error)
- func (c *AppClient) GetFragment(ctx context.Context, id string) (*Fragment, error)
- func (c *AppClient) GetFragmentHistory(ctx context.Context, id string, opts *GetFragmentHistoryOptions) ([]*FragmentHistoryEntry, string, error)
- func (c *AppClient) GetLocation(ctx context.Context, locationID string) (*Location, error)
- func (c *AppClient) GetModule(ctx context.Context, moduleID string) (*Module, error)
- func (c *AppClient) GetOrganization(ctx context.Context, orgID string) (*Organization, error)
- func (c *AppClient) GetOrganizationNamespaceAvailability(ctx context.Context, namespace string) (bool, error)
- func (c *AppClient) GetOrganizationsWithAccessToLocation(ctx context.Context, locationID string) ([]*OrganizationIdentity, error)
- func (c *AppClient) GetRegistryItem(ctx context.Context, itemID string) (*RegistryItem, error)
- func (c *AppClient) GetRobot(ctx context.Context, id string) (*Robot, error)
- func (c *AppClient) GetRobotAPIKeys(ctx context.Context, robotID string) ([]*APIKeyWithAuthorizations, error)
- func (c *AppClient) GetRobotPart(ctx context.Context, id string) (*RobotPart, string, error)
- func (c *AppClient) GetRobotPartHistory(ctx context.Context, id string) ([]*RobotPartHistoryEntry, error)
- func (c *AppClient) GetRobotPartLogs(ctx context.Context, id string, opts *GetRobotPartLogsOptions) ([]*LogEntry, string, error)
- func (c *AppClient) GetRobotParts(ctx context.Context, robotID string) ([]*RobotPart, error)
- func (c *AppClient) GetRoverRentalRobots(ctx context.Context, orgID string) ([]*RoverRentalRobot, error)
- func (c *AppClient) GetUserIDByEmail(ctx context.Context, email string) (string, error)
- func (c *AppClient) ListAuthorizations(ctx context.Context, orgID string, resourceIDs []string) ([]*Authorization, error)
- func (c *AppClient) ListFragments(ctx context.Context, orgID string, showPublic bool, ...) ([]*Fragment, error)
- func (c *AppClient) ListKeys(ctx context.Context, orgID string) ([]*APIKeyWithAuthorizations, error)
- func (c *AppClient) ListLocations(ctx context.Context, orgID string) ([]*Location, error)
- func (c *AppClient) ListMachineFragments(ctx context.Context, machineID string, additionalIDs []string) ([]*Fragment, error)
- func (c *AppClient) ListModules(ctx context.Context, opts *ListModulesOptions) ([]*Module, error)
- func (c *AppClient) ListOAuthApps(ctx context.Context, orgID string) ([]string, error)
- func (c *AppClient) ListOrganizationMembers(ctx context.Context, orgID string) ([]*OrganizationMember, []*OrganizationInvite, error)
- func (c *AppClient) ListOrganizations(ctx context.Context) ([]*Organization, error)
- func (c *AppClient) ListOrganizationsByUser(ctx context.Context, userID string) ([]*OrgDetails, error)
- func (c *AppClient) ListRegistryItems(ctx context.Context, orgID *string, types []PackageType, ...) ([]*RegistryItem, error)
- func (c *AppClient) ListRobots(ctx context.Context, locationID string) ([]*Robot, error)
- func (c *AppClient) LocationAuth(ctx context.Context, locationID string) (*LocationAuth, error)
- func (c *AppClient) MarkPartAsMain(ctx context.Context, partID string) error
- func (c *AppClient) MarkPartForRestart(ctx context.Context, partID string) error
- func (c *AppClient) NewRobot(ctx context.Context, name, location string) (string, error)
- func (c *AppClient) NewRobotPart(ctx context.Context, robotID, partName string) (string, error)
- func (c *AppClient) OrganizationGetLogo(ctx context.Context, orgID string) (string, error)
- func (c *AppClient) OrganizationGetSupportEmail(ctx context.Context, orgID string) (string, error)
- func (c *AppClient) OrganizationSetLogo(ctx context.Context, orgID string, logo []byte) error
- func (c *AppClient) OrganizationSetSupportEmail(ctx context.Context, orgID, email string) error
- func (c *AppClient) RemoveRole(ctx context.Context, authorization *Authorization) error
- func (c *AppClient) RenameKey(ctx context.Context, id, name string) (string, string, error)
- func (c *AppClient) ResendOrganizationInvite(ctx context.Context, orgID, email string) (*OrganizationInvite, error)
- func (c *AppClient) RotateKey(ctx context.Context, id string) (string, string, error)
- func (c *AppClient) ShareLocation(ctx context.Context, locationID, orgID string) error
- func (c *AppClient) TailRobotPartLogs(ctx context.Context, id string, errorsOnly bool, ...) (*RobotPartLogStream, error)
- func (c *AppClient) TransferRegistryItem(ctx context.Context, itemID, newPublicNamespace string) error
- func (c *AppClient) UnshareLocation(ctx context.Context, locationID, orgID string) error
- func (c *AppClient) UpdateBillingService(ctx context.Context, orgID string, billingAddress *BillingAddress) error
- func (c *AppClient) UpdateFragment(ctx context.Context, id, name string, config map[string]interface{}, ...) (*Fragment, error)
- func (c *AppClient) UpdateLocation(ctx context.Context, locationID string, opts *UpdateLocationOptions) (*Location, error)
- func (c *AppClient) UpdateModule(ctx context.Context, moduleID string, visibility Visibility, ...) (string, error)
- func (c *AppClient) UpdateOrganization(ctx context.Context, orgID string, opts *UpdateOrganizationOptions) (*Organization, error)
- func (c *AppClient) UpdateOrganizationInviteAuthorizations(ctx context.Context, orgID, email string, ...) (*OrganizationInvite, error)
- func (c *AppClient) UpdateRegistryItem(ctx context.Context, itemID string, packageType PackageType, ...) error
- func (c *AppClient) UpdateRobot(ctx context.Context, id, name, location string) (*Robot, error)
- func (c *AppClient) UpdateRobotPart(ctx context.Context, id, name string, robotConfig interface{}) (*RobotPart, error)
- func (c *AppClient) UploadModuleFile(ctx context.Context, fileInfo ModuleFileInfo, file []byte) (string, error)
- type AuthResourceType
- type AuthRole
- type AuthenticationType
- type AuthenticatorInfo
- type Authorization
- type AuthorizationDetails
- type AuthorizedPermissions
- type BillingAddress
- type BillingClient
- func (c *BillingClient) GetCurrentMonthUsage(ctx context.Context, orgID string) (*GetCurrentMonthUsageResponse, error)
- func (c *BillingClient) GetInvoicePDF(ctx context.Context, id, orgID string) ([]byte, error)
- func (c *BillingClient) GetInvoicesSummary(ctx context.Context, orgID string) (float64, []*InvoiceSummary, error)
- func (c *BillingClient) GetOrgBillingInformation(ctx context.Context, orgID string) (*GetOrgBillingInformationResponse, error)
- func (c *BillingClient) SendPaymentRequiredEmail(ctx context.Context, customerOrgID, billingOwnerOrgID string) error
- type BinaryData
- type BinaryDataByFilterResponse
- type BinaryDataCaptureUploadOptions
- type BinaryID
- type BinaryMetadata
- type BoundingBox
- type CaptureInterval
- type CaptureMetadata
- type CloudConfig
- type CreateFragmentOptions
- type CreateLocationOptions
- type CreateOrganizationInviteOptions
- type DataByFilterOptions
- type DataClient
- func (d *DataClient) AddBinaryDataToDatasetByIDs(ctx context.Context, binaryIDs []*BinaryID, datasetID string) error
- func (d *DataClient) AddBoundingBoxToImageByID(ctx context.Context, binaryID *BinaryID, label string, xMinNormalized float64, ...) (string, error)
- func (d *DataClient) AddTagsToBinaryDataByFilter(ctx context.Context, tags []string, filter *Filter) error
- func (d *DataClient) AddTagsToBinaryDataByIDs(ctx context.Context, tags []string, binaryIDs []*BinaryID) error
- func (d *DataClient) BinaryDataByFilter(ctx context.Context, includeBinary bool, opts *DataByFilterOptions) (*BinaryDataByFilterResponse, error)
- func (d *DataClient) BinaryDataByIDs(ctx context.Context, binaryIDs []*BinaryID) ([]*BinaryData, error)
- func (d *DataClient) BinaryDataCaptureUpload(ctx context.Context, binaryData []byte, partID string, componentType string, ...) (string, error)
- func (d *DataClient) BoundingBoxLabelsByFilter(ctx context.Context, filter *Filter) ([]string, error)
- func (d *DataClient) ConfigureDatabaseUser(ctx context.Context, organizationID string, password string) error
- func (d *DataClient) CreateDataset(ctx context.Context, name, organizationID string) (string, error)
- func (d *DataClient) DeleteBinaryDataByFilter(ctx context.Context, filter *Filter) (int, error)
- func (d *DataClient) DeleteBinaryDataByIDs(ctx context.Context, binaryIDs []*BinaryID) (int, error)
- func (d *DataClient) DeleteDataset(ctx context.Context, id string) error
- func (d *DataClient) DeleteTabularData(ctx context.Context, organizationID string, deleteOlderThanDays int) (int, error)
- func (d *DataClient) ExportTabularData(ctx context.Context, partID, resourceName, resourceSubtype, method string, ...) ([]*ExportTabularDataResponse, error)
- func (d *DataClient) FileUploadFromBytes(ctx context.Context, partID string, data []byte, opts *FileUploadOptions) (string, error)
- func (d *DataClient) FileUploadFromPath(ctx context.Context, partID string, filePath string, opts *FileUploadOptions) (string, error)
- func (d *DataClient) GetDatabaseConnection(ctx context.Context, organizationID string) (*GetDatabaseConnectionResponse, error)
- func (d *DataClient) GetLatestTabularData(ctx context.Context, partID, resourceName, resourceSubtype, methodName string) (*GetLatestTabularDataResponse, error)
- func (d *DataClient) ListDatasetsByIDs(ctx context.Context, ids []string) ([]*Dataset, error)
- func (d *DataClient) ListDatasetsByOrganizationID(ctx context.Context, organizationID string) ([]*Dataset, error)
- func (d *DataClient) RemoveBinaryDataFromDatasetByIDs(ctx context.Context, binaryIDs []*BinaryID, datasetID string) error
- func (d *DataClient) RemoveBoundingBoxFromImageByID(ctx context.Context, bboxID string, binaryID *BinaryID) error
- func (d *DataClient) RemoveTagsFromBinaryDataByFilter(ctx context.Context, tags []string, filter *Filter) (int, error)
- func (d *DataClient) RemoveTagsFromBinaryDataByIDs(ctx context.Context, tags []string, binaryIDs []*BinaryID) (int, error)
- func (d *DataClient) RenameDataset(ctx context.Context, id, name string) error
- func (d *DataClient) StreamingDataCaptureUpload(ctx context.Context, data []byte, partID string, fileExt string, ...) (string, error)
- func (d *DataClient) TabularDataByFilter(ctx context.Context, opts *DataByFilterOptions) (*TabularDataByFilterResponse, error)
- func (d *DataClient) TabularDataByMQL(ctx context.Context, organizationID string, query []map[string]interface{}) ([]map[string]interface{}, error)
- func (d *DataClient) TabularDataBySQL(ctx context.Context, organizationID, sqlQuery string) ([]map[string]interface{}, error)
- func (d *DataClient) TabularDataCaptureUpload(ctx context.Context, tabularData []map[string]interface{}, partID string, ...) (string, error)
- func (d *DataClient) TagsByFilter(ctx context.Context, filter *Filter) ([]string, error)
- func (d *DataClient) UpdateBoundingBox(ctx context.Context, binaryID *BinaryID, bboxID string, ...) error
- type DataRequest
- type DataType
- type Dataset
- type ExportTabularDataResponse
- type FileData
- type FileUploadOptions
- type Filter
- type Fragment
- type FragmentHistoryEntry
- type FragmentVisibility
- type GetCurrentMonthUsageResponse
- type GetDatabaseConnectionResponse
- type GetFragmentHistoryOptions
- type GetLatestTabularDataResponse
- type GetOrgBillingInformationResponse
- type GetRobotPartLogsOptions
- type GetSmartMachineStatusResponse
- type GetTrainingJobLogsOptions
- type InvoiceSummary
- type ListModulesOptions
- type ListRegistryItemsOptions
- type Location
- type LocationAuth
- type LocationOrganization
- type LogEntry
- type MLModelMetadata
- type MLTrainingClient
- func (c *MLTrainingClient) CancelTrainingJob(ctx context.Context, id string) error
- func (c *MLTrainingClient) DeleteCompletedTrainingJob(ctx context.Context, id string) error
- func (c *MLTrainingClient) GetTrainingJob(ctx context.Context, id string) (*TrainingJobMetadata, error)
- func (c *MLTrainingClient) GetTrainingJobLogs(ctx context.Context, id string, opts *GetTrainingJobLogsOptions) ([]*TrainingJobLogEntry, string, error)
- func (c *MLTrainingClient) ListTrainingJobs(ctx context.Context, organizationID string, status TrainingStatus) ([]*TrainingJobMetadata, error)
- func (c *MLTrainingClient) SubmitCustomTrainingJob(ctx context.Context, args SubmitTrainingJobArgs, ...) (string, error)
- func (c *MLTrainingClient) SubmitTrainingJob(ctx context.Context, args SubmitTrainingJobArgs, modelType ModelType, ...) (string, error)
- type MLTrainingMetadata
- type MLTrainingVersion
- type MimeType
- type Model
- type ModelFramework
- type ModelType
- type Module
- type ModuleFileInfo
- type ModuleMetadata
- type ModuleVersion
- type NetworkInfo
- type Options
- type Order
- type OrgDetails
- type Organization
- type OrganizationIdentity
- type OrganizationInvite
- type OrganizationMember
- type PackageType
- type PaymentMethodCard
- type PaymentMethodType
- type ProvisioningClient
- func (c *ProvisioningClient) GetNetworkList(ctx context.Context) ([]*NetworkInfo, error)
- func (c *ProvisioningClient) GetSmartMachineStatus(ctx context.Context) (*GetSmartMachineStatusResponse, error)
- func (c *ProvisioningClient) SetNetworkCredentials(ctx context.Context, credentialsType, ssid, psk string) error
- func (c *ProvisioningClient) SetSmartMachineCredentials(ctx context.Context, cloud *CloudConfig) error
- type ProvisioningInfo
- type RegistryItem
- type RegistryItemStatus
- type ResourceUsageCosts
- type ResourceUsageCostsBySource
- type Robot
- type RobotPart
- type RobotPartHistoryEntry
- type RobotPartLogStream
- type RoverRentalRobot
- type SensorData
- type SensorMetadata
- type SharedSecret
- type SharedSecretState
- type SourceType
- type StorageConfig
- type StreamingDataCaptureUploadOptions
- type SubmitTrainingJobArgs
- type TabularData
- type TabularDataByFilterResponse
- type TabularDataCaptureUploadOptions
- type TagsFilter
- type TagsFilterType
- type TailRobotPartLogsOptions
- type TrainingJobLogEntry
- type TrainingJobMetadata
- type TrainingStatus
- type UpdateBoundingBoxOptions
- type UpdateFragmentOptions
- type UpdateLocationOptions
- type UpdateModuleOptions
- type UpdateOrganizationOptions
- type UpdateRegistryItemOptions
- type UploadMetadata
- type Uploads
- type UsageCost
- type UsageCostType
- type VersionHistory
- type ViamClient
- type Visibility
Constants ¶
const ( // AuthResourceTypeOrganization represents an organization authorization type. AuthResourceTypeOrganization = "organization" // AuthResourceTypeLocation represents a location authorization type. AuthResourceTypeLocation = "location" // AuthResourceTypeRobot represents a robot authorization type. AuthResourceTypeRobot = "robot" )
const (
UploadChunkSize = 64 * 1024 // UploadChunkSize is 64 KB
)
Constants used throughout app.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIKeyAuthorization ¶ added in v0.53.0
type APIKeyAuthorization struct {
// contains filtered or unexported fields
}
APIKeyAuthorization is a struct with the necessary authorization data to create an API key.
type APIKeyWithAuthorizations ¶ added in v0.53.0
type APIKeyWithAuthorizations struct { APIKey *APIKey Authorizations []*AuthorizationDetails }
APIKeyWithAuthorizations is an API Key with its authorizations.
type Annotations ¶ added in v0.52.0
type Annotations struct {
Bboxes []*BoundingBox
}
Annotations are data annotations used for machine learning.
type AppClient ¶ added in v0.53.0
type AppClient struct {
// contains filtered or unexported fields
}
AppClient is a gRPC client for method calls to the App API.
func (*AppClient) AddRole ¶ added in v0.53.0
func (c *AppClient) AddRole( ctx context.Context, orgID, identityID string, role AuthRole, resourceType AuthResourceType, resourceID string, ) error
AddRole creates an identity authorization.
func (*AppClient) ChangeRole ¶ added in v0.53.0
func (c *AppClient) ChangeRole( ctx context.Context, oldAuthorization *Authorization, newOrgID, newIdentityID string, newRole AuthRole, newResourceType AuthResourceType, newResourceID string, ) error
ChangeRole changes an identity authorization to a new identity authorization.
func (*AppClient) CheckPermissions ¶ added in v0.53.0
func (c *AppClient) CheckPermissions(ctx context.Context, permissions []*AuthorizedPermissions) ([]*AuthorizedPermissions, error)
CheckPermissions checks the validity of a list of permissions.
func (*AppClient) CreateFragment ¶ added in v0.53.0
func (c *AppClient) CreateFragment( ctx context.Context, orgID, name string, config map[string]interface{}, opts *CreateFragmentOptions, ) (*Fragment, error)
CreateFragment creates a fragment.
func (*AppClient) CreateKey ¶ added in v0.53.0
func (c *AppClient) CreateKey( ctx context.Context, orgID string, keyAuthorizations []APIKeyAuthorization, name string, ) (string, string, error)
CreateKey creates a new API key associated with a list of authorizations and returns its key and ID.
func (*AppClient) CreateKeyFromExistingKeyAuthorizations ¶ added in v0.53.0
func (c *AppClient) CreateKeyFromExistingKeyAuthorizations(ctx context.Context, id string) (string, string, error)
CreateKeyFromExistingKeyAuthorizations creates a new API key with an existing key's authorizations and returns its ID and key.
func (*AppClient) CreateLocation ¶ added in v0.53.0
func (c *AppClient) CreateLocation(ctx context.Context, orgID, name string, opts *CreateLocationOptions) (*Location, error)
CreateLocation creates a location with the given name under the given organization.
func (*AppClient) CreateLocationSecret ¶ added in v0.53.0
func (c *AppClient) CreateLocationSecret(ctx context.Context, locationID string) (*LocationAuth, error)
CreateLocationSecret creates a new generated secret in the location. Succeeds if there are no more than 2 active secrets after creation.
func (*AppClient) CreateModule ¶ added in v0.53.0
CreateModule creates a module and returns its ID and URL.
func (*AppClient) CreateOrganization ¶ added in v0.53.0
CreateOrganization creates a new organization.
func (*AppClient) CreateOrganizationInvite ¶ added in v0.53.0
func (c *AppClient) CreateOrganizationInvite( ctx context.Context, orgID, email string, authorizations []*Authorization, opts *CreateOrganizationInviteOptions, ) (*OrganizationInvite, error)
CreateOrganizationInvite creates an organization invite to an organization.
func (*AppClient) CreateRegistryItem ¶ added in v0.53.0
func (c *AppClient) CreateRegistryItem(ctx context.Context, orgID, name string, packageType PackageType) error
CreateRegistryItem creates a registry item.
func (*AppClient) CreateRobotPartSecret ¶ added in v0.53.0
CreateRobotPartSecret creates a new generated secret in the robot part. Succeeds if there are no more than 2 active secrets after creation.
func (*AppClient) DeleteFragment ¶ added in v0.53.0
DeleteFragment deletes a fragment.
func (*AppClient) DeleteLocation ¶ added in v0.53.0
DeleteLocation deletes a location.
func (*AppClient) DeleteLocationSecret ¶ added in v0.53.0
DeleteLocationSecret deletes a secret from the location.
func (*AppClient) DeleteOrganization ¶ added in v0.53.0
DeleteOrganization deletes an organization.
func (*AppClient) DeleteOrganizationInvite ¶ added in v0.53.0
DeleteOrganizationInvite deletes an organization invite.
func (*AppClient) DeleteOrganizationMember ¶ added in v0.53.0
DeleteOrganizationMember deletes an organization member from an organization.
func (*AppClient) DeleteRegistryItem ¶ added in v0.53.0
DeleteRegistryItem deletes a registry item given an ID that is formatted as `prefix:name“ where `prefix“ is the owner's organization ID or namespace.
func (*AppClient) DeleteRobot ¶ added in v0.53.0
DeleteRobot deletes a robot.
func (*AppClient) DeleteRobotPart ¶ added in v0.53.0
DeleteRobotPart deletes a robot part.
func (*AppClient) DeleteRobotPartSecret ¶ added in v0.53.0
DeleteRobotPartSecret deletes a secret from the robot part.
func (*AppClient) DisableBillingService ¶ added in v0.53.0
DisableBillingService disables the billing service for an organization.
func (*AppClient) EnableBillingService ¶ added in v0.53.0
func (c *AppClient) EnableBillingService(ctx context.Context, orgID string, billingAddress *BillingAddress) error
EnableBillingService enables a billing service to an address in an organization.
func (*AppClient) GetBillingServiceConfig ¶ added in v0.54.0
func (c *AppClient) GetBillingServiceConfig(ctx context.Context, orgID string) (*pb.GetBillingServiceConfigResponse, error)
GetBillingServiceConfig gets the billing service configuration for an organization.
func (*AppClient) GetFragment ¶ added in v0.53.0
GetFragment gets a single fragment.
func (*AppClient) GetFragmentHistory ¶ added in v0.53.0
func (c *AppClient) GetFragmentHistory( ctx context.Context, id string, opts *GetFragmentHistoryOptions, ) ([]*FragmentHistoryEntry, string, error)
GetFragmentHistory gets the fragment's history and the next page token.
func (*AppClient) GetLocation ¶ added in v0.53.0
GetLocation gets a location.
func (*AppClient) GetOrganization ¶ added in v0.53.0
GetOrganization gets an organization.
func (*AppClient) GetOrganizationNamespaceAvailability ¶ added in v0.53.0
func (c *AppClient) GetOrganizationNamespaceAvailability(ctx context.Context, namespace string) (bool, error)
GetOrganizationNamespaceAvailability checks for namespace availability throughout all organizations.
func (*AppClient) GetOrganizationsWithAccessToLocation ¶ added in v0.53.0
func (c *AppClient) GetOrganizationsWithAccessToLocation(ctx context.Context, locationID string) ([]*OrganizationIdentity, error)
GetOrganizationsWithAccessToLocation gets all the organizations that have access to a location.
func (*AppClient) GetRegistryItem ¶ added in v0.53.0
GetRegistryItem gets a registry item.
func (*AppClient) GetRobotAPIKeys ¶ added in v0.53.0
func (c *AppClient) GetRobotAPIKeys(ctx context.Context, robotID string) ([]*APIKeyWithAuthorizations, error)
GetRobotAPIKeys gets the robot API keys for the robot.
func (*AppClient) GetRobotPart ¶ added in v0.53.0
GetRobotPart gets a specific robot part and its config by ID.
func (*AppClient) GetRobotPartHistory ¶ added in v0.53.0
func (c *AppClient) GetRobotPartHistory(ctx context.Context, id string) ([]*RobotPartHistoryEntry, error)
GetRobotPartHistory gets a specific robot part history by ID.
func (*AppClient) GetRobotPartLogs ¶ added in v0.53.0
func (c *AppClient) GetRobotPartLogs(ctx context.Context, id string, opts *GetRobotPartLogsOptions) ([]*LogEntry, string, error)
GetRobotPartLogs gets the logs associated with a robot part and the next page token.
func (*AppClient) GetRobotParts ¶ added in v0.53.0
GetRobotParts gets a list of all the parts under a specific machine.
func (*AppClient) GetRoverRentalRobots ¶ added in v0.53.0
func (c *AppClient) GetRoverRentalRobots(ctx context.Context, orgID string) ([]*RoverRentalRobot, error)
GetRoverRentalRobots gets rover rental robots within an organization.
func (*AppClient) GetUserIDByEmail ¶ added in v0.53.0
GetUserIDByEmail gets the ID of the user with the given email.
func (*AppClient) ListAuthorizations ¶ added in v0.53.0
func (c *AppClient) ListAuthorizations(ctx context.Context, orgID string, resourceIDs []string) ([]*Authorization, error)
ListAuthorizations returns all authorization roles for any given resources. If no resources are given, all resources within the organization will be included.
func (*AppClient) ListFragments ¶ added in v0.53.0
func (c *AppClient) ListFragments( ctx context.Context, orgID string, showPublic bool, fragmentVisibility []FragmentVisibility, ) ([]*Fragment, error)
ListFragments gets a list of fragments.
func (*AppClient) ListKeys ¶ added in v0.53.0
func (c *AppClient) ListKeys(ctx context.Context, orgID string) ([]*APIKeyWithAuthorizations, error)
ListKeys lists all the keys for the organization.
func (*AppClient) ListLocations ¶ added in v0.53.0
ListLocations gets a list of locations under the specified organization.
func (*AppClient) ListMachineFragments ¶ added in v0.53.0
func (c *AppClient) ListMachineFragments(ctx context.Context, machineID string, additionalIDs []string) ([]*Fragment, error)
ListMachineFragments gets top level and nested fragments for a amchine, as well as any other fragments specified by IDs. Additional fragments are useful to view fragments that will be provisionally added to the machine alongside existing fragments.
func (*AppClient) ListModules ¶ added in v0.53.0
ListModules lists the modules in the organization.
func (*AppClient) ListOAuthApps ¶ added in v0.58.0
ListOAuthApps gets the client's list of OAuth applications.
func (*AppClient) ListOrganizationMembers ¶ added in v0.53.0
func (c *AppClient) ListOrganizationMembers(ctx context.Context, orgID string) ([]*OrganizationMember, []*OrganizationInvite, error)
ListOrganizationMembers lists all members of an organization and all invited members to the organization.
func (*AppClient) ListOrganizations ¶ added in v0.53.0
func (c *AppClient) ListOrganizations(ctx context.Context) ([]*Organization, error)
ListOrganizations lists all the organizations.
func (*AppClient) ListOrganizationsByUser ¶ added in v0.53.0
func (c *AppClient) ListOrganizationsByUser(ctx context.Context, userID string) ([]*OrgDetails, error)
ListOrganizationsByUser lists all the organizations that a user belongs to.
func (*AppClient) ListRegistryItems ¶ added in v0.53.0
func (c *AppClient) ListRegistryItems( ctx context.Context, orgID *string, types []PackageType, visibilities []Visibility, platforms []string, statuses []RegistryItemStatus, opts *ListRegistryItemsOptions, ) ([]*RegistryItem, error)
ListRegistryItems lists the registry items in an organization.
func (*AppClient) ListRobots ¶ added in v0.53.0
ListRobots gets a list of robots under a location.
func (*AppClient) LocationAuth ¶ added in v0.53.0
LocationAuth gets a location's authorization secrets.
func (*AppClient) MarkPartAsMain ¶ added in v0.53.0
MarkPartAsMain marks the given part as the main part, and all the others as not.
func (*AppClient) MarkPartForRestart ¶ added in v0.53.0
MarkPartForRestart marks the given part for restart. Once the robot part checks-in with the app the flag is reset on the robot part. Calling this multiple times before a robot part checks-in has no effect.
func (*AppClient) NewRobotPart ¶ added in v0.53.0
NewRobotPart creates a new robot part and returns its ID.
func (*AppClient) OrganizationGetLogo ¶ added in v0.55.0
OrganizationGetLogo gets an organization's logo.
func (*AppClient) OrganizationGetSupportEmail ¶ added in v0.53.0
OrganizationGetSupportEmail gets an organization's support email.
func (*AppClient) OrganizationSetLogo ¶ added in v0.55.0
OrganizationSetLogo sets an organization's logo.
func (*AppClient) OrganizationSetSupportEmail ¶ added in v0.53.0
OrganizationSetSupportEmail sets an organization's support email.
func (*AppClient) RemoveRole ¶ added in v0.53.0
func (c *AppClient) RemoveRole(ctx context.Context, authorization *Authorization) error
RemoveRole deletes an identity authorization.
func (*AppClient) RenameKey ¶ added in v0.53.0
RenameKey renames an API key and returns its ID and name.
func (*AppClient) ResendOrganizationInvite ¶ added in v0.53.0
func (c *AppClient) ResendOrganizationInvite(ctx context.Context, orgID, email string) (*OrganizationInvite, error)
ResendOrganizationInvite resends an organization invite.
func (*AppClient) RotateKey ¶ added in v0.53.0
RotateKey rotates an API key and returns its ID and key.
func (*AppClient) ShareLocation ¶ added in v0.53.0
ShareLocation shares a location with an organization.
func (*AppClient) TailRobotPartLogs ¶ added in v0.53.0
func (c *AppClient) TailRobotPartLogs( ctx context.Context, id string, errorsOnly bool, opts *TailRobotPartLogsOptions, ) (*RobotPartLogStream, error)
TailRobotPartLogs gets a stream of log entries for a specific robot part. Logs are ordered by newest first.
func (*AppClient) TransferRegistryItem ¶ added in v0.53.0
func (c *AppClient) TransferRegistryItem(ctx context.Context, itemID, newPublicNamespace string) error
TransferRegistryItem transfers a registry item to a namespace.
func (*AppClient) UnshareLocation ¶ added in v0.53.0
UnshareLocation stops sharing a location with an organization.
func (*AppClient) UpdateBillingService ¶ added in v0.53.0
func (c *AppClient) UpdateBillingService(ctx context.Context, orgID string, billingAddress *BillingAddress) error
UpdateBillingService updates the billing service of an organization.
func (*AppClient) UpdateFragment ¶ added in v0.53.0
func (c *AppClient) UpdateFragment( ctx context.Context, id, name string, config map[string]interface{}, opts *UpdateFragmentOptions, ) (*Fragment, error)
UpdateFragment updates a fragment.
func (*AppClient) UpdateLocation ¶ added in v0.53.0
func (c *AppClient) UpdateLocation(ctx context.Context, locationID string, opts *UpdateLocationOptions) (*Location, error)
UpdateLocation updates a location.
func (*AppClient) UpdateModule ¶ added in v0.53.0
func (c *AppClient) UpdateModule( ctx context.Context, moduleID string, visibility Visibility, url, description string, models []*Model, entrypoint string, opts *UpdateModuleOptions, ) (string, error)
UpdateModule updates the documentation URL, description, models, entrypoint, and/or the visibility of a module and returns its URL. A path to a setup script can be added that is run before a newly downloaded module starts.
func (*AppClient) UpdateOrganization ¶ added in v0.53.0
func (c *AppClient) UpdateOrganization(ctx context.Context, orgID string, opts *UpdateOrganizationOptions) (*Organization, error)
UpdateOrganization updates an organization.
func (*AppClient) UpdateOrganizationInviteAuthorizations ¶ added in v0.53.0
func (c *AppClient) UpdateOrganizationInviteAuthorizations( ctx context.Context, orgID, email string, addAuthorizations, removeAuthorizations []*Authorization, ) (*OrganizationInvite, error)
UpdateOrganizationInviteAuthorizations updates the authorizations attached to an organization invite.
func (*AppClient) UpdateRegistryItem ¶ added in v0.53.0
func (c *AppClient) UpdateRegistryItem( ctx context.Context, itemID string, packageType PackageType, description string, visibility Visibility, opts *UpdateRegistryItemOptions, ) error
UpdateRegistryItem updates a registry item.
func (*AppClient) UpdateRobot ¶ added in v0.53.0
UpdateRobot updates a robot.
func (*AppClient) UpdateRobotPart ¶ added in v0.53.0
func (c *AppClient) UpdateRobotPart(ctx context.Context, id, name string, robotConfig interface{}) (*RobotPart, error)
UpdateRobotPart updates a robot part.
func (*AppClient) UploadModuleFile ¶ added in v0.53.0
func (c *AppClient) UploadModuleFile(ctx context.Context, fileInfo ModuleFileInfo, file []byte) (string, error)
UploadModuleFile uploads a module file and returns the URL of the uploaded file.
type AuthResourceType ¶ added in v0.53.0
type AuthResourceType string
AuthResourceType represents the valid authorization resource type for an Authorization.
type AuthRole ¶ added in v0.53.0
type AuthRole string
AuthRole represents the valid authorizaiton types for an Authorization.
type AuthenticationType ¶ added in v0.53.0
type AuthenticationType int
AuthenticationType specifies the type of authentication.
const ( // AuthenticationTypeUnspecified represents an unspecified authentication. AuthenticationTypeUnspecified AuthenticationType = iota // AuthenticationTypeWebOAuth represents authentication using Web OAuth. AuthenticationTypeWebOAuth // AuthenticationTypeAPIKey represents authentication using an API key. AuthenticationTypeAPIKey // AuthenticationTypeRobotPartSecret represents authentication using a robot part secret. AuthenticationTypeRobotPartSecret // AuthenticationTypeLocationSecret represents authentication using a location secret. AuthenticationTypeLocationSecret )
type AuthenticatorInfo ¶ added in v0.53.0
type AuthenticatorInfo struct { Type AuthenticationType Value string IsDeactivated bool }
AuthenticatorInfo holds the information of an authenticator.
type Authorization ¶ added in v0.53.0
type Authorization struct { AuthorizationType AuthRole AuthorizationID string ResourceType AuthResourceType ResourceID string IdentityID string OrganizationID string IdentityType string }
Authorization has the information about a specific authorization.
type AuthorizationDetails ¶ added in v0.53.0
type AuthorizationDetails struct { AuthorizationType string AuthorizationID string ResourceType string ResourceID string OrgID string }
AuthorizationDetails has the details for an authorization.
type AuthorizedPermissions ¶ added in v0.53.0
AuthorizedPermissions is authorized permissions.
type BillingAddress ¶ added in v0.53.0
type BillingAddress struct { AddressLine1 string AddressLine2 *string City string State string Zipcode string }
BillingAddress contains billing address details.
type BillingClient ¶ added in v0.53.0
type BillingClient struct {
// contains filtered or unexported fields
}
BillingClient is a gRPC client for method calls to the Billing API.
func (*BillingClient) GetCurrentMonthUsage ¶ added in v0.53.0
func (c *BillingClient) GetCurrentMonthUsage(ctx context.Context, orgID string) (*GetCurrentMonthUsageResponse, error)
GetCurrentMonthUsage gets the data usage information for the current month for an organization.
func (*BillingClient) GetInvoicePDF ¶ added in v0.53.0
GetInvoicePDF returns raw byte slices representing the invoice PDF data.
func (*BillingClient) GetInvoicesSummary ¶ added in v0.53.0
func (c *BillingClient) GetInvoicesSummary(ctx context.Context, orgID string) (float64, []*InvoiceSummary, error)
GetInvoicesSummary returns the outstanding balance and the invoice summaries of an organization.
func (*BillingClient) GetOrgBillingInformation ¶ added in v0.53.0
func (c *BillingClient) GetOrgBillingInformation(ctx context.Context, orgID string) (*GetOrgBillingInformationResponse, error)
GetOrgBillingInformation gets the billing information of an organization.
func (*BillingClient) SendPaymentRequiredEmail ¶ added in v0.53.0
func (c *BillingClient) SendPaymentRequiredEmail(ctx context.Context, customerOrgID, billingOwnerOrgID string) error
SendPaymentRequiredEmail sends an email about payment requirement.
type BinaryData ¶ added in v0.52.0
type BinaryData struct { Binary []byte Metadata *BinaryMetadata }
BinaryData contains data and metadata associated with binary data.
type BinaryDataByFilterResponse ¶ added in v0.55.0
type BinaryDataByFilterResponse struct { BinaryData []*BinaryData Count int Last string }
BinaryDataByFilterResponse represents the result of a BinaryDataByFilter query. It contains the retrieved binary data and associated metadata, the total number of entries retrieved (Count), and the ID of the last returned page (Last).
type BinaryDataCaptureUploadOptions ¶ added in v0.54.0
type BinaryDataCaptureUploadOptions struct { Type *DataType FileName *string MethodParameters map[string]interface{} Tags []string DataRequestTimes *[2]time.Time }
BinaryDataCaptureUploadOptions represents optional parameters for the BinaryDataCaptureUpload method.
type BinaryID ¶ added in v0.52.0
BinaryID is the unique identifier for a file that one can request to be retrieved or modified.
type BinaryMetadata ¶ added in v0.52.0
type BinaryMetadata struct { ID string CaptureMetadata CaptureMetadata TimeRequested time.Time TimeReceived time.Time FileName string FileExt string URI string Annotations *Annotations DatasetIDs []string }
BinaryMetadata is the metadata associated with binary data.
type BoundingBox ¶ added in v0.52.0
type BoundingBox struct { ID string Label string XMinNormalized float64 YMinNormalized float64 XMaxNormalized float64 YMaxNormalized float64 }
BoundingBox represents a labeled bounding box on an image. x and y values are normalized ratios between 0 and 1.
type CaptureInterval ¶ added in v0.52.0
CaptureInterval describes the start and end time of the capture in this file.
type CaptureMetadata ¶ added in v0.52.0
type CaptureMetadata struct { OrganizationID string LocationID string RobotName string RobotID string PartName string PartID string ComponentType string ComponentName string MethodName string MethodParameters map[string]interface{} Tags []string MimeType string }
CaptureMetadata contains information on the settings used for the data capture.
type CloudConfig ¶ added in v0.53.0
CloudConfig is the minimal config to create a /etc/viam.json, containing the smart machine's part ID and secret.
type CreateFragmentOptions ¶ added in v0.53.0
type CreateFragmentOptions struct {
Visibility *FragmentVisibility
}
CreateFragmentOptions contains optional parameters for CreateFragment.
type CreateLocationOptions ¶ added in v0.53.0
type CreateLocationOptions struct { // ParentLocationID is the parent location to move the location under. ParentLocationID *string }
CreateLocationOptions contains optional parameters for CreateLocation.
type CreateOrganizationInviteOptions ¶ added in v0.53.0
type CreateOrganizationInviteOptions struct { // SendEmailInvite defaults to true to send an email to the receipient of the invite. // The user must accept the email to be added to the associated authorizations. // If false, the user receives the associated authorization on the next login of the user with the associated email address. SendEmailInvite *bool }
CreateOrganizationInviteOptions contains optional parameters for CreateOrganizationInvite.
type DataByFilterOptions ¶ added in v0.54.0
type DataByFilterOptions struct { // No Filter implies all data. Filter *Filter // Limit is the maximum number of entries to include in a page. Limit defaults to 50 if unspecified. Limit int // Last indicates the object identifier of the Last-returned data. // This is returned by calls to TabularDataByFilter and BinaryDataByFilter as the `Last` value. // If provided, the server will return the next data entries after the last object identifier. Last string SortOrder Order CountOnly bool IncludeInternalData bool }
DataByFilterOptions contains optional parameters for TabularDataByFilter and BinaryDataByFilter.
type DataClient ¶ added in v0.52.0
type DataClient struct {
// contains filtered or unexported fields
}
DataClient implements the DataServiceClient interface.
func (*DataClient) AddBinaryDataToDatasetByIDs ¶ added in v0.52.0
func (d *DataClient) AddBinaryDataToDatasetByIDs( ctx context.Context, binaryIDs []*BinaryID, datasetID string, ) error
AddBinaryDataToDatasetByIDs adds the binary data with the given binary IDs to the dataset.
func (*DataClient) AddBoundingBoxToImageByID ¶ added in v0.52.0
func (d *DataClient) AddBoundingBoxToImageByID( ctx context.Context, binaryID *BinaryID, label string, xMinNormalized float64, yMinNormalized float64, xMaxNormalized float64, yMaxNormalized float64, ) (string, error)
AddBoundingBoxToImageByID adds a bounding box to an image with the specified ID, using the provided label and position in normalized coordinates. All normalized coordinates (xMin, yMin, xMax, yMax) must be float values in the range [0, 1].
func (*DataClient) AddTagsToBinaryDataByFilter ¶ added in v0.52.0
func (d *DataClient) AddTagsToBinaryDataByFilter(ctx context.Context, tags []string, filter *Filter) error
AddTagsToBinaryDataByFilter adds string tags, unless the tags are already present, to binary data based on the given filter. If no filter is given, all data will be tagged.
func (*DataClient) AddTagsToBinaryDataByIDs ¶ added in v0.52.0
func (d *DataClient) AddTagsToBinaryDataByIDs(ctx context.Context, tags []string, binaryIDs []*BinaryID) error
AddTagsToBinaryDataByIDs adds string tags, unless the tags are already present, to binary data based on given IDs.
func (*DataClient) BinaryDataByFilter ¶ added in v0.52.0
func (d *DataClient) BinaryDataByFilter( ctx context.Context, includeBinary bool, opts *DataByFilterOptions, ) (*BinaryDataByFilterResponse, error)
BinaryDataByFilter queries binary data and metadata based on given filters.
func (*DataClient) BinaryDataByIDs ¶ added in v0.52.0
func (d *DataClient) BinaryDataByIDs(ctx context.Context, binaryIDs []*BinaryID) ([]*BinaryData, error)
BinaryDataByIDs queries binary data and metadata based on given IDs.
func (*DataClient) BinaryDataCaptureUpload ¶ added in v0.52.0
func (d *DataClient) BinaryDataCaptureUpload( ctx context.Context, binaryData []byte, partID string, componentType string, componentName string, methodName string, fileExtension string, options *BinaryDataCaptureUploadOptions, ) (string, error)
BinaryDataCaptureUpload uploads the contents and metadata for binary data.
func (*DataClient) BoundingBoxLabelsByFilter ¶ added in v0.52.0
func (d *DataClient) BoundingBoxLabelsByFilter(ctx context.Context, filter *Filter) ([]string, error)
BoundingBoxLabelsByFilter retrieves all unique string labels for bounding boxes that match the specified filter. It returns a list of these labels. If no filter is given, all labels are returned.
func (*DataClient) ConfigureDatabaseUser ¶ added in v0.52.0
func (d *DataClient) ConfigureDatabaseUser( ctx context.Context, organizationID string, password string, ) error
ConfigureDatabaseUser configures a database user for the Viam organization's MongoDB Atlas Data Federation instance.
func (*DataClient) CreateDataset ¶ added in v0.53.0
func (d *DataClient) CreateDataset(ctx context.Context, name, organizationID string) (string, error)
CreateDataset makes a new dataset.
func (*DataClient) DeleteBinaryDataByFilter ¶ added in v0.52.0
DeleteBinaryDataByFilter deletes binary data based on given filters. If filter is empty, delete all data. It returns the number of binary datapoints deleted.
func (*DataClient) DeleteBinaryDataByIDs ¶ added in v0.52.0
DeleteBinaryDataByIDs deletes binary data based on given IDs. It returns the number of binary datapoints deleted.
func (*DataClient) DeleteDataset ¶ added in v0.53.0
func (d *DataClient) DeleteDataset(ctx context.Context, id string) error
DeleteDataset deletes an existing dataset.
func (*DataClient) DeleteTabularData ¶ added in v0.52.0
func (d *DataClient) DeleteTabularData(ctx context.Context, organizationID string, deleteOlderThanDays int) (int, error)
DeleteTabularData deletes tabular data older than a number of days, based on the given organization ID. It returns the number of tabular datapoints deleted.
func (*DataClient) ExportTabularData ¶ added in v0.56.0
func (d *DataClient) ExportTabularData( ctx context.Context, partID, resourceName, resourceSubtype, method string, interval CaptureInterval, ) ([]*ExportTabularDataResponse, error)
ExportTabularData returns a stream of ExportTabularDataResponses.
func (*DataClient) FileUploadFromBytes ¶ added in v0.52.0
func (d *DataClient) FileUploadFromBytes( ctx context.Context, partID string, data []byte, opts *FileUploadOptions, ) (string, error)
FileUploadFromBytes uploads the contents and metadata for binary data such as encoded images or other data represented by bytes and returns the file id of the uploaded data.
func (*DataClient) FileUploadFromPath ¶ added in v0.52.0
func (d *DataClient) FileUploadFromPath( ctx context.Context, partID string, filePath string, opts *FileUploadOptions, ) (string, error)
FileUploadFromPath uploads the contents and metadata for binary data created from a filepath and returns the file id of the uploaded data.
func (*DataClient) GetDatabaseConnection ¶ added in v0.52.0
func (d *DataClient) GetDatabaseConnection(ctx context.Context, organizationID string) (*GetDatabaseConnectionResponse, error)
GetDatabaseConnection establishes a connection to a MongoDB Atlas Data Federation instance. It returns the hostname endpoint, a URI for connecting to the database via MongoDB clients, and a flag indicating whether a database user is configured for the Viam organization.
func (*DataClient) GetLatestTabularData ¶ added in v0.54.0
func (d *DataClient) GetLatestTabularData(ctx context.Context, partID, resourceName, resourceSubtype, methodName string) ( *GetLatestTabularDataResponse, error, )
GetLatestTabularData gets the most recent tabular data captured from the specified data source, as well as the time that it was captured and synced. If no data was synced to the data source within the last year, LatestTabularDataReturn will be empty.
func (*DataClient) ListDatasetsByIDs ¶ added in v0.53.0
ListDatasetsByIDs lists all of the datasets specified by the given dataset IDs.
func (*DataClient) ListDatasetsByOrganizationID ¶ added in v0.53.0
func (d *DataClient) ListDatasetsByOrganizationID(ctx context.Context, organizationID string) ([]*Dataset, error)
ListDatasetsByOrganizationID lists all of the datasets for an organization.
func (*DataClient) RemoveBinaryDataFromDatasetByIDs ¶ added in v0.52.0
func (d *DataClient) RemoveBinaryDataFromDatasetByIDs( ctx context.Context, binaryIDs []*BinaryID, datasetID string, ) error
RemoveBinaryDataFromDatasetByIDs removes the binary data with the given binary IDs from the dataset.
func (*DataClient) RemoveBoundingBoxFromImageByID ¶ added in v0.52.0
func (d *DataClient) RemoveBoundingBoxFromImageByID( ctx context.Context, bboxID string, binaryID *BinaryID, ) error
RemoveBoundingBoxFromImageByID removes a bounding box from an image with the given ID.
func (*DataClient) RemoveTagsFromBinaryDataByFilter ¶ added in v0.52.0
func (d *DataClient) RemoveTagsFromBinaryDataByFilter(ctx context.Context, tags []string, filter *Filter, ) (int, error)
RemoveTagsFromBinaryDataByFilter removes the specified string tags from binary data that match the given filter. If no filter is given, all data will be untagged. It returns the number of binary files from which tags were removed.
func (*DataClient) RemoveTagsFromBinaryDataByIDs ¶ added in v0.52.0
func (d *DataClient) RemoveTagsFromBinaryDataByIDs(ctx context.Context, tags []string, binaryIDs []*BinaryID, ) (int, error)
RemoveTagsFromBinaryDataByIDs removes string tags from binary data based on given IDs. It returns the number of binary files which had tags removed.
func (*DataClient) RenameDataset ¶ added in v0.53.0
func (d *DataClient) RenameDataset(ctx context.Context, id, name string) error
RenameDataset modifies the name of an existing dataset.
func (*DataClient) StreamingDataCaptureUpload ¶ added in v0.52.0
func (d *DataClient) StreamingDataCaptureUpload( ctx context.Context, data []byte, partID string, fileExt string, options *StreamingDataCaptureUploadOptions, ) (string, error)
StreamingDataCaptureUpload uploads metadata and streaming binary data in chunks.
func (*DataClient) TabularDataByFilter ¶ added in v0.52.0
func (d *DataClient) TabularDataByFilter(ctx context.Context, opts *DataByFilterOptions) (*TabularDataByFilterResponse, error)
TabularDataByFilter queries tabular data and metadata based on given filters. Deprecated: This endpoint will be removed in a future version.
func (*DataClient) TabularDataByMQL ¶ added in v0.52.0
func (d *DataClient) TabularDataByMQL( ctx context.Context, organizationID string, query []map[string]interface{}, ) ([]map[string]interface{}, error)
TabularDataByMQL queries tabular data with MQL (MongoDB Query Language) queries.
func (*DataClient) TabularDataBySQL ¶ added in v0.52.0
func (d *DataClient) TabularDataBySQL(ctx context.Context, organizationID, sqlQuery string) ([]map[string]interface{}, error)
TabularDataBySQL queries tabular data with a SQL query.
func (*DataClient) TabularDataCaptureUpload ¶ added in v0.52.0
func (d *DataClient) TabularDataCaptureUpload( ctx context.Context, tabularData []map[string]interface{}, partID string, componentType string, componentName string, methodName string, dataRequestTimes [][2]time.Time, options *TabularDataCaptureUploadOptions, ) (string, error)
TabularDataCaptureUpload uploads the contents and metadata for tabular data.
func (*DataClient) TagsByFilter ¶ added in v0.52.0
TagsByFilter retrieves all unique tags associated with the data that match the specified filter. It returns the list of these unique tags. If no filter is given, all data tags are returned.
func (*DataClient) UpdateBoundingBox ¶ added in v0.52.0
func (d *DataClient) UpdateBoundingBox(ctx context.Context, binaryID *BinaryID, bboxID string, opts *UpdateBoundingBoxOptions) error
UpdateBoundingBox updates the bounding box for a given bbox ID for the file represented by the binary ID.
type DataRequest ¶ added in v0.52.0
type ExportTabularDataResponse ¶ added in v0.56.0
type ExportTabularDataResponse struct { OrganizationID string LocationID string RobotID string RobotName string PartID string PartName string ResourceName string ResourceSubtype string MethodName string TimeCaptured time.Time MethodParameters map[string]interface{} Tags []string Payload map[string]interface{} }
ExportTabularDataResponse represents the result of an ExportTabularData API call.
type FileData ¶ added in v0.52.0
type FileData struct {
Data []byte
}
FileData contains the contents of binary (image + file) data.
type FileUploadOptions ¶ added in v0.52.0
type FileUploadOptions struct { ComponentType *string ComponentName *string MethodName *string FileName *string MethodParameters map[string]interface{} FileExtension *string Tags []string }
FileUploadOptions represents optional parameters for the FileUploadFromPath & FileUploadFromBytes methods.
type Filter ¶ added in v0.52.0
type Filter struct { ComponentName string ComponentType string Method string RobotName string RobotID string PartName string PartID string LocationIDs []string OrganizationIDs []string MimeType []string Interval CaptureInterval TagsFilter TagsFilter BboxLabels []string DatasetID string }
Filter defines the fields over which we can filter data using a logic AND.
type Fragment ¶ added in v0.53.0
type Fragment struct { ID string Name string Fragment map[string]interface{} OrganizationOwner string Public bool CreatedOn *time.Time OrganizationName string RobotPartCount int OrganizationCount int OnlyUsedByOwner bool Visibility FragmentVisibility LastUpdated *time.Time }
Fragment stores the information of a fragment.
type FragmentHistoryEntry ¶ added in v0.53.0
type FragmentHistoryEntry struct { Fragment string EditedOn *time.Time Old *Fragment EditedBy *AuthenticatorInfo }
FragmentHistoryEntry is an entry of a fragment's history.
type FragmentVisibility ¶ added in v0.53.0
type FragmentVisibility int
FragmentVisibility specifies the kind of visibility a fragment has.
const ( // FragmentVisibilityUnspecified is an unspecified visibility. FragmentVisibilityUnspecified FragmentVisibility = iota // FragmentVisibilityPrivate restricts access to a fragment to its organization. FragmentVisibilityPrivate // FragmentVisibilityPublic allows the fragment to be accessible to everyone. FragmentVisibilityPublic // FragmentVisibilityPublicUnlisted allows the fragment to be accessible to everyone but is hidden from public listings like it is private. FragmentVisibilityPublicUnlisted )
type GetCurrentMonthUsageResponse ¶ added in v0.53.0
type GetCurrentMonthUsageResponse struct { StartDate *time.Time EndDate *time.Time ResourceUsageCostsBySource []*ResourceUsageCostsBySource Subtotal float64 }
GetCurrentMonthUsageResponse contains the current month usage information.
type GetDatabaseConnectionResponse ¶ added in v0.55.0
type GetDatabaseConnectionResponse struct { Hostname string MongodbURI string HasDatabaseUser bool }
GetDatabaseConnectionResponse represents the response returned by GetDatabaseConnection. It contains the hostname endpoint, a URI for connecting to the MongoDB Atlas Data Federation instance, and a flag indicating whether a database user is configured for the Viam organization.
type GetFragmentHistoryOptions ¶ added in v0.53.0
GetFragmentHistoryOptions contains optional parameters for GetFragmentHistory.
type GetLatestTabularDataResponse ¶ added in v0.55.0
type GetLatestTabularDataResponse struct { TimeCaptured time.Time TimeSynced time.Time Payload map[string]interface{} }
GetLatestTabularDataResponse represents the response returned by GetLatestTabularData. It contains the most recently captured data payload, the time it was captured, and the time it was synced.
type GetOrgBillingInformationResponse ¶ added in v0.53.0
type GetOrgBillingInformationResponse struct { Type PaymentMethodType BillingEmail string // defined if type is PaymentMethodTypeCard Method *PaymentMethodCard // only return for billing dashboard admin users BillingTier *string }
GetOrgBillingInformationResponse contains the information of an organization's billing information.
type GetRobotPartLogsOptions ¶ added in v0.53.0
type GetRobotPartLogsOptions struct { Filter *string // PageToken represents the page to receive logs from. The function defaults to the most recent page if PageToken is empty. PageToken *string // Levels represents the levels of the logs requested. Logs of all levels are returned when levels is empty. Levels []string Start *time.Time End *time.Time Limit *int Source *string }
GetRobotPartLogsOptions contains optional parameters for GetRobotPartLogs.
type GetSmartMachineStatusResponse ¶ added in v0.53.0
type GetSmartMachineStatusResponse struct { ProvisioningInfo *ProvisioningInfo HasSmartMachineCredentials bool IsOnline bool LastestConnectionAttempt *NetworkInfo Errors []string }
GetSmartMachineStatusResponse contains smart machine status information.
type GetTrainingJobLogsOptions ¶ added in v0.54.0
type GetTrainingJobLogsOptions struct {
PageToken *string
}
GetTrainingJobLogsOptions contains optional parameters for GetTrainingJobLogs.
type InvoiceSummary ¶ added in v0.53.0
type InvoiceSummary struct { ID string InvoiceDate *time.Time InvoiceAmount float64 Status string DueDate *time.Time PaidDate *time.Time }
InvoiceSummary holds the information of an invoice summary.
type ListModulesOptions ¶ added in v0.53.0
type ListModulesOptions struct { // OrgID is the organization to return private modules for. OrgID *string }
ListModulesOptions contains optional parameters for ListModules.
type ListRegistryItemsOptions ¶ added in v0.53.0
type ListRegistryItemsOptions struct { SearchTerm *string PageToken *string // PublicNamespaces are the namespaces to return results for. PublicNamespaces []string }
ListRegistryItemsOptions contains optional parameters for ListRegistryItems.
type Location ¶ added in v0.53.0
type Location struct { ID string Name string ParentLocationID string Auth *LocationAuth Organizations []*LocationOrganization CreatedOn *time.Time RobotCount int Config *StorageConfig }
Location holds the information of a specific location.
type LocationAuth ¶ added in v0.53.0
type LocationAuth struct { LocationID string Secrets []*SharedSecret }
LocationAuth holds the secrets used to authenticate to a location.
type LocationOrganization ¶ added in v0.53.0
LocationOrganization holds information of an organization the location is shared with.
type LogEntry ¶ added in v0.53.0
type LogEntry struct { Host string Level string Time *time.Time LoggerName string Message string Caller map[string]interface{} Stack string Fields []map[string]interface{} }
LogEntry holds the information of a single log entry.
type MLModelMetadata ¶ added in v0.53.0
type MLModelMetadata struct { Versions []string ModelType ModelType ModelFramework ModelFramework }
MLModelMetadata holds the metadata for a ML model.
type MLTrainingClient ¶ added in v0.54.0
type MLTrainingClient struct {
// contains filtered or unexported fields
}
MLTrainingClient is a gRPC client for method calls to the ML Training API.
func (*MLTrainingClient) CancelTrainingJob ¶ added in v0.54.0
func (c *MLTrainingClient) CancelTrainingJob(ctx context.Context, id string) error
CancelTrainingJob cancels a training job that has not yet completed.
func (*MLTrainingClient) DeleteCompletedTrainingJob ¶ added in v0.54.0
func (c *MLTrainingClient) DeleteCompletedTrainingJob(ctx context.Context, id string) error
DeleteCompletedTrainingJob removes a completed training job from the database, whether the job succeeded or failed.
func (*MLTrainingClient) GetTrainingJob ¶ added in v0.54.0
func (c *MLTrainingClient) GetTrainingJob(ctx context.Context, id string) (*TrainingJobMetadata, error)
GetTrainingJob retrieves a training job by its ID.
func (*MLTrainingClient) GetTrainingJobLogs ¶ added in v0.54.0
func (c *MLTrainingClient) GetTrainingJobLogs( ctx context.Context, id string, opts *GetTrainingJobLogsOptions, ) ([]*TrainingJobLogEntry, string, error)
GetTrainingJobLogs gets the logs and the next page token for a given custom training job.
func (*MLTrainingClient) ListTrainingJobs ¶ added in v0.54.0
func (c *MLTrainingClient) ListTrainingJobs( ctx context.Context, organizationID string, status TrainingStatus, ) ([]*TrainingJobMetadata, error)
ListTrainingJobs lists training jobs for a given organization ID and training status.
func (*MLTrainingClient) SubmitCustomTrainingJob ¶ added in v0.54.0
func (c *MLTrainingClient) SubmitCustomTrainingJob( ctx context.Context, args SubmitTrainingJobArgs, registryItemID, registryItemVersion string, arguments map[string]string, ) (string, error)
SubmitCustomTrainingJob submits a custom training job request and returns its ID.
func (*MLTrainingClient) SubmitTrainingJob ¶ added in v0.54.0
func (c *MLTrainingClient) SubmitTrainingJob( ctx context.Context, args SubmitTrainingJobArgs, modelType ModelType, tags []string, ) (string, error)
SubmitTrainingJob submits a training job request and returns its ID.
type MLTrainingMetadata ¶ added in v0.53.0
type MLTrainingMetadata struct { Versions []*MLTrainingVersion ModelType ModelType ModelFramework ModelFramework Draft bool }
MLTrainingMetadata is the metadata of an ML Training.
type MLTrainingVersion ¶ added in v0.53.0
MLTrainingVersion is the version of ML Training.
type MimeType ¶ added in v0.52.0
type MimeType int32
MimeType specifies the format of a file being uploaded.
type Model ¶ added in v0.53.0
Model holds the colon-delimited-triplet of the model and the API implemented by the model.
type ModelFramework ¶ added in v0.53.0
type ModelFramework int
ModelFramework is the framework type of a model.
const ( // ModelFrameworkUnspecified is an unspecified model framework. ModelFrameworkUnspecified ModelFramework = iota // ModelFrameworkTFLite specifies a TFLite model framework. ModelFrameworkTFLite // ModelFrameworkTensorFlow specifies a TensorFlow model framework. ModelFrameworkTensorFlow // ModelFrameworkPyTorch specifies a PyTorch model framework. ModelFrameworkPyTorch // ModelFrameworkONNX specifies a ONNX model framework. ModelFrameworkONNX )
type ModelType ¶ added in v0.53.0
type ModelType int
ModelType specifies the type of model used for classification or detection.
const ( // ModelTypeUnspecified represents an unspecified model. ModelTypeUnspecified ModelType = iota // ModelTypeSingleLabelClassification represents a single-label classification model. ModelTypeSingleLabelClassification // ModelTypeMultiLabelClassification represents a multi-label classification model. ModelTypeMultiLabelClassification // ModelTypeObjectDetection represents an object detection model. ModelTypeObjectDetection )
type Module ¶ added in v0.53.0
type Module struct { ModuleID string Name string Visibility Visibility Versions []*VersionHistory URL string Description string Models []*Model TotalRobotUsage int TotalOrganizationUsage int OrganizationID string Entrypoint string PublicNamespace string FirstRun *string }
Module holds the information of a module.
type ModuleFileInfo ¶ added in v0.53.0
ModuleFileInfo holds the information of a module file.
type ModuleMetadata ¶ added in v0.53.0
type ModuleMetadata struct { Models []*Model Versions []*ModuleVersion Entrypoint string FirstRun *string }
ModuleMetadata holds the metadata of a module.
type ModuleVersion ¶ added in v0.53.0
type ModuleVersion struct { Version string Files []*Uploads Models []*Model Entrypoint string FirstRun *string }
ModuleVersion holds the information of a module version.
type NetworkInfo ¶ added in v0.53.0
type NetworkInfo struct { Type string SSID string Security string Signal int Connected bool LastError string }
NetworkInfo holds network information.
type Options ¶
type Options struct { BaseURL string Entity string Credentials rpc.Credentials }
Options has the options necessary to connect through gRPC.
type OrgDetails ¶ added in v0.53.0
OrgDetails holds the ID and name of the organization.
type Organization ¶ added in v0.53.0
type Organization struct { ID string Name string CreatedOn *time.Time PublicNamespace string DefaultRegion string Cid *string }
Organization holds the information of an organization.
type OrganizationIdentity ¶ added in v0.53.0
OrganizationIdentity is used to render an organization's information on the frontend.
type OrganizationInvite ¶ added in v0.53.0
type OrganizationInvite struct { OrganizationID string Email string CreatedOn *time.Time Authorizations []*Authorization }
OrganizationInvite is the invite to an organization.
type OrganizationMember ¶ added in v0.53.0
type OrganizationMember struct { UserID string Emails []string DateAdded *time.Time LastLogin *time.Time }
OrganizationMember holds the information of a member of an organization.
type PackageType ¶ added in v0.53.0
type PackageType int
PackageType is the type of package being used.
const ( // PackageTypeUnspecified represents an unspecified package type. PackageTypeUnspecified PackageType = iota // PackageTypeArchive represents an archive package type. PackageTypeArchive // PackageTypeMLModel represents a ML model package type. PackageTypeMLModel // PackageTypeModule represents a module package type. PackageTypeModule // PackageTypeSLAMMap represents a SLAM map package type. PackageTypeSLAMMap // PackageTypeMLTraining represents a ML training package type. PackageTypeMLTraining )
type PaymentMethodCard ¶ added in v0.53.0
PaymentMethodCard holds the information of a card used for payment.
type PaymentMethodType ¶ added in v0.53.0
type PaymentMethodType int
PaymentMethodType is the type of payment method.
const ( // PaymentMethodTypeUnspecified represents an unspecified payment method. PaymentMethodTypeUnspecified PaymentMethodType = iota // PaymentMethodtypeCard represents a payment by card. PaymentMethodtypeCard )
type ProvisioningClient ¶ added in v0.53.0
type ProvisioningClient struct {
// contains filtered or unexported fields
}
ProvisioningClient is a gRPC client for method calls to the Provisioning API.
func (*ProvisioningClient) GetNetworkList ¶ added in v0.53.0
func (c *ProvisioningClient) GetNetworkList(ctx context.Context) ([]*NetworkInfo, error)
GetNetworkList gets the list of networks that are visible to the smart machine.
func (*ProvisioningClient) GetSmartMachineStatus ¶ added in v0.53.0
func (c *ProvisioningClient) GetSmartMachineStatus(ctx context.Context) (*GetSmartMachineStatusResponse, error)
GetSmartMachineStatus gets the status of the smart machine including networking.
func (*ProvisioningClient) SetNetworkCredentials ¶ added in v0.53.0
func (c *ProvisioningClient) SetNetworkCredentials(ctx context.Context, credentialsType, ssid, psk string) error
SetNetworkCredentials sets the wifi credentials.
func (*ProvisioningClient) SetSmartMachineCredentials ¶ added in v0.53.0
func (c *ProvisioningClient) SetSmartMachineCredentials(ctx context.Context, cloud *CloudConfig) error
SetSmartMachineCredentials sets the smart machine credentials.
type ProvisioningInfo ¶ added in v0.53.0
ProvisioningInfo holds provisioning info.
type RegistryItem ¶ added in v0.53.0
type RegistryItem struct { ItemID string OrganizationID string PublicNamespace string Name string Type PackageType Visibility Visibility URL string Description string TotalRobotUsage int TotalExternalRobotUsage int TotalOrganizationUsage int TotalExternalOrganizationUsage int Metadata isRegistryItemMetadata CreatedAt *time.Time UpdatedAt *time.Time }
RegistryItem has the information of an item in the registry.
type RegistryItemStatus ¶ added in v0.53.0
type RegistryItemStatus int
RegistryItemStatus specifies if a registry item is published or in development.
const ( // RegistryItemStatusUnspecified is an unspecified registry item status. RegistryItemStatusUnspecified RegistryItemStatus = iota // RegistryItemStatusPublished represents a published registry item. RegistryItemStatusPublished // RegistryItemStatusInDevelopment represents a registry item still in development. RegistryItemStatusInDevelopment )
type ResourceUsageCosts ¶ added in v0.53.0
type ResourceUsageCosts struct { UsageCosts []*UsageCost Discount float64 TotalWithDiscount float64 TotalWithoutDiscount float64 }
ResourceUsageCosts holds the usage costs with discount information.
type ResourceUsageCostsBySource ¶ added in v0.53.0
type ResourceUsageCostsBySource struct { SourceType SourceType ResourceUsageCosts *ResourceUsageCosts TierName string }
ResourceUsageCostsBySource contains the resource usage costs of a source.
type Robot ¶ added in v0.53.0
type Robot struct { ID string Name string Location string LastAccess *time.Time CreatedOn *time.Time }
Robot holds the information of a machine.
type RobotPart ¶ added in v0.53.0
type RobotPart struct { ID string Name string DNSName string Secret string Robot string LocationID string RobotConfig map[string]interface{} LastAccess *time.Time UserSuppliedInfo map[string]interface{} MainPart bool FQDN string LocalFQDN string CreatedOn *time.Time Secrets []*SharedSecret LastUpdated *time.Time }
RobotPart is a specific machine part.
type RobotPartHistoryEntry ¶ added in v0.53.0
type RobotPartHistoryEntry struct { Part string Robot string When *time.Time Old *RobotPart EditedBy *AuthenticatorInfo }
RobotPartHistoryEntry is a history entry of a robot part.
type RobotPartLogStream ¶ added in v0.53.0
type RobotPartLogStream struct {
// contains filtered or unexported fields
}
RobotPartLogStream is a stream with robot part logs.
func (*RobotPartLogStream) Next ¶ added in v0.53.0
func (s *RobotPartLogStream) Next() ([]*LogEntry, error)
Next gets the next slice of robot part log entries.
type RoverRentalRobot ¶ added in v0.53.0
type RoverRentalRobot struct { RobotID string LocationID string RobotName string RobotMainPartID string }
RoverRentalRobot holds the information of a rover rental robot.
type SensorData ¶ added in v0.52.0
type SensorData struct { Metadata SensorMetadata SDStruct map[string]interface{} SDBinary []byte }
SensorData contains the contents and metadata for tabular data.
type SensorMetadata ¶ added in v0.52.0
type SensorMetadata struct { TimeRequested time.Time TimeReceived time.Time MimeType MimeType Annotations *Annotations }
SensorMetadata contains the time the sensor data was requested and was received.
type SharedSecret ¶ added in v0.53.0
type SharedSecret struct {}
SharedSecret is a secret used for LocationAuth and RobotParts.
type SharedSecretState ¶ added in v0.53.0
type SharedSecretState int
SharedSecretState specifies if the secret is enabled, disabled, or unspecified.
const ( SharedSecretState = iota SharedSecretStateEnabled SharedSecretStateDisabled )SharedSecretStateUnspecified
type SourceType ¶ added in v0.53.0
type SourceType int
SourceType is the type of source from which a cost is coming from.
const ( // SourceTypeUnspecified represents an unspecified source type. SourceTypeUnspecified SourceType = iota // SourceTypeOrg represents an organization. SourceTypeOrg // SourceTypeFragment represents a fragment. SourceTypeFragment )
type StorageConfig ¶ added in v0.53.0
type StorageConfig struct {
Region string
}
StorageConfig holds the GCS region that data is stored in.
type StreamingDataCaptureUploadOptions ¶ added in v0.54.0
type StreamingDataCaptureUploadOptions struct { ComponentType *string ComponentName *string MethodName *string Type *DataType FileName *string MethodParameters map[string]interface{} Tags []string DataRequestTimes *[2]time.Time }
StreamingDataCaptureUploadOptions represents optional parameters for the StreamingDataCaptureUpload method.
type SubmitTrainingJobArgs ¶ added in v0.54.0
type SubmitTrainingJobArgs struct { DatasetID string OrganizationID string ModelName string ModelVersion string }
SubmitTrainingJobArgs contains the necessary training job information to submit the job.
type TabularData ¶ added in v0.52.0
type TabularData struct { Data map[string]interface{} MetadataIndex int Metadata *CaptureMetadata TimeRequested time.Time TimeReceived time.Time }
TabularData contains data and metadata associated with tabular data.
type TabularDataByFilterResponse ¶ added in v0.55.0
type TabularDataByFilterResponse struct { TabularData []*TabularData Count int Last string }
TabularDataByFilterResponse represents the result of a TabularDataByFilter query. It contains the retrieved tabular data and associated metadata, the total number of entries retrieved (Count), and the ID of the last returned page (Last).
type TabularDataCaptureUploadOptions ¶ added in v0.54.0
type TabularDataCaptureUploadOptions struct { Type *DataType FileName *string MethodParameters map[string]interface{} FileExtension *string Tags []string }
TabularDataCaptureUploadOptions represents optional parameters for the TabularDataCaptureUpload method.
type TagsFilter ¶ added in v0.52.0
type TagsFilter struct { Type TagsFilterType Tags []string }
TagsFilter defines the type of filtering and, if applicable, over which tags to perform a logical OR.
type TagsFilterType ¶ added in v0.52.0
type TagsFilterType int32
TagsFilterType specifies how data can be filtered based on tags.
const ( TagsFilterTypeUnspecified TagsFilterType = iota TagsFilterTypeMatchByOr TagsFilterTypeTagged TagsFilterTypeUntagged )
TagsFilterType constants define the ways data can be filtered based on tag matching criteria.
type TailRobotPartLogsOptions ¶ added in v0.53.0
type TailRobotPartLogsOptions struct {
Filter *string
}
TailRobotPartLogsOptions contains optional parameters for TailRobotPartLogs.
type TrainingJobLogEntry ¶ added in v0.54.0
TrainingJobLogEntry is a log entry from a training job.
type TrainingJobMetadata ¶ added in v0.54.0
type TrainingJobMetadata struct { ID string DatasetID string OrganizationID string ModelName string ModelVersion string ModelType ModelType ModelFramework ModelFramework IsCustomJob bool RegistryItemID string RegistryItemVersion string Status TrainingStatus ErrorStatus *status.Status CreatedOn *time.Time LastModified *time.Time TrainingStarted *time.Time TrainingEnded *time.Time SyncedModelID string Tags []string }
TrainingJobMetadata contains the metadata for a training job.
type TrainingStatus ¶ added in v0.54.0
type TrainingStatus int
TrainingStatus respresents the status of a training job.
const ( // TrainingStatusUnspecified respresents an unspecified training status. TrainingStatusUnspecified TrainingStatus = iota // TrainingStatusPending respresents a pending training job. TrainingStatusPending // TrainingStatusInProgress respresents a training job that is in progress. TrainingStatusInProgress // TrainingStatusCompleted respresents a completed training job. TrainingStatusCompleted // TrainingStatusFailed respresents a failed training job. TrainingStatusFailed // TrainingStatusCanceled respresents a canceled training job. TrainingStatusCanceled // TrainingStatusCanceling respresents a training job that is being canceled. TrainingStatusCanceling )
type UpdateBoundingBoxOptions ¶ added in v0.54.0
type UpdateBoundingBoxOptions struct { Label *string // Normalized coordinates where all coordinates must be in the range [0, 1]. XMinNormalized *float64 YMinNormalized *float64 XMaxNormalized *float64 YMaxNormalized *float64 }
UpdateBoundingBoxOptions contains optional parameters for UpdateBoundingBox.
type UpdateFragmentOptions ¶ added in v0.53.0
type UpdateFragmentOptions struct { Public *bool Visibility *FragmentVisibility }
UpdateFragmentOptions contains optional parameters for UpdateFragment.
type UpdateLocationOptions ¶ added in v0.53.0
type UpdateLocationOptions struct { Name *string // PArentLocationID is the new parent location to move the location under. ParentLocationID *string // Region is the GCS region to associate the location with. Region *string }
UpdateLocationOptions contains optional parameters for UpdateLocation.
type UpdateModuleOptions ¶ added in v0.53.0
type UpdateModuleOptions struct { // The path to a setup script that is run before a newly downloaded module starts. FirstRun *string }
UpdateModuleOptions contains optional parameters for UpdateModule.
type UpdateOrganizationOptions ¶ added in v0.53.0
type UpdateOrganizationOptions struct { Name *string Namespace *string // Region is the new GCS region to associate the org with. Region *string CID *string }
UpdateOrganizationOptions contains optional parameters for UpdateOrganization.
type UpdateRegistryItemOptions ¶ added in v0.53.0
type UpdateRegistryItemOptions struct {
URL *string
}
UpdateRegistryItemOptions contains optional parameters for UpdateRegistryItem.
type UploadMetadata ¶ added in v0.52.0
type UploadMetadata struct { PartID string ComponentType string ComponentName string MethodName string Type DataType FileName string MethodParameters map[string]interface{} FileExtension string Tags []string }
UploadMetadata contains the metadata for binary (image + file) data.
type Uploads ¶ added in v0.53.0
Uploads holds the time the file was uploaded and the OS and architecture a module is built to run on.
type UsageCost ¶ added in v0.53.0
type UsageCost struct { ResourceType UsageCostType Cost float64 }
UsageCost contains the cost and cost type.
type UsageCostType ¶ added in v0.53.0
type UsageCostType int
UsageCostType specifies the type of usage cost.
const ( // UsageCostTypeUnspecified is an unspecified usage cost type. UsageCostTypeUnspecified UsageCostType = iota // UsageCostTypeDataUpload represents the usage cost from data upload. UsageCostTypeDataUpload // UsageCostTypeDataEgress represents the usage cost from data egress. UsageCostTypeDataEgress // UsageCostTypeRemoteControl represents the usage cost from remote control. UsageCostTypeRemoteControl // UsageCostTypeStandardCompute represents the usage cost from standard compute. UsageCostTypeStandardCompute // UsageCostTypeCloudStorage represents the usage cost from cloud storage. UsageCostTypeCloudStorage // UsageCostTypeBinaryDataCloudStorage represents the usage cost from binary data cloud storage. UsageCostTypeBinaryDataCloudStorage // UsageCostTypeOtherCloudStorage represents the usage cost from other cloud storage. UsageCostTypeOtherCloudStorage // UsageCostTypePerMachine represents the usage cost per machine. UsageCostTypePerMachine )
type VersionHistory ¶ added in v0.53.0
type VersionHistory struct { Version string Files []*Uploads Models []*Model Entrypoint string FirstRun *string }
VersionHistory holds the history of a version.
type ViamClient ¶
type ViamClient struct {
// contains filtered or unexported fields
}
ViamClient is a gRPC client for method calls to Viam app.
func CreateViamClientWithAPIKey ¶
func CreateViamClientWithAPIKey( ctx context.Context, options Options, apiKey, apiKeyID string, logger logging.Logger, ) (*ViamClient, error)
CreateViamClientWithAPIKey creates a ViamClient with an API key.
func CreateViamClientWithOptions ¶
func CreateViamClientWithOptions(ctx context.Context, options Options, logger logging.Logger) (*ViamClient, error)
CreateViamClientWithOptions creates a ViamClient with an Options struct.
func (*ViamClient) AppClient ¶ added in v0.53.0
func (c *ViamClient) AppClient() *AppClient
AppClient initializes and returns an AppClient instance used to make app method calls. To use AppClient, you must first instantiate a ViamClient.
func (*ViamClient) BillingClient ¶ added in v0.53.0
func (c *ViamClient) BillingClient() *BillingClient
BillingClient initializes and returns a BillingClient instance used to make app method calls. To use BillingClient, you must first instantiate a ViamClient.
func (*ViamClient) DataClient ¶ added in v0.52.0
func (c *ViamClient) DataClient() *DataClient
DataClient initializes and returns a DataClient instance used to make data method calls. To use DataClient, you must first instantiate a ViamClient.
func (*ViamClient) MLTrainingClient ¶ added in v0.54.0
func (c *ViamClient) MLTrainingClient() *MLTrainingClient
MLTrainingClient initializes and returns a MLTrainingClient instance used to make ML training method calls. To use MLTrainingClient, you must first instantiate a ViamClient.
func (*ViamClient) ProvisioningClient ¶ added in v0.53.0
func (c *ViamClient) ProvisioningClient() *ProvisioningClient
ProvisioningClient initializes and returns a ProvisioningClient instance used to make provisioning method calls. To use ProvisioningClient, you must first instantiate a ViamClient.
type Visibility ¶ added in v0.53.0
type Visibility int
Visibility specifies the type of visibility of a registry item.
const ( // VisibilityUnspecified represents an unspecified visibility. VisibilityUnspecified Visibility = iota // VisibilityPrivate are for registry items visible only within the owning org. VisibilityPrivate // VisibilityPublic are for registry items that are visible to everyone. VisibilityPublic // VisibilityPublicUnlisted are for registry items usable in everyone's robot but are hidden from the registry page as if they are private. VisibilityPublicUnlisted )