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) 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) 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) OrganizationGetSupportEmail(ctx context.Context, orgID string) (string, 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 BinaryDataReturn
- type BinaryID
- type BinaryMetadata
- type BinaryOptions
- type BoundingBox
- type CaptureInterval
- type CaptureMetadata
- type CloudConfig
- type CreateFragmentOptions
- type CreateLocationOptions
- type CreateOrganizationInviteOptions
- 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, filter Filter, limit int, sortOrder Order, last string, ...) (BinaryDataReturn, 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) 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) (DatabaseConnReturn, 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, filter Filter, limit int, last string, sortOrder Order, ...) (TabularDataReturn, error)
- func (d *DataClient) TabularDataByMQL(ctx context.Context, organizationID string, mqlbinary [][]byte) ([]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, label *string, ...) error
- type DataRequest
- type DataType
- type DatabaseConnReturn
- type Dataset
- type FileData
- type FileUploadOptions
- type Filter
- type Fragment
- type FragmentHistoryEntry
- type FragmentVisibility
- type GetCurrentMonthUsageResponse
- type GetFragmentHistoryOptions
- type GetOrgBillingInformationResponse
- type GetRobotPartLogsOptions
- type GetSmartMachineStatusResponse
- type InvoiceSummary
- type ListModulesOptions
- type ListRegistryItemsOptions
- type Location
- type LocationAuth
- type LocationOrganization
- type LogEntry
- type MLModelMetadata
- 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 StreamingOptions
- type TabularData
- type TabularDataReturn
- type TabularOptions
- type TagsFilter
- type TagsFilterType
- type TailRobotPartLogsOptions
- 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) 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) 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) OrganizationGetSupportEmail ¶ added in v0.53.0
OrganizationGetSupportEmail gets an organization's support email.
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
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 BinaryDataReturn ¶ added in v0.52.0
type BinaryDataReturn struct { BinaryData []BinaryData Count int Last string }
BinaryDataReturn 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 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 BinaryOptions ¶ added in v0.52.0
type BinaryOptions struct { Type *DataType FileName *string MethodParameters map[string]interface{} Tags []string DataRequestTimes *[2]time.Time }
BinaryOptions represents optional parameters for the BinaryDataCaptureUpload method.
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 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.
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, filter Filter, limit int, sortOrder Order, last string, includeBinary bool, countOnly bool, includeInternalData bool, ) (BinaryDataReturn, 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 *BinaryOptions, ) (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.
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. 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) 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) (DatabaseConnReturn, 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) 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. 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 *StreamingOptions, ) (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, filter Filter, limit int, last string, sortOrder Order, countOnly bool, includeInternalData bool, ) (TabularDataReturn, error)
TabularDataByFilter queries tabular data and metadata based on given filters.
func (*DataClient) TabularDataByMQL ¶ added in v0.52.0
func (d *DataClient) TabularDataByMQL(ctx context.Context, organizationID string, mqlbinary [][]byte) ([]map[string]interface{}, error)
TabularDataByMQL queries tabular data with an MQL (MongoDB Query Language) query.
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 *TabularOptions, ) (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.
func (*DataClient) UpdateBoundingBox ¶ added in v0.52.0
func (d *DataClient) UpdateBoundingBox(ctx context.Context, binaryID BinaryID, bboxID string, label *string, xMinNormalized *float64, yMinNormalized *float64, xMaxNormalized *float64, yMaxNormalized *float64, ) error
UpdateBoundingBox updates the bounding box for a given bbox ID for the file represented by the binary ID, modifying its label and position using optional normalized coordinates (xMin, yMin, xMax, yMax), where all coordinates must be in the range [0, 1].
type DataRequest ¶ added in v0.52.0
type DatabaseConnReturn ¶ added in v0.52.0
DatabaseConnReturn 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 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 GetFragmentHistoryOptions ¶ added in v0.53.0
GetFragmentHistoryOptions contains optional parameters for GetFragmentHistory.
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 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 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 {
// contains filtered or unexported fields
}
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 StreamingOptions ¶ added in v0.52.0
type StreamingOptions struct { ComponentType *string ComponentName *string MethodName *string Type *DataType FileName *string MethodParameters map[string]interface{} Tags []string DataRequestTimes *[2]time.Time }
StreamingOptions represents optional parameters for the StreamingDataCaptureUpload method.
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 TabularDataReturn ¶ added in v0.52.0
type TabularDataReturn struct { TabularData []TabularData Count int Last string }
TabularDataReturn 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 TabularOptions ¶ added in v0.52.0
type TabularOptions struct { Type *DataType FileName *string MethodParameters map[string]interface{} FileExtension *string Tags []string }
TabularOptions 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 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) 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 )