provider

package
v0.1.35 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Phase

func Phase(ctx context.Context) string

func Platform

func Platform(ctx context.Context) *platform.Platform

Types

type Call

type Call string
const (
	Install  Call = "install"
	Package  Call = "package"
	Remove   Call = "remove"
	Validate Call = "validate"
)

type DirUnix

type DirUnix struct {
	*slog.Logger
	// contains filtered or unexported fields
}

func (*DirUnix) Realize

func (d *DirUnix) Realize(ctx context.Context) error

type Factory

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

func DefaultFactory

func DefaultFactory(log *slog.Logger) *Factory

func New

func New(log *slog.Logger) *Factory

func (*Factory) Get

func (f *Factory) Get(ac action.Action) Provider

Need to add provider switching for now defaults will work on all OSs we care about

func (*Factory) On

func (f *Factory) On(action actions.Type, phase string, call Call) *Factory

Build phase map

func (*Factory) Register

func (f *Factory) Register(provider actions.Type, newFunc func(action.Action, map[string]Call, *slog.Logger) Provider) *Factory

Register Provider

type FileUnix

type FileUnix struct {
	*slog.Logger
	// contains filtered or unexported fields
}

func (*FileUnix) Realize

func (f *FileUnix) Realize(ctx context.Context) error

type Options

type Options struct {
	OutputPath string
	TargetPath string
	WorkPath   string
	CachePath  string

	Secure   bool
	Restrict bool

	Owner string
	Group string

	Debug   bool
	Verbose bool
}

func Opts

func Opts(ctx context.Context) *Options

type Provider

type Provider interface {
	Realize(ctx context.Context) error
}

func NewDirUnix

func NewDirUnix(dir action.Action, phaseMap map[string]Call, log *slog.Logger) Provider

func NewFileUnix

func NewFileUnix(file action.Action, phaseMap map[string]Call, log *slog.Logger) Provider

func NewSymLinkUnix

func NewSymLinkUnix(symlink action.Action, phaseMap map[string]Call, log *slog.Logger) Provider

type SymLinkUnix

type SymLinkUnix struct {
	*slog.Logger
	// contains filtered or unexported fields
}

func (*SymLinkUnix) Realize

func (s *SymLinkUnix) Realize(ctx context.Context) error

Jump to

Keyboard shortcuts

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