Documentation
¶
Overview ¶
Package api is a thin typed client for the public Privasys platform API (the management service). It speaks only the documented public surface.
Index ¶
- type Client
- func (c *Client) CheckName(ctx context.Context, name string) (map[string]interface{}, error)
- func (c *Client) CompatibleEnclaves(ctx context.Context, id string) ([]map[string]interface{}, error)
- func (c *Client) CreateApp(ctx context.Context, body map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) CreateVersion(ctx context.Context, id, commitURL string) (map[string]interface{}, error)
- func (c *Client) DeleteApp(ctx context.Context, id string) error
- func (c *Client) DeployVersion(ctx context.Context, id, versionID, enclaveID string) (map[string]interface{}, error)
- func (c *Client) GetApp(ctx context.Context, id string) (map[string]interface{}, error)
- func (c *Client) ListApps(ctx context.Context) ([]map[string]interface{}, error)
- func (c *Client) ListBuilds(ctx context.Context, id string) ([]map[string]interface{}, error)
- func (c *Client) ListDeployments(ctx context.Context, id string) ([]map[string]interface{}, error)
- func (c *Client) ListVersions(ctx context.Context, id string) ([]map[string]interface{}, error)
- func (c *Client) MCP(ctx context.Context, id string) (map[string]interface{}, error)
- func (c *Client) RPC(ctx context.Context, id, function string, body interface{}) (interface{}, error)
- func (c *Client) Schema(ctx context.Context, id string) (map[string]interface{}, error)
- func (c *Client) StopDeployment(ctx context.Context, id, deploymentID string, force bool) (map[string]interface{}, error)
- func (c *Client) UploadCwasm(ctx context.Context, id, path string) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client calls the platform API with a bearer access token.
func (*Client) CompatibleEnclaves ¶ added in v0.2.0
func (c *Client) CompatibleEnclaves(ctx context.Context, id string) ([]map[string]interface{}, error)
CompatibleEnclaves lists enclaves an app can be deployed to.
func (*Client) CreateApp ¶ added in v0.2.0
func (c *Client) CreateApp(ctx context.Context, body map[string]interface{}) (map[string]interface{}, error)
CreateApp creates an app from the given request body (CreateAppRequest shape).
func (*Client) CreateVersion ¶ added in v0.2.0
func (c *Client) CreateVersion(ctx context.Context, id, commitURL string) (map[string]interface{}, error)
CreateVersion records a new version from a commit URL (build is triggered).
func (*Client) DeployVersion ¶ added in v0.2.0
func (c *Client) DeployVersion(ctx context.Context, id, versionID, enclaveID string) (map[string]interface{}, error)
DeployVersion deploys a version to an enclave.
func (*Client) ListApps ¶
ListApps returns the caller's apps as generic records (the CLI renders a stable subset of columns and can emit the full objects as JSON/YAML, so it does not pin the full server schema).
func (*Client) ListBuilds ¶ added in v0.2.0
ListBuilds returns an app's build jobs.
func (*Client) ListDeployments ¶ added in v0.2.0
ListDeployments returns an app's deployments.
func (*Client) ListVersions ¶ added in v0.2.0
ListVersions returns an app's versions.
func (*Client) RPC ¶ added in v0.2.0
func (c *Client) RPC(ctx context.Context, id, function string, body interface{}) (interface{}, error)
RPC calls an app function, passing body through verbatim and returning the raw decoded result.
func (*Client) Schema ¶ added in v0.2.0
Schema returns the app's exported function schema (unwraps {status, schema}).