marketplace

package
v0.1.0-preview Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package marketplace is the resource module for the vxcloud marketplace.

Three sub-resources, all backed by /api/v2/marketplace/* on the tenant node:

  • Agents: pre-built AI agents (web scraper, URL status probe, research agent, prompt agent, …). Listed, inspected, and deployed onto a customer-owned VM.
  • Models: pre-built RAG models (ChromaDB / FAISS retrievers).
  • Solutions: bundled Terraform plays (RDS, EKS, DynamoDB, GCP VM, …) priced per provision.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentDeployOpts

type AgentDeployOpts struct {
	Host         string // SSH target (required)
	SSHUser      string // SSH login user (required)
	KeyPairName  string // workspace vault key entry (required)
	AgentName    string // display name (defaults to agent_id)
	HTTPPort     string // host nginx port (default "80")
	AppPort      string // container port (defaults to agent default)
	SystemPrompt string // baked into .env for prompt-driven agents
	EnvVars      string // newline-separated KEY=VALUE pairs
	Version      string // default "1.0.0"
}

AgentDeployOpts describes a marketplace agent deploy.

type Agents

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

Agents wraps /api/v2/marketplace/agents.

func (*Agents) Deploy

func (a *Agents) Deploy(ctx context.Context, agentID string, opts AgentDeployOpts) (*DeployResult, error)

Deploy installs an agent onto a customer-owned VM.

Endpoint: POST /api/v2/marketplace/agents/deploy.

func (*Agents) List

func (a *Agents) List(ctx context.Context) ([]Item, error)

List returns every available agent.

func (*Agents) Show

func (a *Agents) Show(ctx context.Context, agentID string) (*Item, error)

Show returns metadata for one agent. The single-item endpoint returns the bare object without an envelope key.

type Client

type Client struct {
	T              *transport.Transport
	NodeURL        string
	AuthedUsername string
}

Client is the marketplace facade.

func (*Client) Agents

func (c *Client) Agents() *Agents

Agents returns the agents sub-client.

func (*Client) Models

func (c *Client) Models() *Models

Models returns the models sub-client.

func (*Client) Solutions

func (c *Client) Solutions() *Solutions

Solutions returns the solutions sub-client.

type DeployResult

type DeployResult struct {
	SessionID string `json:"session_id"`
	Status    string `json:"status,omitempty"`
	Hostname  string `json:"hostname,omitempty"`
	AccessURL string `json:"access_url,omitempty"`
}

DeployResult is what /agents/deploy and /models/deploy return.

type Item

type Item struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Category    string `json:"category"`
	Available   bool   `json:"available"`
	Description string `json:"description,omitempty"`
}

Item is the common shape returned by Agents.List() and Models.List().

type Models

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

Models wraps /api/v2/marketplace/models.

func (*Models) Deploy

func (m *Models) Deploy(ctx context.Context, modelID string, opts AgentDeployOpts) (*DeployResult, error)

Deploy installs a model onto a customer-owned VM.

Endpoint: POST /api/v2/marketplace/models/deploy. Same opts shape as agent deploys.

func (*Models) List

func (m *Models) List(ctx context.Context) ([]Item, error)

List returns every available model.

func (*Models) Show

func (m *Models) Show(ctx context.Context, modelID string) (*Item, error)

Show returns metadata for one model.

type ProvisionOpts

type ProvisionOpts struct {
	TemplateID    string // marketplace solution ID (required)
	ResourceName  string // user-chosen resource prefix (required)
	CloudProvider string // aws | gcp | azure | linode | …
	Region        string
	Environment   string                 // "development" | "staging" | "production"
	Variables     map[string]interface{} // Terraform input variables
}

ProvisionOpts describes a Terraform-solution provision.

type ProvisionResult

type ProvisionResult struct {
	SessionID        string                 `json:"session_id"`
	Status           string                 `json:"status,omitempty"`
	ExecutionTime    string                 `json:"execution_time,omitempty"`
	StatePath        string                 `json:"state_path,omitempty"`
	TerraformOutputs map[string]interface{} `json:"terraform_outputs,omitempty"`
	CreatedAt        time.Time              `json:"created_at,omitempty"`
}

ProvisionResult is what /provision returns for terraform solutions.

type Solution

type Solution struct {
	ID            string             `json:"id"`
	Name          string             `json:"name"`
	CloudProvider string             `json:"cloud_provider"`
	Category      string             `json:"category"`
	Available     bool               `json:"available"`
	Description   string             `json:"description,omitempty"`
	Price         string             `json:"price,omitempty"`
	Variables     []SolutionVariable `json:"variables,omitempty"`
}

Solution is a Terraform marketplace solution.

type SolutionVariable

type SolutionVariable struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Required    bool   `json:"required"`
	Default     string `json:"default,omitempty"`
	Description string `json:"description,omitempty"`
}

SolutionVariable describes one Terraform variable on a Solution.

type Solutions

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

Solutions wraps /api/v2/marketplace/templates and /api/v2/marketplace/provision.

func (*Solutions) List

func (s *Solutions) List(ctx context.Context) ([]Solution, error)

List returns every available solution.

func (*Solutions) Provision

func (s *Solutions) Provision(ctx context.Context, opts ProvisionOpts) (*ProvisionResult, error)

Provision runs a marketplace solution end-to-end (terraform init+plan+apply).

Endpoint: POST /api/v2/marketplace/provision.

func (*Solutions) Show

func (s *Solutions) Show(ctx context.Context, solutionID string) (*Solution, error)

Show returns metadata for one solution, including its variables.

Jump to

Keyboard shortcuts

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