workspace

package
v0.77.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessURL added in v0.44.0

type AccessURL struct {
	URL string `json:"url"`
}

type Client

type Client struct {
	*ai.Client
	Workspace *Service
}

A Client manages communication with HSDP AI-Workspace API

func NewClient

func NewClient(iamClient *iam.Client, config *ai.Config) (*Client, error)

NewClient returns a new HSDP AI-Workspace API client. A configured IAM client must be provided as the underlying API requires an IAM token

type LogArtefact added in v0.44.0

type LogArtefact struct {
	StartupLog []string `json:"startupLog"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func (*Service) CreateWorkspace

func (s *Service) CreateWorkspace(model Workspace) (*Workspace, *ai.Response, error)

func (*Service) DeleteWorkspace

func (s *Service) DeleteWorkspace(ws Workspace) (*ai.Response, error)

func (*Service) GetWorkspaceAccessURL added in v0.44.0

func (s *Service) GetWorkspaceAccessURL(ws Workspace) (*AccessURL, *ai.Response, error)

func (*Service) GetWorkspaceByID

func (s *Service) GetWorkspaceByID(id string) (*Workspace, *ai.Response, error)

func (*Service) GetWorkspaceLogs added in v0.44.0

func (s *Service) GetWorkspaceLogs(ws Workspace) (*LogArtefact, *ai.Response, error)

func (*Service) GetWorkspaces

func (s *Service) GetWorkspaces(opt *ai.GetOptions, options ...ai.OptionFunc) ([]Workspace, *ai.Response, error)

func (*Service) StartWorkspace added in v0.44.0

func (s *Service) StartWorkspace(ws Workspace) (*ai.Response, error)

func (*Service) StopWorkspace added in v0.44.0

func (s *Service) StopWorkspace(ws Workspace) (*ai.Response, error)

type Workspace

type Workspace struct {
	ID                      string                    `json:"id,omitempty"`
	ResourceType            string                    `json:"resourceType"`
	Name                    string                    `json:"name" validate:"required"`
	Description             string                    `json:"description,omitempty"`
	ComputeTarget           ai.ReferenceComputeTarget `json:"computeTarget" validate:"required"`
	SourceCode              ai.SourceCode             `json:"sourceCode"`
	Labels                  []string                  `json:"labels,omitempty"`
	Type                    string                    `json:"type,omitempty"`
	AdditionalConfiguration string                    `json:"additionalConfiguration,omitempty"`
	Created                 string                    `json:"created,omitempty"`
	CreatedBy               string                    `json:"createdBy,omitempty"`
	LastUpdated             string                    `json:"lastUpdated,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL