profile_manager

package
v0.33.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: GPL-3.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(parentCtx context.Context, profile *ProfileManager) context.Context

Types

type Profile

type Profile struct {
	Name string `json:"name"`
	// contains filtered or unexported fields
}

func (*Profile) Delete

func (p *Profile) Delete(name string) error

func (*Profile) Dir

func (p *Profile) Dir() string

func (*Profile) Read

func (p *Profile) Read(name string) ([]byte, error)

func (*Profile) Write

func (p *Profile) Write(name string, data []byte) error

type ProfileManager

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

func FromContext

func FromContext(ctx context.Context) *ProfileManager

func New

func New() *ProfileManager

func NewInMemoryProfileManager

func NewInMemoryProfileManager() (*ProfileManager, afero.Fs)

func (*ProfileManager) Copy

func (m *ProfileManager) Copy(src, dst *Profile) error

func (*ProfileManager) Create

func (m *ProfileManager) Create(name string) (p *Profile, err error)

func (*ProfileManager) Current

func (m *ProfileManager) Current() *Profile

func (*ProfileManager) Delete

func (m *ProfileManager) Delete(p *Profile) error

func (*ProfileManager) Get

func (m *ProfileManager) Get(name string) (p *Profile, err error)

func (*ProfileManager) List

func (m *ProfileManager) List() (profiles []*Profile)

func (*ProfileManager) SetCurrent

func (m *ProfileManager) SetCurrent(p *Profile) error

Jump to

Keyboard shortcuts

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