config_immutable

package
v0.0.0-...-791c77c Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CompressionTypeEmpty = CompressionType("")
	CompressionTypeNone  = CompressionType("none")
	CompressionTypeGzip  = CompressionType("gzip")
	CompressionTypeZlib  = CompressionType("zlib")
	CompressionTypeZstd  = CompressionType("zstd")

	CompressionTypeDefault = CompressionTypeZstd
)

Variables

View Source
var CurrentStoreVersion = StoreVersion(values.Int(9))

Functions

This section is empty.

Types

type BlobStoreConfig

type BlobStoreConfig interface {
	interfaces.BlobStoreConfigImmutable
	GetCompressionType() CompressionType
	GetAgeEncryption() *age.Age
	GetLockInternalFiles() bool
}

type BlobStoreTomlV1

type BlobStoreTomlV1 struct {
	AgeEncryption     age.Age         `toml:"age-encryption,omitempty"`
	CompressionType   CompressionType `toml:"compression-type"`
	LockInternalFiles bool            `toml:"lock-internal-files"`
}

func (*BlobStoreTomlV1) GetAgeEncryption

func (k *BlobStoreTomlV1) GetAgeEncryption() *age.Age

func (*BlobStoreTomlV1) GetBlobCompression

func (k *BlobStoreTomlV1) GetBlobCompression() interfaces.BlobCompression

func (*BlobStoreTomlV1) GetBlobEncryption

func (k *BlobStoreTomlV1) GetBlobEncryption() interfaces.BlobEncryption

func (*BlobStoreTomlV1) GetBlobStoreConfigImmutable

func (k *BlobStoreTomlV1) GetBlobStoreConfigImmutable() interfaces.BlobStoreConfigImmutable

func (*BlobStoreTomlV1) GetLockInternalFiles

func (k *BlobStoreTomlV1) GetLockInternalFiles() bool

func (*BlobStoreTomlV1) SetFlagSet

func (k *BlobStoreTomlV1) SetFlagSet(f *flag.FlagSet)

type CompressionType

type CompressionType string

func (*CompressionType) GetBlobCompression

func (ct *CompressionType) GetBlobCompression() interfaces.BlobCompression

func (*CompressionType) Set

func (ct *CompressionType) Set(v string) (err error)

func (*CompressionType) SetFlagSet

func (ct *CompressionType) SetFlagSet(f *flag.FlagSet)

func (CompressionType) String

func (ct CompressionType) String() string

func (CompressionType) WrapReader

func (ct CompressionType) WrapReader(
	r io.Reader,
) (out io.ReadCloser, err error)

func (CompressionType) WrapWriter

func (ct CompressionType) WrapWriter(w io.Writer) (io.WriteCloser, error)

type ConfigPrivate

type ConfigPrivate interface {
	GetImmutableConfig() ConfigPrivate
	GetPrivateKey() repo_signing.PrivateKey
	// contains filtered or unexported methods
}

type ConfigPublic

type ConfigPublic interface {
	// contains filtered or unexported methods
}

type ErrFutureStoreVersion

type ErrFutureStoreVersion struct {
	interfaces.StoreVersion
}

func (ErrFutureStoreVersion) Error

func (e ErrFutureStoreVersion) Error() string

func (ErrFutureStoreVersion) Is

func (e ErrFutureStoreVersion) Is(target error) bool

type ErrUnsupportedCompression

type ErrUnsupportedCompression string

func (ErrUnsupportedCompression) Error

func (ErrUnsupportedCompression) Is

func (e ErrUnsupportedCompression) Is(err error) (ok bool)

type LatestPrivate

type LatestPrivate = TomlV1Private

type StoreVersion

type StoreVersion values.Int

func MakeStoreVersion

func MakeStoreVersion(sv interfaces.StoreVersion) StoreVersion

func (StoreVersion) GetInt

func (a StoreVersion) GetInt() int

func (StoreVersion) Less

func (*StoreVersion) ReadFromFile

func (v *StoreVersion) ReadFromFile(
	p string,
) (err error)

func (*StoreVersion) ReadFromFileOrVersion

func (v *StoreVersion) ReadFromFileOrVersion(
	p string,
	alternative StoreVersion,
) (err error)

func (*StoreVersion) Set

func (v *StoreVersion) Set(p string) (err error)

func (StoreVersion) String

func (a StoreVersion) String() string

type TomlV1Common

type TomlV1Common struct {
	StoreVersion StoreVersion    `toml:"store-version"`
	RepoType     repo_type.Type  `toml:"repo-type"`
	RepoId       ids.RepoId      `toml:"id"`
	BlobStore    BlobStoreTomlV1 `toml:"blob-store"`
}

