cli

package
v0.0.0-...-308b42f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

func GetAPIKey

func GetAPIKey() string

func GetMasterURL

func GetMasterURL() string

func GetToken

func GetToken() string

func IsVerbose

func IsVerbose() bool

Types

type Client

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

func NewAuthenticatedClient

func NewAuthenticatedClient() *Client

func NewClient

func NewClient(baseURL string) *Client

func (*Client) CreatePod

func (c *Client) CreatePod(name, namespace string, labels map[string]string, containers []types.Container) (
	*types.Pod,
	error,
)

func (*Client) CreateService

func (c *Client) CreateService(
	name, namespace string, selector map[string]string, ports []types.ServicePort, labels map[string]string,
	serviceType, sessionAffinity string,
) (*types.Service, error)

func (*Client) CreateTask

func (c *Client) CreateTask(name, image string, env map[string]string) (*types.Task, error)

func (*Client) CreateTaskWithPorts

func (c *Client) CreateTaskWithPorts(name, image string, env map[string]string, portSpecs []string) (
	*types.Task,
	error,
)

func (*Client) DeletePod

func (c *Client) DeletePod(podID string) error

func (*Client) DeleteService

func (c *Client) DeleteService(serviceID string) error

func (*Client) GetCurrentUser

func (c *Client) GetCurrentUser() (map[string]interface{}, error)

func (*Client) GetEndpoints

func (c *Client) GetEndpoints(serviceID string) (*types.Endpoints, error)

func (*Client) GetNode

func (c *Client) GetNode(nodeID string) (*types.Node, error)

func (*Client) GetPod

func (c *Client) GetPod(podID string) (*types.Pod, error)

func (*Client) GetPodLogs

func (c *Client) GetPodLogs(podID string, containerName string, tail int) (map[string]string, error)

func (*Client) GetService

func (c *Client) GetService(serviceID string) (*types.Service, error)

func (*Client) GetTask

func (c *Client) GetTask(taskID string) (*types.Task, error)

func (*Client) GetTaskLogs

func (c *Client) GetTaskLogs(task *types.Task, tail int) (string, error)

func (*Client) ListNodes

func (c *Client) ListNodes() ([]types.Node, error)

func (*Client) ListPods

func (c *Client) ListPods() ([]types.Pod, error)

func (*Client) ListServices

func (c *Client) ListServices(namespace string) ([]types.Service, error)

func (*Client) ListTasks

func (c *Client) ListTasks() ([]types.Task, error)

func (*Client) Login

func (c *Client) Login(username, password string) (*LoginResponse, error)

func (*Client) Prune

func (c *Client) Prune() (*types.PruneResult, error)

func (*Client) PruneAll

func (c *Client) PruneAll() (*types.PruneResult, error)

func (*Client) SetAPIKey

func (c *Client) SetAPIKey(apiKey string)

func (*Client) SetToken

func (c *Client) SetToken(token string)

type LoginResponse

type LoginResponse struct {
	Token        string `json:"token"`
	RefreshToken string `json:"refreshToken"`
	ExpiresAt    string `json:"expiresAt"`
	User         struct {
		ID       string `json:"id"`
		Username string `json:"username"`
		Role     string `json:"role"`
	} `json:"user"`
}

type PruneResult

type PruneResult = types.PruneResult

Jump to

Keyboard shortcuts

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