Documentation
¶
Index ¶
- Constants
- type Client
- type GitHubContent
- type LocalRecipe
- type Manager
- func (m *Manager) GetRecipe(recipeName string) (*LocalRecipe, error)
- func (m *Manager) GetRecipeContent(recipeName string) ([]byte, error)
- func (m *Manager) Initialize() error
- func (m *Manager) ListLocalRecipes() ([]LocalRecipe, error)
- func (m *Manager) PullRecipe(ctx context.Context, recipeName string, force bool, outputPath string) error
- func (m *Manager) RemoveRecipe(recipeName string) error
- func (m *Manager) SearchRecipes(ctx context.Context, filter SearchFilter) ([]Recipe, error)
- type Recipe
- type RecipeIndex
- type SearchFilter
Constants ¶
const ( DefaultRepoURL = "https://api.github.com/repos/f1bonacc1/process-compose-recipes" DefaultTimeout = 30 * time.Second RecipeMetadataFile = "recipe.yaml" ProcessComposeFile = "process-compose.yaml" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles communication with the recipe repository
func (*Client) DownloadRecipe ¶
DownloadRecipe downloads a complete recipe (metadata + process-compose.yaml)
func (*Client) GetRecipeIndex ¶
func (c *Client) GetRecipeIndex(ctx context.Context) (*RecipeIndex, error)
GetRecipeIndex fetches and parses the recipe index
type GitHubContent ¶
type GitHubContent struct {
Name string `json:"name"`
Path string `json:"path"`
Type string `json:"type"`
DownloadURL string `json:"download_url"`
Content string `json:"content"`
Encoding string `json:"encoding"`
}
GitHubContent represents a GitHub API content response
type LocalRecipe ¶
LocalRecipe represents a recipe stored locally
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles local recipe operations
func NewManager ¶
NewManager creates a new recipe manager
func (*Manager) GetRecipe ¶
func (m *Manager) GetRecipe(recipeName string) (*LocalRecipe, error)
GetRecipe returns a specific local recipe
func (*Manager) GetRecipeContent ¶
GetRecipeContent returns the content of a local recipe's process-compose.yaml file
func (*Manager) Initialize ¶
Initialize sets up the recipes directory and loads the local index
func (*Manager) ListLocalRecipes ¶
func (m *Manager) ListLocalRecipes() ([]LocalRecipe, error)
ListLocalRecipes returns all locally installed recipes
func (*Manager) PullRecipe ¶
func (m *Manager) PullRecipe(ctx context.Context, recipeName string, force bool, outputPath string) error
PullRecipe downloads and installs a recipe locally
func (*Manager) RemoveRecipe ¶
RemoveRecipe removes a local recipe
func (*Manager) SearchRecipes ¶
SearchRecipes searches for recipes based on filter criteria
type Recipe ¶
type Recipe struct {
Name string `json:"name" yaml:"name"`
Description string `json:"description" yaml:"description"`
Version string `json:"version" yaml:"version"`
Author string `json:"author" yaml:"author"`
Tags []string `json:"tags" yaml:"tags"`
LastUpdated time.Time `json:"last_updated" yaml:"last_updated"`
MinVersion string `json:"min_version" yaml:"min_version"` // Minimum process-compose version required
Variables map[string]string `json:"variables,omitempty" yaml:"variables,omitempty"` // Default variable values
Repository string `json:"repository" yaml:"repository"`
}
Recipe represents a process-compose recipe