Documentation
¶
Index ¶
- Constants
- Variables
- func NewChunkEndpoint(s Service) goa.Endpoint
- func NewGetEndpoint(s Service) goa.Endpoint
- func NewListEndpoint(s Service) goa.Endpoint
- func NewManifestEndpoint(s Service) goa.Endpoint
- func NewStartEndpoint(s Service) goa.Endpoint
- func NewStatusEndpoint(s Service) goa.Endpoint
- func NewViewedExecutionCommand(res *ExecutionCommand, view string) *executionsviews.ExecutionCommand
- func NewViewedExecutionRecord(res *ExecutionRecord, view string) *executionsviews.ExecutionRecord
- func NewViewedExecutionStatus(res *ExecutionStatus, view string) *executionsviews.ExecutionStatus
- type ChunkPayload
- type Client
- func (c *Client) Chunk(ctx context.Context, p *ChunkPayload) (res *ExecutionRecordingChunk, err error)
- func (c *Client) Get(ctx context.Context, p *GetPayload) (res *ExecutionRecord, err error)
- func (c *Client) List(ctx context.Context, p *ListPayload) (res []*ExecutionRecord, err error)
- func (c *Client) Manifest(ctx context.Context, p *ManifestPayload) (res *ExecutionRecordingManifest, err error)
- func (c *Client) Start(ctx context.Context, p *StartPayload) (res *ExecutionCommand, err error)
- func (c *Client) Status(ctx context.Context) (res *ExecutionStatus, err error)
- type Endpoints
- type ExecutionCommand
- type ExecutionRecord
- type ExecutionRecordingChunk
- type ExecutionRecordingManifest
- type ExecutionStatus
- type Forbidden
- type GetPayload
- type Invalid
- type ListPayload
- type ManifestPayload
- type NotFound
- type Service
- type StartPayload
- type Unauthorized
- type Unavailable
Constants ¶
const APIName = "kube-workspaces"
APIName is the name of the API as defined in the design.
const APIVersion = "1.0.0"
APIVersion is the version of the API as defined in the design.
const ServiceName = "executions"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [6]string{"status", "list", "get", "start", "manifest", "chunk"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func NewChunkEndpoint ¶
NewChunkEndpoint returns an endpoint function that calls the method "chunk" of service "executions".
func NewGetEndpoint ¶
NewGetEndpoint returns an endpoint function that calls the method "get" of service "executions".
func NewListEndpoint ¶
NewListEndpoint returns an endpoint function that calls the method "list" of service "executions".
func NewManifestEndpoint ¶
NewManifestEndpoint returns an endpoint function that calls the method "manifest" of service "executions".
func NewStartEndpoint ¶
NewStartEndpoint returns an endpoint function that calls the method "start" of service "executions".
func NewStatusEndpoint ¶
NewStatusEndpoint returns an endpoint function that calls the method "status" of service "executions".
func NewViewedExecutionCommand ¶
func NewViewedExecutionCommand(res *ExecutionCommand, view string) *executionsviews.ExecutionCommand
NewViewedExecutionCommand initializes viewed result type ExecutionCommand from result type ExecutionCommand using the given view.
func NewViewedExecutionRecord ¶
func NewViewedExecutionRecord(res *ExecutionRecord, view string) *executionsviews.ExecutionRecord
NewViewedExecutionRecord initializes viewed result type ExecutionRecord from result type ExecutionRecord using the given view.
func NewViewedExecutionStatus ¶
func NewViewedExecutionStatus(res *ExecutionStatus, view string) *executionsviews.ExecutionStatus
NewViewedExecutionStatus initializes viewed result type ExecutionStatus from result type ExecutionStatus using the given view.
Types ¶
type ChunkPayload ¶
ChunkPayload is the payload type of the executions service chunk method.
type Client ¶
type Client struct {
StatusEndpoint goa.Endpoint
ListEndpoint goa.Endpoint
GetEndpoint goa.Endpoint
StartEndpoint goa.Endpoint
ManifestEndpoint goa.Endpoint
ChunkEndpoint goa.Endpoint
}
Client is the "executions" service client.
func (*Client) Chunk ¶
func (c *Client) Chunk(ctx context.Context, p *ChunkPayload) (res *ExecutionRecordingChunk, err error)
Chunk calls the "chunk" endpoint of the "executions" service. Chunk may return the following errors:
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- "unavailable" (type Unavailable)
- "invalid" (type Invalid)
- "not_found" (type NotFound)
- error: internal error
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, p *GetPayload) (res *ExecutionRecord, err error)
Get calls the "get" endpoint of the "executions" service. Get may return the following errors:
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- "unavailable" (type Unavailable)
- "invalid" (type Invalid)
- "not_found" (type NotFound)
- error: internal error
func (*Client) List ¶
func (c *Client) List(ctx context.Context, p *ListPayload) (res []*ExecutionRecord, err error)
List calls the "list" endpoint of the "executions" service. List may return the following errors:
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- "unavailable" (type Unavailable)
- "invalid" (type Invalid)
- "not_found" (type NotFound)
- error: internal error
func (*Client) Manifest ¶
func (c *Client) Manifest(ctx context.Context, p *ManifestPayload) (res *ExecutionRecordingManifest, err error)
Manifest calls the "manifest" endpoint of the "executions" service. Manifest may return the following errors:
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- "unavailable" (type Unavailable)
- "invalid" (type Invalid)
- "not_found" (type NotFound)
- error: internal error
func (*Client) Start ¶
func (c *Client) Start(ctx context.Context, p *StartPayload) (res *ExecutionCommand, err error)
Start calls the "start" endpoint of the "executions" service. Start may return the following errors:
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- "unavailable" (type Unavailable)
- "invalid" (type Invalid)
- "not_found" (type NotFound)
- error: internal error
func (*Client) Status ¶
func (c *Client) Status(ctx context.Context) (res *ExecutionStatus, err error)
Status calls the "status" endpoint of the "executions" service. Status may return the following errors:
- "unauthorized" (type Unauthorized)
- "forbidden" (type Forbidden)
- "unavailable" (type Unavailable)
- "invalid" (type Invalid)
- "not_found" (type NotFound)
- error: internal error
type Endpoints ¶
type Endpoints struct {
Status goa.Endpoint
List goa.Endpoint
Get goa.Endpoint
Start goa.Endpoint
Manifest goa.Endpoint
Chunk goa.Endpoint
}
Endpoints wraps the "executions" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "executions" service with endpoints.
type ExecutionCommand ¶
type ExecutionCommand struct {
// Execution identifier
ExecutionID string
// Recording identifier
RecordingID string
Namespace string
WorkspaceName string
WorkspaceUID *string
// RFC3339 timestamp
AdmissionTime *string
// Storage mode: ephemeral|external|bundled
Mode *string
// none|durable
Durability *string
// Final command outcome
Outcome string
// Final lifecycle state
State string
// Guest process exit code when known
ExitCode *int
// Standard output, truncated to the pilot output bound
Stdout []byte
// Standard error, truncated to the pilot output bound
Stderr []byte
// Output was truncated at the 16 KiB bound
Truncated *bool
// Guest-measured duration in milliseconds
DurationMs *uint64
// Runner denial or transport-loss note
Denial *string
}
ExecutionCommand is the result type of the executions service start method.
func NewExecutionCommand ¶
func NewExecutionCommand(vres *executionsviews.ExecutionCommand) *ExecutionCommand
NewExecutionCommand initializes result type ExecutionCommand from viewed result type ExecutionCommand.
type ExecutionRecord ¶
type ExecutionRecord struct {
// Execution identifier
ExecutionID string
// Actor identifier
ActorID *string
// command|script|shell
Operation string
Namespace string
WorkspaceName string
WorkspaceUID *string
WorkspaceGeneration *int64
GrantVersion *string
OsIdentity *string
Elevated *bool
RecordingID string
// Storage mode: ephemeral|external|bundled
Mode string
// none|durable
Durability string
Admitted bool
// RFC3339 timestamp
AdmissionTime string
DenyReason *string
// lifecycle state
State *string
// RFC3339 timestamp
StartTime *string
// RFC3339 timestamp
EndTime *string
ExitCode *int
Termination *string
RecordingLost *bool
}
ExecutionRecord is the result type of the executions service get method.
func NewExecutionRecord ¶
func NewExecutionRecord(vres *executionsviews.ExecutionRecord) *ExecutionRecord
NewExecutionRecord initializes result type ExecutionRecord from viewed result type ExecutionRecord.
type ExecutionRecordingChunk ¶
type ExecutionRecordingChunk struct {
// Chunk index starting at 0
Index uint64
// Base64-encoded plaintext recording data
Data []byte
}
ExecutionRecordingChunk is the result type of the executions service chunk method.
type ExecutionRecordingManifest ¶
type ExecutionRecordingManifest struct {
RecordingID string
Chunks uint64
PlaintextBytes int64
Verified bool
}
ExecutionRecordingManifest is the result type of the executions service manifest method.
type ExecutionStatus ¶
type ExecutionStatus struct {
// Whether VM execution is enabled by policy
Enabled bool
// Whether elevated execution is allowed by policy
AllowElevated bool
// Storage mode: disabled|ephemeral|external|bundled
StorageMode string
// Metadata and recordings are durable (not ephemeral)
Durable bool
// Store is Ready and can admit work
StorageAvailable bool
// Opt-in management issuer prerequisites and initial bootstrap sync are ready;
// not a guest execution capability
IssuerReady bool
}
ExecutionStatus is the result type of the executions service status method.
func NewExecutionStatus ¶
func NewExecutionStatus(vres *executionsviews.ExecutionStatus) *ExecutionStatus
NewExecutionStatus initializes result type ExecutionStatus from viewed result type ExecutionStatus.
type Forbidden ¶
type Forbidden string
Scoped execution permission is required
func (Forbidden) ErrorName
deprecated
ErrorName returns the error name.
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (Forbidden) GoaErrorName ¶
GoaErrorName returns the error name.
type GetPayload ¶
type GetPayload struct {
// Execution identifier
ExecutionID string
}
GetPayload is the payload type of the executions service get method.
type Invalid ¶
type Invalid string
Invalid management request
func (Invalid) ErrorName
deprecated
ErrorName returns the error name.
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (Invalid) GoaErrorName ¶
GoaErrorName returns the error name.
type ListPayload ¶
type ListPayload struct {
// Filter by namespace
Namespace *string
// Filter by workspace name
WorkspaceName *string
// Filter by actor
ActorID *string
// RFC3339 lower bound
Since *string
// Max results
Limit int
}
ListPayload is the payload type of the executions service list method.
type ManifestPayload ¶
type ManifestPayload struct {
ExecutionID string
}
ManifestPayload is the payload type of the executions service manifest method.
type NotFound ¶
type NotFound string
Execution not found
func (NotFound) ErrorName
deprecated
ErrorName returns the error name.
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (NotFound) GoaErrorName ¶
GoaErrorName returns the error name.
type Service ¶
type Service interface {
// Get execution management status (policy + storage readiness)
Status(context.Context) (res *ExecutionStatus, err error)
// List execution records visible to the actor
List(context.Context, *ListPayload) (res []*ExecutionRecord, err error)
// Get an execution record and its last known outcome
Get(context.Context, *GetPayload) (res *ExecutionRecord, err error)
// Execute one bounded SYSTEM command in an eligible running Windows VM and
// return its recorded outcome synchronously
Start(context.Context, *StartPayload) (res *ExecutionCommand, err error)
// Verify recording integrity and audit protected playback access
Manifest(context.Context, *ManifestPayload) (res *ExecutionRecordingManifest, err error)
// Read a verified recording chunk with fresh scoped recording-read permission
Chunk(context.Context, *ChunkPayload) (res *ExecutionRecordingChunk, err error)
}
Scoped execution management status, history and protected recording replay
type StartPayload ¶
type StartPayload struct {
// Workspace namespace
Namespace string
// Workspace name
WorkspaceName string
// Absolute path or name of the program to run
Executable string
// Arguments passed to the executable verbatim
Args []string
// Optional working directory for the new process
Cwd *string
// Guest execution deadline in seconds
DeadlineSeconds int
}
StartPayload is the payload type of the executions service start method.
type Unauthorized ¶
type Unauthorized string
A current user-bound credential is required
func (Unauthorized) Error ¶
func (e Unauthorized) Error() string
Error returns an error description.
func (Unauthorized) ErrorName
deprecated
func (e Unauthorized) ErrorName() string
ErrorName returns the error name.
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (Unauthorized) GoaErrorName ¶
func (e Unauthorized) GoaErrorName() string
GoaErrorName returns the error name.
type Unavailable ¶
type Unavailable string
Execution storage or policy is unavailable
func (Unavailable) ErrorName
deprecated
func (e Unavailable) ErrorName() string
ErrorName returns the error name.
Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105
func (Unavailable) GoaErrorName ¶
func (e Unavailable) GoaErrorName() string
GoaErrorName returns the error name.