identity

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildIdentitiesContext

type BuildIdentitiesContext struct {
	Sources                     IdentitySource
	KopiaRepoConfigPath         string
	ProvisionerConfigPath       string
	AllowEmptyProvisionerConfig bool
}

type Config

type Config struct {
	Default ProvisionerIdentityConfig `yaml:"default,omitempty"`
	Users   map[string]UserConfig     `yaml:"users"`
}

type EnvPasswordProvider

type EnvPasswordProvider struct {
	ProviderStage
	Variable string
}

func (EnvPasswordProvider) KopiaArguments

func (p EnvPasswordProvider) KopiaArguments() ([]string, error)

type FilePasswordProvider

type FilePasswordProvider struct {
	ProviderStage
	Context  ProviderPipelineContext
	FilePath string
}

func (FilePasswordProvider) KopiaArguments

func (p FilePasswordProvider) KopiaArguments() ([]string, error)

type Identities

type Identities map[Identity]IdentityInfo

func BuildIdentities

func BuildIdentities(context BuildIdentitiesContext) (Identities, error)

func (Identities) MakeEntries

func (i Identities) MakeEntries() IdentityEntries

type Identity

type Identity struct {
	User string
	Host string
}

func (Identity) Compare

func (e Identity) Compare(other Identity) int

func (Identity) String

func (id Identity) String() string

type IdentityEntries

type IdentityEntries []IdentityEntry

type IdentityEntry

type IdentityEntry struct {
	Identity Identity
	Info     IdentityInfo
}

func (IdentityEntry) Compare

func (e IdentityEntry) Compare(other IdentityEntry) int

type IdentityInfo

type IdentityInfo struct {
	Source      IdentitySource
	Kopia       KopiaIdentityConfig
	Provisioner ProvisionerIdentityConfig
}

func (IdentityInfo) HasKopia

func (info IdentityInfo) HasKopia() bool

func (IdentityInfo) HasProvisioner

func (info IdentityInfo) HasProvisioner() bool

type IdentitySource

type IdentitySource uint8
const (
	SourceKopia IdentitySource = 1 << iota
	SourceKopiaSnapshots
	SourceProvisioner
)
const SourceNone IdentitySource = 0

func (IdentitySource) Validate added in v0.9.0

func (s IdentitySource) Validate() error

type InlinePasswordProvider

type InlinePasswordProvider struct {
	ProviderStage
	Value string
}

func (InlinePasswordProvider) KopiaArguments

func (p InlinePasswordProvider) KopiaArguments() ([]string, error)

type KopiaIdentities

type KopiaIdentities map[Identity]KopiaIdentityConfig

func LoadKopiaIdentities

func LoadKopiaIdentities(kopiaRepoConfigPath string) (KopiaIdentities, error)

func (KopiaIdentities) AssignSnapshots added in v0.9.0

func (ids KopiaIdentities) AssignSnapshots(kopiaRepoConfigPath string) error

func (KopiaIdentities) MakeEntries

func (i KopiaIdentities) MakeEntries() KopiaIdentityEntries

type KopiaIdentityConfig

type KopiaIdentityConfig struct {
	Line      int
	Snapshots []string
}

func (KopiaIdentityConfig) Compare

func (c KopiaIdentityConfig) Compare(other KopiaIdentityConfig) int

type KopiaIdentityEntries

type KopiaIdentityEntries []KopiaIdentityEntry

type KopiaIdentityEntry

type KopiaIdentityEntry struct {
	Identity Identity
	Config   KopiaIdentityConfig
}

func (KopiaIdentityEntry) Compare

func (e KopiaIdentityEntry) Compare(other KopiaIdentityEntry) int

type KopiaPasswordHash

type KopiaPasswordHash struct {
	Hash string
}

func (KopiaPasswordHash) KopiaArguments

func (p KopiaPasswordHash) KopiaArguments() ([]string, error)

type NilPassword

type NilPassword struct {
}

func (NilPassword) KopiaArguments

func (p NilPassword) KopiaArguments() ([]string, error)

type Password

type Password interface {
	KopiaArguments() ([]string, error)
}

type PasswordWrapper

type PasswordWrapper struct {
	Password `yaml:"-"`
	Type     string `yaml:"-"`
	Value    string `yaml:"-"`
}

func (PasswordWrapper) MarshalYAML

func (w PasswordWrapper) MarshalYAML() (any, error)

func (*PasswordWrapper) UnmarshalYAML

func (w *PasswordWrapper) UnmarshalYAML(node ast.Node) error

type PlainPassword

type PlainPassword struct {
	Password string
}

func (PlainPassword) KopiaArguments

func (p PlainPassword) KopiaArguments() ([]string, error)

type ProviderPipelineContext

type ProviderPipelineContext struct {
	BaseDir string
}

type ProviderStage

type ProviderStage struct {
	Context       ProviderPipelineContext
	NextStageType string
	NextStage     Password
}

func (*ProviderStage) EnsureNextStage

func (p *ProviderStage) EnsureNextStage(resolveFn func() (string, error)) (Password, error)

type ProvisionerIdentityConfig

type ProvisionerIdentityConfig struct {
	Line     int             `yaml:"-"`
	Password PasswordWrapper `yaml:"password,omitempty"`
}

func (ProvisionerIdentityConfig) Compare

func (*ProvisionerIdentityConfig) UnmarshalYAML

func (c *ProvisionerIdentityConfig) UnmarshalYAML(node ast.Node) error

type ProvisionerIdentityConfigRaw

type ProvisionerIdentityConfigRaw ProvisionerIdentityConfig

type ProvisionerIdentityHost

type ProvisionerIdentityHost struct {
	Host   string
	Config ProvisionerIdentityConfig
}

func (*ProvisionerIdentityHost) UnmarshalYAML

func (h *ProvisionerIdentityHost) UnmarshalYAML(node ast.Node) error

type ProvisionerIdentityHosts

type ProvisionerIdentityHosts map[string]ProvisionerIdentityConfig

func (*ProvisionerIdentityHosts) UnmarshalYAML

func (h *ProvisionerIdentityHosts) UnmarshalYAML(node ast.Node) error

type UserConfig

type UserConfig struct {
	Default ProvisionerIdentityConfig `yaml:"default,omitempty"`
	Hosts   ProvisionerIdentityHosts  `yaml:"hosts"`
}

Jump to

Keyboard shortcuts

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