provider

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InitializeProviderRequest

type InitializeProviderRequest struct {
	BasePath          string
	ServerDownloadUrl string
	ServerVersion     string
	ServerUrl         string
	ServerApiUrl      string
	LogsDir           string
}

type ProjectRequest

type ProjectRequest struct {
	TargetOptions string
	Project       *types.Project
}

type Provider

type Provider interface {
	Initialize(InitializeProviderRequest) (*types.Empty, error)
	GetInfo() (ProviderInfo, error)

	GetTargetManifest() (*ProviderTargetManifest, error)
	GetDefaultTargets() (*[]ProviderTarget, error)

	CreateWorkspace(*WorkspaceRequest) (*types.Empty, error)
	StartWorkspace(*WorkspaceRequest) (*types.Empty, error)
	StopWorkspace(*WorkspaceRequest) (*types.Empty, error)
	DestroyWorkspace(*WorkspaceRequest) (*types.Empty, error)
	GetWorkspaceInfo(*WorkspaceRequest) (*types.WorkspaceInfo, error)

	CreateProject(*ProjectRequest) (*types.Empty, error)
	StartProject(*ProjectRequest) (*types.Empty, error)
	StopProject(*ProjectRequest) (*types.Empty, error)
	DestroyProject(*ProjectRequest) (*types.Empty, error)
	GetProjectInfo(*ProjectRequest) (*types.ProjectInfo, error)
}

type ProviderInfo

type ProviderInfo struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type ProviderPlugin

type ProviderPlugin struct {
	Impl Provider
}

func (*ProviderPlugin) Client

func (p *ProviderPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*ProviderPlugin) Server

func (p *ProviderPlugin) Server(*plugin.MuxBroker) (interface{}, error)

type ProviderRPCClient

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

func (*ProviderRPCClient) CreateProject

func (m *ProviderRPCClient) CreateProject(projectReq *ProjectRequest) (*types.Empty, error)

func (*ProviderRPCClient) CreateWorkspace

func (m *ProviderRPCClient) CreateWorkspace(workspaceReq *WorkspaceRequest) (*types.Empty, error)

func (*ProviderRPCClient) DestroyProject

func (m *ProviderRPCClient) DestroyProject(projectReq *ProjectRequest) (*types.Empty, error)

func (*ProviderRPCClient) DestroyWorkspace

func (m *ProviderRPCClient) DestroyWorkspace(workspaceReq *WorkspaceRequest) (*types.Empty, error)

func (*ProviderRPCClient) GetDefaultTargets

func (m *ProviderRPCClient) GetDefaultTargets() (*[]ProviderTarget, error)

func (*ProviderRPCClient) GetInfo

func (m *ProviderRPCClient) GetInfo() (ProviderInfo, error)

func (*ProviderRPCClient) GetProjectInfo

func (m *ProviderRPCClient) GetProjectInfo(projectReq *ProjectRequest) (*types.ProjectInfo, error)

func (*ProviderRPCClient) GetTargetManifest

func (m *ProviderRPCClient) GetTargetManifest() (*ProviderTargetManifest, error)

func (*ProviderRPCClient) GetWorkspaceInfo

func (m *ProviderRPCClient) GetWorkspaceInfo(workspace *WorkspaceRequest) (*types.WorkspaceInfo, error)

func (*ProviderRPCClient) Initialize

func (*ProviderRPCClient) StartProject

func (m *ProviderRPCClient) StartProject(projectReq *ProjectRequest) (*types.Empty, error)

func (*ProviderRPCClient) StartWorkspace

func (m *ProviderRPCClient) StartWorkspace(workspaceReq *WorkspaceRequest) (*types.Empty, error)

func (*ProviderRPCClient) StopProject

func (m *ProviderRPCClient) StopProject(projectReq *ProjectRequest) (*types.Empty, error)

func (*ProviderRPCClient) StopWorkspace

func (m *ProviderRPCClient) StopWorkspace(workspaceReq *WorkspaceRequest) (*types.Empty, error)

type ProviderRPCServer

type ProviderRPCServer struct {
	Impl Provider
}

