Documentation
¶
Index ¶
- Constants
- type AddAssetResponse
- type BulkAddAssetsRequest
- type BulkAddAssetsResponse
- type Client
- func (c *Client) Close()
- func (c *Client) CreateAsset(ctx context.Context, token uuid.UUID, asset oam.Asset) (string, error)
- func (c *Client) CreateAssetsBulk(ctx context.Context, token uuid.UUID, atype string, assets []oam.Asset) (int, error)
- func (c *Client) CreateSession(ctx context.Context, config *config.Config) (uuid.UUID, error)
- func (c *Client) HealthCheck(ctx context.Context) bool
- func (c *Client) ListSessions(ctx context.Context) ([]uuid.UUID, error)
- func (c *Client) SessionScope(ctx context.Context, token uuid.UUID, atype oam.AssetType) ([]oam.Asset, error)
- func (c *Client) SessionStats(ctx context.Context, token uuid.UUID) (*et.SessionStats, error)
- func (c *Client) Subscribe(ctx context.Context, token uuid.UUID) (<-chan string, error)
- func (c *Client) TerminateSession(ctx context.Context, token uuid.UUID) error
- type CreateSessionResponse
- type ListSessionsResponse
Constants ¶
const MaxBulkItems = 1000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddAssetResponse ¶
type AddAssetResponse struct {
EntityID string `json:"entityID"`
}
type BulkAddAssetsRequest ¶
type BulkAddAssetsRequest struct {
Items []json.RawMessage `json:"items"`
}
Bulk typed add: {"items":[ <OAM obj>, <OAM obj>, ... ]} where each item is arbitrary JSON object without "type".
type BulkAddAssetsResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Close ¶
func (c *Client) Close()
Close terminates any open connections associated with the client.
func (*Client) CreateAsset ¶
Creates a new asset on the server associated with the provided token.
func (*Client) CreateAssetsBulk ¶
func (c *Client) CreateAssetsBulk(ctx context.Context, token uuid.UUID, atype string, assets []oam.Asset) (int, error)
Creates multiple assets in bulk on the server associated with the provided token.
func (*Client) CreateSession ¶
Creates a new session on the server with the provided configuration.
func (*Client) HealthCheck ¶
HealthCheck returns true when the client was able to reach the server.
func (*Client) ListSessions ¶
Lists the active session and associated tokens on the server.
func (*Client) SessionScope ¶
func (c *Client) SessionScope(ctx context.Context, token uuid.UUID, atype oam.AssetType) ([]oam.Asset, error)
Retrieves scope for the session associated with the provided token.
func (*Client) SessionStats ¶
Retrieves statistics for the session associated with the provided token.
type CreateSessionResponse ¶
type CreateSessionResponse struct {
SessionToken string `json:"sessionToken"`
}
type ListSessionsResponse ¶
type ListSessionsResponse struct {
SessionTokens []string `json:"sessionTokens"`
}