Documentation
¶
Index ¶
- func Create(req *rpc.CreateRequest, extraUserAgent ...string) (*rpc.CreateResponse, error)
- func Destroy(ctx context.Context, req *rpc.DestroyRequest) (*rpc.DestroyResponse, error)
- func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) error
- func ParseVersion(req Versioned) (*semver.Version, error)
- func PlatformReleaseToRPC(platformRelease *cores.PlatformRelease) *rpc.Platform
- func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, ...) error
- func UpdateLibrariesIndex(ctx context.Context, req *rpc.UpdateLibrariesIndexRequest, ...) error
- type Versioned
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 ¶
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