libs

package
v0.2.82 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidToken       = errors.New("invalid token")
	ErrVerificationFailed = errors.New("token verification failed")
)

Functions

This section is empty.

Types

type HttpClient

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

func (*HttpClient) CreateProject added in v0.0.4

func (h *HttpClient) CreateProject(token string, req *models.ProjectCreateRequest) (*models.Project, error)

CreateProject creates a new project

func (*HttpClient) CreateServer added in v0.2.9

func (h *HttpClient) CreateServer(token string, req *models.ServerCreateRequest) (*models.Server, error)

CreateServer creates a new server

func (*HttpClient) DeleteAddonDeployment added in v0.0.4

func (h *HttpClient) DeleteAddonDeployment(token string, deploymentID string) error

DeleteAddonDeployment deletes an addon deployment

func (*HttpClient) DeleteProject added in v0.0.4

func (h *HttpClient) DeleteProject(token string, projectID string) error

DeleteProject deletes a project

func (*HttpClient) DeleteServer added in v0.2.9

func (h *HttpClient) DeleteServer(token string, serverID string) error

DeleteServer deletes a server

func (*HttpClient) GetAddon added in v0.0.4

func (h *HttpClient) GetAddon(token string, addonID string) (*models.Addon, error)

GetAddon retrieves a specific addon by ID

func (*HttpClient) GetAddonDeployments added in v0.0.4

func (h *HttpClient) GetAddonDeployments(token string, projectID string) ([]models.AddonDeployment, error)

GetAddonDeployments retrieves a list of addon deployments

func (*HttpClient) GetAddons added in v0.0.4

func (h *HttpClient) GetAddons(token string) (*models.AddonListResponse, error)

GetAddons retrieves a list of addons

func (*HttpClient) GetContainers added in v0.0.4

func (h *HttpClient) GetContainers(token string, projectID string, addonID string) (*models.ListContainersResponse, error)

GetContainers retrieves available containers for a project or addon

func (*HttpClient) GetLogs added in v0.0.4

func (h *HttpClient) GetLogs(token string, req *models.LogsRequest) (*models.LogsResponse, error)

GetLogs retrieves logs for a project or addon

func (*HttpClient) GetLogsByWorkspace added in v0.2.57

func (h *HttpClient) GetLogsByWorkspace(token string, req *models.LogsRequest, workspaceUUID string) (*models.LogsResponse, error)

GetLogsByWorkspace retrieves logs for a project using workspace-scoped endpoint

func (*HttpClient) GetProject added in v0.0.4

func (h *HttpClient) GetProject(token string, projectID string) (*models.Project, error)

GetProject retrieves a specific project by ID

func (*HttpClient) GetProjectByWorkspace added in v0.2.57

func (h *HttpClient) GetProjectByWorkspace(token string, projectID string, workspaceUUID string) (*models.Project, error)

GetProjectByWorkspace retrieves a specific project by ID with workspace scope

func (*HttpClient) GetProjects added in v0.0.4

func (h *HttpClient) GetProjects(token string) (*models.ProjectsResponse, error)

GetProjects retrieves all projects for the authenticated user

func (*HttpClient) GetProjectsByWorkspace added in v0.2.57

func (h *HttpClient) GetProjectsByWorkspace(token string, workspaceUUID string) (*models.ProjectsResponse, error)

GetProjectsByWorkspace retrieves projects for a specific workspace

func (*HttpClient) GetServer added in v0.2.9

func (h *HttpClient) GetServer(token string, serverID string) (*models.Server, error)

GetServer retrieves a specific server by ID

func (*HttpClient) GetServers added in v0.2.9

func (h *HttpClient) GetServers(token string) (*models.ServersResponse, error)

GetServers retrieves all servers for the authenticated user

func (*HttpClient) GetServices added in v0.0.4

func (h *HttpClient) GetServices(token string, projectID string, addonID string) (*models.ListServicesResponse, error)

GetServices retrieves available services for a project or addon