func (*TomlV1Common) GetBlobStoreConfigImmutable

func (k *TomlV1Common) GetBlobStoreConfigImmutable() interfaces.BlobStoreConfigImmutable

func (TomlV1Common) GetRepoId

func (k TomlV1Common) GetRepoId() ids.RepoId

func (TomlV1Common) GetRepoType

func (k TomlV1Common) GetRepoType() repo_type.Type

func (*TomlV1Common) GetStoreVersion

func (k *TomlV1Common) GetStoreVersion() interfaces.StoreVersion

func (*TomlV1Common) SetFlagSet

func (k *TomlV1Common) SetFlagSet(f *flag.FlagSet)

type TomlV1Private

type TomlV1Private struct {
	repo_signing.TomlPrivateKeyV0
	TomlV1Common
}

func Default

func Default() *TomlV1Private

func (*TomlV1Private) GetImmutableConfig

func (k *TomlV1Private) GetImmutableConfig() ConfigPrivate

func (*TomlV1Private) GetImmutableConfigPublic

func (k *TomlV1Private) GetImmutableConfigPublic() ConfigPublic

func (*TomlV1Private) GetPrivateKey

func (k *TomlV1Private) GetPrivateKey() repo_signing.PrivateKey

func (*TomlV1Private) GetPublicKey

func (k *TomlV1Private) GetPublicKey() repo_signing.PublicKey

type TomlV1Public

type TomlV1Public struct {
	repo_signing.TomlPublicKeyV0
	TomlV1Common
}

func (*TomlV1Public) GetImmutableConfigPublic

func (k *TomlV1Public) GetImmutableConfigPublic() ConfigPublic

func (TomlV1Public) GetPublicKey

func (k TomlV1Public) GetPublicKey() repo_signing.PublicKey

type V0Private

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

func (*V0Private) GetAgeEncryption

func (k *V0Private) GetAgeEncryption() *age.Age

func (*V0Private) GetBlobCompression

func (k *V0Private) GetBlobCompression() interfaces.BlobCompression

func (*V0Private) GetBlobEncryption

func (k *V0Private) GetBlobEncryption() interfaces.BlobEncryption

func (*V0Private) GetBlobStoreConfigImmutable

func (k *V0Private) GetBlobStoreConfigImmutable() interfaces.BlobStoreConfigImmutable

func (*V0Private) GetImmutableConfig

func (k *V0Private) GetImmutableConfig() ConfigPrivate

func (*V0Private) GetImmutableConfigPublic

func (k *V0Private) GetImmutableConfigPublic() ConfigPublic

func (V0Private) GetLockInternalFiles

func (k V0Private) GetLockInternalFiles() bool

func (V0Private) GetPrivateKey

func (k V0Private) GetPrivateKey() repo_signing.PrivateKey

func (V0Private) GetPublicKey

func (k V0Private) GetPublicKey() repo_signing.PublicKey

func (V0Private) GetRepoId

func (k V0Private) GetRepoId() ids.RepoId

func (V0Private) GetRepoType

func (k V0Private) GetRepoType() repo_type.Type

func (V0Private) GetStoreVersion

func (k V0Private) GetStoreVersion() interfaces.StoreVersion

type V0Public

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

func (*V0Public) GetAgeEncryption

func (k *V0Public) GetAgeEncryption() *age.Age

func (*V0Public) GetBlobCompression

func (k *V0Public) GetBlobCompression() interfaces.BlobCompression

func (*V0Public) GetBlobEncryption

func (k *V0Public) GetBlobEncryption() interfaces.BlobEncryption

func (*V0Public) GetBlobStoreConfigImmutable

func (k *V0Public) GetBlobStoreConfigImmutable() interfaces.BlobStoreConfigImmutable

func (*V0Public) GetImmutableConfigPublic

func (k *V0Public) GetImmutableConfigPublic() ConfigPublic

func (V0Public) GetLockInternalFiles

func (k V0Public) GetLockInternalFiles() bool

func (V0Public) GetPrivateKey

func (k V0Public) GetPrivateKey() repo_signing.PrivateKey

func (V0Public) GetPublicKey

func (k V0Public) GetPublicKey() repo_signing.PublicKey

func (V0Public) GetRepoId

func (k V0Public) GetRepoId() ids.RepoId

func (V0Public) GetRepoType

func (k V0Public) GetRepoType() repo_type.Type

func (V0Public) GetStoreVersion

func (k V0Public) GetStoreVersion() interfaces.StoreVersion

func (*V0Public) SetFlagSet

func (k *V0Public) SetFlagSet(f *flag.FlagSet)

Jump to

Keyboard shortcuts

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