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(version string) (*semver.Version, error)
- func PlatformReleaseToRPC(platformRelease *cores.PlatformRelease) *rpc.PlatformRelease
- func PlatformToRPCPlatformMetadata(platform *cores.Platform) *rpc.PlatformMetadata
- func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, ...) error
- func UpdateLibrariesIndex(ctx context.Context, req *rpc.UpdateLibrariesIndexRequest, ...) error
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 parsed version or nil if the version is the empty string. An error is returned if the version is not valid semver.
func PlatformReleaseToRPC ¶
func PlatformReleaseToRPC(platformRelease *cores.PlatformRelease) *rpc.PlatformRelease
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 PlatformToRPCPlatformMetadata ¶
func PlatformToRPCPlatformMetadata(platform *cores.Platform) *rpc.PlatformMetadata
PlatformToRPCPlatformMetadata converts our internal structure to the RPC structure.
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 ¶
This section is empty.