Documentation
¶
Index ¶
- Variables
- func ConnectToHostFromCLIToken(ctx context.Context, host string, logger logging.Logger) (robot.Robot, error)
- func ConnectToMachine(ctx context.Context, logger logging.Logger, host, apiKeyId, apiKey string) (robot.Robot, error)
- func ConnectToMachineFromEnv(ctx context.Context, logger logging.Logger) (robot.Robot, error)
- func FindDep(deps resource.Dependencies, n string) (resource.Resource, bool)
- func GetFloat64FromMap(m map[string]interface{}, n string) (float64, bool)
- func GetInt64FromMap(m map[string]interface{}, n string) (int64, bool)
- func GetIntFromMap(m map[string]interface{}, n string) (int, bool)
- func HTTPAuthHeader(nameType, machine, apiKeyId, apiKey string) string
- func HTTPAuthHeaderFromEnv(nameType string) (string, error)
- func MachineToDependencies(client robot.Robot) (resource.Dependencies, error)
- func NewWebModule(name resource.Name, fs fs.FS, logger logging.Logger) (*webModule, error)
- func NewWebModuleAndStart(name resource.Name, fs fs.FS, logger logging.Logger, port int) (resource.Resource, error)
- func NewWebModuleWithCookies(name resource.Name, fs fs.FS, logger logging.Logger, cookies []*http.Cookie) (*webModule, error)
- func PrepInModuleServer(fs fs.FS, accessLog logging.Logger, cookies []*http.Cookie) (*http.ServeMux, *http.Server, error)
- func ReadJSONFromFile(fn string, where any) error
- func UpdateComponentCloudAttributes(ctx context.Context, c *app.AppClient, id string, name resource.Name, ...) error
- func UpdateComponentCloudAttributesFromModuleEnv(ctx context.Context, name resource.Name, newAttr utils.AttributeMap, ...) error
- type MachineSetup
- type StringState
Constants ¶
This section is empty.
Variables ¶
View Source
var NamespaceFamily = resource.ModelNamespace("erh").WithFamily("vmodutils")
Functions ¶
func ConnectToHostFromCLIToken ¶ added in v0.1.0
func ConnectToHostFromCLIToken(ctx context.Context, host string, logger logging.Logger) (robot.Robot, error)
ConnectToHostFromCLIToken uses the viam cli token to login to a machine with just a hostname. use "viam login" to setup the token.
func ConnectToMachine ¶ added in v0.0.4
func ConnectToMachineFromEnv ¶ added in v0.0.4
func GetFloat64FromMap ¶ added in v0.2.10
func GetInt64FromMap ¶ added in v0.2.7
func HTTPAuthHeader ¶ added in v0.3.0
nameType is BoatAuth or the like
func HTTPAuthHeaderFromEnv ¶ added in v0.3.0
func MachineToDependencies ¶ added in v0.0.2
func MachineToDependencies(client robot.Robot) (resource.Dependencies, error)
func NewWebModule ¶ added in v0.0.4
func NewWebModuleAndStart ¶ added in v0.0.4
func NewWebModuleWithCookies ¶ added in v0.3.0
func PrepInModuleServer ¶ added in v0.0.4
func ReadJSONFromFile ¶ added in v0.1.4
func UpdateComponentCloudAttributes ¶ added in v0.1.1
Types ¶
type MachineSetup ¶
type MachineSetup struct {
// contains filtered or unexported fields
}
func AddMachineFlags ¶
func AddMachineFlags() *MachineSetup
func (*MachineSetup) Connect ¶
func (ms *MachineSetup) Connect(ctx context.Context, logger logging.Logger) (*client.RobotClient, error)
func (*MachineSetup) Valid ¶ added in v0.0.3
func (ms *MachineSetup) Valid() bool
type StringState ¶ added in v0.2.3
type StringState struct {
// contains filtered or unexported fields
}
func (*StringState) CheckEmpty ¶ added in v0.2.3
func (s *StringState) CheckEmpty() error
func (*StringState) Pop ¶ added in v0.2.3
func (s *StringState) Pop()
func (*StringState) Push ¶ added in v0.2.3
func (s *StringState) Push(str string)
func (*StringState) String ¶ added in v0.2.3
func (s *StringState) String() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.