func (*ProviderRPCServer) CreateProject

func (m *ProviderRPCServer) CreateProject(arg *ProjectRequest, resp *types.Empty) error

func (*ProviderRPCServer) CreateWorkspace

func (m *ProviderRPCServer) CreateWorkspace(arg *WorkspaceRequest, resp *types.Empty) error

func (*ProviderRPCServer) DestroyProject

func (m *ProviderRPCServer) DestroyProject(arg *ProjectRequest, resp *types.Empty) error

func (*ProviderRPCServer) DestroyWorkspace

func (m *ProviderRPCServer) DestroyWorkspace(arg *WorkspaceRequest, resp *types.Empty) error

func (*ProviderRPCServer) GetDefaultTargets

func (m *ProviderRPCServer) GetDefaultTargets(arg interface{}, resp *[]ProviderTarget) error

func (*ProviderRPCServer) GetInfo

func (m *ProviderRPCServer) GetInfo(arg interface{}, resp *ProviderInfo) error

func (*ProviderRPCServer) GetProjectInfo

func (m *ProviderRPCServer) GetProjectInfo(arg *ProjectRequest, resp *types.ProjectInfo) error

func (*ProviderRPCServer) GetTargetManifest

func (m *ProviderRPCServer) GetTargetManifest(arg interface{}, resp *ProviderTargetManifest) error

func (*ProviderRPCServer) GetWorkspaceInfo

func (m *ProviderRPCServer) GetWorkspaceInfo(arg *WorkspaceRequest, resp *types.WorkspaceInfo) error

func (*ProviderRPCServer) Initialize

func (m *ProviderRPCServer) Initialize(arg InitializeProviderRequest, resp *types.Empty) error

func (*ProviderRPCServer) StartProject

func (m *ProviderRPCServer) StartProject(arg *ProjectRequest, resp *types.Empty) error

func (*ProviderRPCServer) StartWorkspace

func (m *ProviderRPCServer) StartWorkspace(arg *WorkspaceRequest, resp *types.Empty) error

func (*ProviderRPCServer) StopProject

func (m *ProviderRPCServer) StopProject(arg *ProjectRequest, resp *types.Empty) error

func (*ProviderRPCServer) StopWorkspace

func (m *ProviderRPCServer) StopWorkspace(arg *WorkspaceRequest, resp *types.Empty) error

type ProviderTarget

type ProviderTarget struct {
	Name         string       `json:"name"`
	ProviderInfo ProviderInfo `json:"providerInfo"`
	// JSON encoded map of options
	Options string `json:"options"`

} // @name ProviderTarget

type ProviderTargetManifest

type ProviderTargetManifest map[string]ProviderTargetProperty // @name ProviderTargetManifest

type ProviderTargetProperty

type ProviderTargetProperty struct {
	Type        ProviderTargetPropertyType
	InputMasked bool
	// A regex string matched with the name of the target to determine if the property should be disabled
	// If the regex matches the target name, the property will be disabled
	// E.g. "^local$" will disable the property for the local target
	DisabledPredicate string
	// DefaultValue is converted into the appropriate type based on the Type
	// If the property is a FilePath, the DefaultValue is a path to a directory
	DefaultValue string
	// Brief description of the property
	Description string
	// Options is only used if the Type is ProviderTargetPropertyTypeOption
	Options []string
}

type ProviderTargetPropertyType

type ProviderTargetPropertyType string
const (
	ProviderTargetPropertyTypeString   ProviderTargetPropertyType = "string"
	ProviderTargetPropertyTypeOption   ProviderTargetPropertyType = "option"
	ProviderTargetPropertyTypeBoolean  ProviderTargetPropertyType = "boolean"
	ProviderTargetPropertyTypeInt      ProviderTargetPropertyType = "int"
	ProviderTargetPropertyTypeFloat    ProviderTargetPropertyType = "float"
	ProviderTargetPropertyTypeFilePath ProviderTargetPropertyType = "file-path"
)

type WorkspaceRequest

type WorkspaceRequest struct {
	TargetOptions string
	Workspace     *types.Workspace
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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