commands

package
v0.35.3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: GPL-3.0 Imports: 25 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(req *rpc.CreateRequest, extraUserAgent ...string) (*rpc.CreateResponse, error)

Create a new CoreInstance ready to be initialized, supporting directories are also created.

func Destroy

func Destroy(ctx context.Context, req *rpc.DestroyRequest) (*rpc.DestroyResponse, error)

Destroy FIXMEDOC

func Init

func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) error

Init loads installed libraries and Platforms in CoreInstance with specified ID, a gRPC status error is returned if the CoreInstance doesn't exist. All responses are sent through responseCallback, can be nil to ignore all responses. Failures don't stop the loading process, in case of loading failure the Platform or library is simply skipped and an error gRPC status is sent to responseCallback.

func ParseVersion

func ParseVersion(req Versioned) (*semver.Version, error)

ParseVersion returns the version parsed from an interface that provides the GetVersion() method (interface Versioned)

func PlatformReleaseToRPC

func PlatformReleaseToRPC(platformRelease *cores.PlatformRelease) *rpc.Platform

PlatformReleaseToRPC converts our internal structure to the RPC structure. Note: this function does not touch the "Installed" field of rpc.Platform as it's not always clear that the platformRelease we're currently converting is actually installed.

func UpdateIndex

func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, downloadCB rpc.DownloadProgressCB) error

UpdateIndex FIXMEDOC

func UpdateLibrariesIndex

func UpdateLibrariesIndex(ctx context.Context, req *rpc.UpdateLibrariesIndexRequest, downloadCB rpc.DownloadProgressCB) error

UpdateLibrariesIndex updates the library_index.json

Types

type Versioned

type Versioned interface {
	GetVersion() string
}

Versioned is an object that provides a GetVersion() method

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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