repositories

package
v0.62.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: MPL-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRequestBody

type AddRequestBody struct {

	// Handle is the pre-defined handle of the APT standard repository.
	Handle string `json:"handle" url:"handle"`

	// Node is the name of the target Proxmox VE node.
	Node string `json:"node" url:"node"`
	// contains filtered or unexported fields
}

AddRequestBody contains the body for an APT repository PUT request to add a standard repository.

type Client

type Client struct {
	api.Client
}

Client is an interface for accessing the Proxmox node APT repositories API.

func (*Client) Add

func (c *Client) Add(ctx context.Context, data *AddRequestBody) error

Add adds an APT standard repository entry.

func (*Client) ExpandPath

func (c *Client) ExpandPath() string

ExpandPath expands a relative path to a full APT repositories API path.

func (*Client) Get

func (c *Client) Get(ctx context.Context) (*GetResponseData, error)

Get retrieves all APT repositories.

func (*Client) Modify

func (c *Client) Modify(ctx context.Context, data *ModifyRequestBody) error

Modify modifies the activation status of an APT repository.

type GetResponseBody

type GetResponseBody struct {
	Data *GetResponseData `json:"data,omitempty"`
}

GetResponseBody is the body from an APT repository GET response.

type GetResponseData

type GetResponseData struct {

	// Files contains the APT repository files.
	Files []*file `json:"files,omitempty"`

	// StandardRepos contains the APT standard repositories.
	StandardRepos []*standardRepo `json:"standard-repos,omitempty"`
	// contains filtered or unexported fields
}

GetResponseData contains the data from an APT repository GET response.

type ModifyRequestBody

type ModifyRequestBody struct {

	// Enabled indicates the activation status of the APT repository.
	// Must either be 0 (disabled) or 1 (enabled).
	Enabled types.CustomBool `json:"enabled" url:"enabled,int"`

	// Index is the index of the APT repository within the defining repository source file.
	Index int64 `json:"handle" url:"index"`

	// Path is the absolute path of the defining source file for the APT repository.
	Path string `json:"path" url:"path"`
	// contains filtered or unexported fields
}

ModifyRequestBody contains the body for an APT repository POST request to modify a repository.

Jump to

Keyboard shortcuts

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