profile

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(dir, name string) error

Delete removes a profile

func Exists

func Exists(dir, name string) bool

Exists checks if a profile with the given name exists

Types

type Profile

type Profile struct {
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	Servers     []string `json:"servers,omitempty"`  // Server names to include
	Commands    []string `json:"commands,omitempty"` // Command names to include
	Rules       []string `json:"rules,omitempty"`    // Rule names to include
	Prompts     []string `json:"prompts,omitempty"`  // Prompt names to include
	Skills      []string `json:"skills,omitempty"`   // Skill names to include
	Disabled    []string `json:"disabled,omitempty"` // Resources to disable
	Path        string   `json:"-"`                  // Path to profile file (not serialized)
}

Profile represents a configuration profile

func Create

func Create(dir, name string, description string) (*Profile, error)

Create creates a new empty profile

func Load

func Load(path string) (*Profile, error)

Load loads a profile from a JSON file

func LoadAll

func LoadAll(dir string) ([]*Profile, error)

LoadAll loads all profiles from a directory

func (*Profile) Save

func (p *Profile) Save() error

Save saves the profile to disk

func (*Profile) SaveTo

func (p *Profile) SaveTo(path string) error

SaveTo saves the profile to a specific path

Jump to

Keyboard shortcuts

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