Documentation
¶
Index ¶
- func NewContext(parentCtx context.Context, profile *ProfileManager) context.Context
- type Profile
- type ProfileManager
- func (m *ProfileManager) Copy(src, dst *Profile) error
- func (m *ProfileManager) Create(name string) (p *Profile, err error)
- func (m *ProfileManager) Current() *Profile
- func (m *ProfileManager) Delete(p *Profile) error
- func (m *ProfileManager) Get(name string) (p *Profile, err error)
- func (m *ProfileManager) List() (profiles []*Profile)
- func (m *ProfileManager) SetCurrent(p *Profile) error
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 }
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) List ¶
func (m *ProfileManager) List() (profiles []*Profile)
func (*ProfileManager) SetCurrent ¶
func (m *ProfileManager) SetCurrent(p *Profile) error
Click to show internal directories.
Click to hide internal directories.