apt

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRepositoryRepositoriesRequest

type AddRepositoryRepositoriesRequest struct {
	Handle string `url:"handle",json:"handle"` // Handle that identifies a repository.
	Node   string `url:"node",json:"node"`     // The cluster node name.

	// The following parameters are optional
	Digest *string `url:"digest,omitempty",json:"digest,omitempty"` // Digest to detect modifications.
}

type AddRepositoryRepositoriesResponse

type AddRepositoryRepositoriesResponse map[string]interface{}

type ChangeRepositoryRepositoriesRequest

type ChangeRepositoryRepositoriesRequest struct {
	Index int    `url:"index",json:"index"` // Index within the file (starting from 0).
	Node  string `url:"node",json:"node"`   // The cluster node name.
	Path  string `url:"path",json:"path"`   // Path to the containing file.

	// The following parameters are optional
	Digest  *string `url:"digest,omitempty",json:"digest,omitempty"`   // Digest to detect modifications.
	Enabled *bool   `url:"enabled,omitempty",json:"enabled,omitempty"` // Whether the repository should be enabled or not.
}

type ChangeRepositoryRepositoriesResponse

type ChangeRepositoryRepositoriesResponse map[string]interface{}

type ChangelogRequest

type ChangelogRequest struct {
	Name string `url:"name",json:"name"` // Package name.
	Node string `url:"node",json:"node"` // The cluster node name.

	// The following parameters are optional
	Version *string `url:"version,omitempty",json:"version,omitempty"` // Package version.
}

type ChangelogResponse

type ChangelogResponse string

type Client

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

func New

func New(c HTTPClient) *Client

func (*Client) AddRepositoryRepositories

AddRepositoryRepositories Add a standard repository to the configuration

func (*Client) ChangeRepositoryRepositories

ChangeRepositoryRepositories Change the properties of a repository. Currently only allows enabling/disabling.

func (*Client) Changelog

func (c *Client) Changelog(ctx context.Context, req *ChangelogRequest) (*ChangelogResponse, error)

Changelog Get package changelogs.

func (*Client) Index

func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)

Index Directory index for apt (Advanced Package Tool).

func (*Client) ListUpdatesUpdate

func (c *Client) ListUpdatesUpdate(ctx context.Context, req *ListUpdatesUpdateRequest) (*ListUpdatesUpdateResponse, error)

ListUpdatesUpdate List available updates.

func (*Client) Repositories

func (c *Client) Repositories(ctx context.Context, req *RepositoriesRequest) (*RepositoriesResponse, error)

Repositories Get APT repository information.

func (*Client) UpdateDatabaseUpdate

UpdateDatabaseUpdate This is used to resynchronize the package index files from their sources (apt-get update).

func (*Client) Versions

func (c *Client) Versions(ctx context.Context, req *VersionsRequest) (*VersionsResponse, error)

Versions Get package information for important Proxmox packages.

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexRequest

type IndexRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

}

type IndexResponse

type IndexResponse []*struct {
	Id string `url:"id",json:"id"`
}

type ListUpdatesUpdateRequest

type ListUpdatesUpdateRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

}

type ListUpdatesUpdateResponse

type ListUpdatesUpdateResponse []*map[string]interface{}

type RepositoriesRequest

type RepositoriesRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

}

type RepositoriesResponse

type RepositoriesResponse struct {
	Digest string `url:"digest",json:"digest"` // Common digest of all files.
	Errors []*struct {
		Error string `url:"error",json:"error"` // The error message
		Path  string `url:"path",json:"path"`   // Path to the problematic file.

	} `url:"errors",json:"errors"` // List of problematic repository files.
	Files []*struct {
		Digest       []int  `url:"digest",json:"digest"`       // Digest of the file as bytes.
		FileType     string `url:"file-type",json:"file-type"` // Format of the file.
		Path         string `url:"path",json:"path"`           // Path to the problematic file.
		Repositories []*struct {
			Enabled  bool     `url:"Enabled",json:"Enabled"`   // Whether the repository is enabled or not
			Filetype string   `url:"FileType",json:"FileType"` // Format of the defining file.
			Suites   []string `url:"Suites",json:"Suites"`     // List of package distribuitions
			Types    []string `url:"Types",json:"Types"`       // List of package types.
			Uris     []string `url:"URIs",json:"URIs"`         // List of repository URIs.

			// The following parameters are optional
			Comment    *string  `url:"Comment,omitempty",json:"Comment,omitempty"`       // Associated comment
			Components []string `url:"Components,omitempty",json:"Components,omitempty"` // List of repository components
			Options    []*struct {
				Key    string   `url:"Key",json:"Key"`
				Values []string `url:"Values",json:"Values"`
			} `url:"Options,omitempty",json:"Options,omitempty"` // Additional options
		} `url:"repositories",json:"repositories"` // The parsed repositories.

	} `url:"files",json:"files"` // List of parsed repository files.
	Infos []*struct {
		Index   string `url:"index",json:"index"`     // Index of the associated repository within the file.
		Kind    string `url:"kind",json:"kind"`       // Kind of the information (e.g. warning).
		Message string `url:"message",json:"message"` // Information message.
		Path    string `url:"path",json:"path"`       // Path to the associated file.

		// The following parameters are optional
		Property *string `url:"property,omitempty",json:"property,omitempty"` // Property from which the info originates.
	} `url:"infos",json:"infos"` // Additional information/warnings for APT repositories.
	StandardRepos []*struct {
		Handle string `url:"handle",json:"handle"` // Handle to identify the repository.
		Name   string `url:"name",json:"name"`     // Full name of the repository.

		// The following parameters are optional
		Status *bool `url:"status,omitempty",json:"status,omitempty"` // Indicating enabled/disabled status, if the repository is configured.
	} `url:"standard-repos",json:"standard-repos"` // List of standard repositories and their configuration status

}

type UpdateDatabaseUpdateRequest

type UpdateDatabaseUpdateRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

	// The following parameters are optional
	Notify *bool `url:"notify,omitempty",json:"notify,omitempty"` // Send notification mail about new packages (to email address specified for user 'root@pam').
	Quiet  *bool `url:"quiet,omitempty",json:"quiet,omitempty"`   // Only produces output suitable for logging, omitting progress indicators.
}

type UpdateDatabaseUpdateResponse

type UpdateDatabaseUpdateResponse string

type VersionsRequest

type VersionsRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

}

type VersionsResponse

type VersionsResponse []*map[string]interface{}

Jump to

Keyboard shortcuts

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