repositories

package
v0.66.3 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StandardRepoFilePathCeph is the default Proxmox VE pre-defined (absolute) file path for the APT source list of Ceph
	// repositories.
	StandardRepoFilePathCeph = "/etc/apt/sources.list.d/ceph.list"

	// StandardRepoFilePathEnterprise is the default Proxmox VE pre-defined (absolute) file path for the APT source list
	// of enterprise repositories.
	StandardRepoFilePathEnterprise = "/etc/apt/sources.list.d/pve-enterprise.list"

	// StandardRepoFilePathMain is the default Proxmox VE pre-defined (absolute) file path for the APT source list of main
	// OS (Debian) repositories.
	StandardRepoFilePathMain = "/etc/apt/sources.list"
)

Note that "hard-coded" slashes are used since Proxmox VE is built on top of Linux (Debian).

View Source
const (
	// CephStandardRepoHandlePrefix is the prefix for Ceph APT standard repositories.
	CephStandardRepoHandlePrefix = "ceph"
)

Variables

View Source
var (
	// CephVersionNameQuincy is the name for the "Quincy" Ceph major version.
	CephVersionNameQuincy = CephVersionName{"quincy"}

	// CephVersionNameReef is the name for the "Reef" Ceph major version.
	CephVersionNameReef = CephVersionName{"reef"}

	// CephVersionNameUnknown is the name for an unknown Ceph major version.
	CephVersionNameUnknown = CephVersionName{"unknown"}
)

Do not modify any of these package-global variables as they act as safer variants compared to "iota" based constants!

View Source
var (
	// ErrCephVersionNameIllegal indicates an error for an illegal Ceph major version name.
	ErrCephVersionNameIllegal = func(name string) error {
		return function.NewFuncError(fmt.Sprintf("illegal Ceph major version name %q", name))
	}

	// ErrCephVersionNameMarshal indicates an error while marshalling a Ceph major version name.
	ErrCephVersionNameMarshal = function.NewFuncError("cannot marshal Ceph major version name")

	// ErrCephVersionNameUnmarshal indicates an error while unmarshalling a Ceph major version name.
	ErrCephVersionNameUnmarshal = function.NewFuncError("cannot unmarshal Ceph major version name")

	// ErrStandardRepoHandleKindIllegal indicates an error for an illegal APT standard repository handle.
	ErrStandardRepoHandleKindIllegal = func(handle string) error {
		return function.NewFuncError(fmt.Sprintf("illegal APT standard repository handle kind %q", handle))
	}

	// ErrStandardRepoHandleKindMarshal indicates an error while marshalling an APT standard repository handle kind.
	ErrStandardRepoHandleKindMarshal = function.NewFuncError("cannot marshal APT standard repository handle kind")

	// ErrStandardRepoHandleKindUnmarshal indicates an error while unmarshalling an APT standard repository handle kind.
	ErrStandardRepoHandleKindUnmarshal = function.NewFuncError("cannot unmarshal APT standard repository handle kind")
)
View Source
var (
	// StandardRepoHandleKindEnterprise is the name for the "Enterprise" APT standard repository handle kind.
	StandardRepoHandleKindEnterprise = StandardRepoHandleKind{"enterprise"}

	// StandardRepoHandleKindNoSubscription is the name for the "No Subscription" APT standard repository handle kind.
	StandardRepoHandleKindNoSubscription = StandardRepoHandleKind{"no-subscription"}

	// StandardRepoHandleKindTest is the name for the "Test" APT standard repository handle kind.
	StandardRepoHandleKindTest = StandardRepoHandleKind{"test"}

	// StandardRepoHandleKindUnknown is the name for an unknown APT standard repository handle kind.
	StandardRepoHandleKindUnknown = StandardRepoHandleKind{"unknown"}
)

Do not modify any of these package-global variables as they act as safer variants compared to "iota" based constants!

Functions

This section is empty.

Types

type CephVersionName

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

CephVersionName is the name a Ceph major version.

func ParseCephVersionName

func ParseCephVersionName(input string) (CephVersionName, error)

ParseCephVersionName converts the string representation of a Ceph major version name into the corresponding value. An error is returned if the input string does not match any known type.

func (CephVersionName) EncodeValues

func (n CephVersionName) EncodeValues(key string, v *url.Values) error

EncodeValues encodes Ceph major version name field into a URL-encoded set of values.

func (CephVersionName) MarshalJSON

func (n CephVersionName) MarshalJSON() ([]byte, error)

MarshalJSON marshals a Ceph major version name into JSON value.

func (CephVersionName) String

func (n CephVersionName) String() string

String converts a CephVersionName value into a string.

func (CephVersionName) ToValue

func (n CephVersionName) ToValue() types.String

ToValue converts a Ceph major version name into a Terraform value.

func (*CephVersionName) UnmarshalJSON

func (n *CephVersionName) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a Ceph major version name.

type StandardRepoHandleKind

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

StandardRepoHandleKind is the kind of APT standard repository handle.

func ParseStandardRepoHandleKind

func ParseStandardRepoHandleKind(input string) (StandardRepoHandleKind, error)

ParseStandardRepoHandleKind converts the string representation of an APT standard repository handle kind into the corresponding type. StandardRepoHandleKindUnknown and an error is returned if the input string does not match any known handle kind.

func (*StandardRepoHandleKind) EncodeValues

func (h *StandardRepoHandleKind) EncodeValues(key string, v *url.Values) error

EncodeValues encodes the APT standard repository handle kind field into a URL-encoded set of values.

func (*StandardRepoHandleKind) MarshalJSON

func (h *StandardRepoHandleKind) MarshalJSON() ([]byte, error)

MarshalJSON marshals an APT standard repository handle kind into JSON value.

func (StandardRepoHandleKind) String

func (h StandardRepoHandleKind) String() string

String converts a StandardRepoHandleKind value into a string.

func (*StandardRepoHandleKind) ToValue

func (h *StandardRepoHandleKind) ToValue() types.String

ToValue converts an APT standard repository handle kind into a Terraform value.

func (*StandardRepoHandleKind) UnmarshalJSON

func (h *StandardRepoHandleKind) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals an APT standard repository handle kind.

Jump to

Keyboard shortcuts

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