provider

package
v0.13.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 5 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
	ContainerRegistry *containerregistry.ContainerRegistry
	Project           *workspace.Project
}

type Provider

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

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

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

	CreateProject(*ProjectRequest) (*util.Empty, error)
	StartProject(*ProjectRequest) (*util.Empty, error)
	StopProject(*ProjectRequest) (*util.Empty, error)
	DestroyProject(*ProjectRequest) (*util.Empty, error)
	GetProjectInfo(*ProjectRequest) (*workspace.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) (*util.Empty, error)

func (*ProviderRPCClient) CreateWorkspace

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

func (*ProviderRPCClient) DestroyProject

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

func (*ProviderRPCClient) DestroyWorkspace

func (m *ProviderRPCClient) DestroyWorkspace(workspaceReq *WorkspaceRequest) (*util.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) (*workspace.ProjectInfo, error)

func (*ProviderRPCClient) GetTargetManifest

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

func (*ProviderRPCClient) GetWorkspaceInfo

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

func (*ProviderRPCClient) Initialize

func (*ProviderRPCClient) StartProject

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

func (*ProviderRPCClient) StartWorkspace

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

func (*ProviderRPCClient) StopProject

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

func (*ProviderRPCClient) StopWorkspace

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

type ProviderRPCServer

type ProviderRPCServer struct {
	Impl Provider
}

func (*ProviderRPCServer) CreateProject

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

func (*ProviderRPCServer) CreateWorkspace

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

func (*ProviderRPCServer) DestroyProject

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

func (*ProviderRPCServer) DestroyWorkspace

func (m *ProviderRPCServer) DestroyWorkspace(arg *WorkspaceRequest, resp *util.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 *workspace.ProjectInfo) error

func (*ProviderRPCServer) GetTargetManifest

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

func (*ProviderRPCServer) GetWorkspaceInfo

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

func (*ProviderRPCServer) Initialize

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

func (*ProviderRPCServer) StartProject

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

func (*ProviderRPCServer) StartWorkspace

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

func (*ProviderRPCServer) StopProject

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

func (*ProviderRPCServer) StopWorkspace

func (m *ProviderRPCServer) StopWorkspace(arg *WorkspaceRequest, resp *util.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 Store added in v0.11.0

type Store interface {
}

type TargetStore added in v0.11.0

type TargetStore interface {
	List() ([]*ProviderTarget, error)
	Find(targetName string) (*ProviderTarget, error)
	Save(target *ProviderTarget) error
	Delete(target *ProviderTarget) error
}

type WorkspaceRequest

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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