func (*HttpClient) StartExec added in v0.0.4

func (h *HttpClient) StartExec(token string, req *models.ExecRequest) (*models.ExecResponse, error)

StartExec starts an exec session for a project or addon container

func (*HttpClient) StartProxy added in v0.0.4

func (h *HttpClient) StartProxy(token string, req *models.ProxyRequest) (*models.ProxyResponse, error)

StartProxy starts a proxy session for a project or addon service

func (*HttpClient) StartShell added in v0.0.4

func (h *HttpClient) StartShell(token string, req *models.ShellRequest) (*models.ShellResponse, error)

StartShell starts a shell session for a project or addon container

func (*HttpClient) StreamLogs added in v0.0.4

func (h *HttpClient) StreamLogs(token string, req *models.LogsRequest, callback func(*models.StreamLogEntry) error) error

StreamLogs streams logs in real-time for a project or addon

func (*HttpClient) UpdateProject added in v0.0.4

func (h *HttpClient) UpdateProject(token string, projectID string, req *models.ProjectUpdateRequest) (*models.Project, error)

UpdateProject updates an existing project

func (*HttpClient) UpdateServer added in v0.2.9

func (h *HttpClient) UpdateServer(token string, serverID string, req *models.ServerUpdateRequest) (*models.Server, error)

UpdateServer updates an existing server

func (*HttpClient) VerifyToken

func (v *HttpClient) VerifyToken(token string, operatorID string) (*models.PipeOpsTokenVerificationResponse, error)

VerifyToken performs a POST request to verify a token.

type HttpClients

type HttpClients interface {
	VerifyToken(token string, operatorID string) (*models.PipeOpsTokenVerificationResponse, error)
	GetProjects(token string) (*models.ProjectsResponse, error)
	GetProjectsByWorkspace(token string, workspaceUUID string) (*models.ProjectsResponse, error)
	GetProject(token string, projectID string) (*models.Project, error)
	GetProjectByWorkspace(token string, projectID string, workspaceUUID string) (*models.Project, error)
	CreateProject(token string, req *models.ProjectCreateRequest) (*models.Project, error)
	UpdateProject(token string, projectID string, req *models.ProjectUpdateRequest) (*models.Project, error)
	DeleteProject(token string, projectID string) error
	GetLogs(token string, req *models.LogsRequest) (*models.LogsResponse, error)
	GetLogsByWorkspace(token string, req *models.LogsRequest, workspaceUUID string) (*models.LogsResponse, error)
	StreamLogs(token string, req *models.LogsRequest, callback func(*models.StreamLogEntry) error) error
	GetServices(token string, projectID string, addonID string) (*models.ListServicesResponse, error)
	StartProxy(token string, req *models.ProxyRequest) (*models.ProxyResponse, error)
	GetContainers(token string, projectID string, addonID string) (*models.ListContainersResponse, error)
	StartExec(token string, req *models.ExecRequest) (*models.ExecResponse, error)
	StartShell(token string, req *models.ShellRequest) (*models.ShellResponse, error)

	// Addon Management
	GetAddons(token string) (*models.AddonListResponse, error)
	GetAddon(token string, addonID string) (*models.Addon, error)
	GetAddonDeployments(token string, projectID string) ([]models.AddonDeployment, error)
	DeleteAddonDeployment(token string, deploymentID string) error

	// Server Management
	GetServers(token string) (*models.ServersResponse, error)
	GetServer(token string, serverID string) (*models.Server, error)
	CreateServer(token string, req *models.ServerCreateRequest) (*models.Server, error)
	UpdateServer(token string, serverID string, req *models.ServerUpdateRequest) (*models.Server, error)
	DeleteServer(token string, serverID string) error
}

func NewHttpClient

func NewHttpClient() HttpClients

func NewHttpClientWithURL added in v0.2.9

func NewHttpClientWithURL(baseURL string) HttpClients

Jump to

Keyboard shortcuts

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