project

package
v1.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Project

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

Project represents a project entity (aggregate root)

func NewProject

func NewProject(
	id string,
	name shared.ProjectName,
	language shared.Language,
	projectType shared.ProjectType,
	architecture shared.Architecture,
	outputPath string,
) (*Project, error)

NewProject creates a new project entity

func NewProjectFromDescription

func NewProjectFromDescription(
	id string,
	name shared.ProjectName,
	description string,
	outputPath string,
) (*Project, error)

NewProjectFromDescription creates a new project entity from a description. Language, type, and architecture are optional (the LLM will infer them).

func (*Project) AddCapability

func (p *Project) AddCapability(capability string) error

AddCapability adds a capability to the project

func (*Project) Architecture

func (p *Project) Architecture() shared.Architecture

func (*Project) Capabilities

func (p *Project) Capabilities() []string

func (*Project) CreatedAt

func (p *Project) CreatedAt() time.Time

func (*Project) Description

func (p *Project) Description() string

func (*Project) FullPath

func (p *Project) FullPath() string

FullPath returns the complete output path for the project

func (*Project) GenerationStatus

func (p *Project) GenerationStatus() string

func (*Project) GetMetadata

func (p *Project) GetMetadata(key string) (string, bool)

GetMetadata retrieves a metadata value by key

func (*Project) ID

func (p *Project) ID() string

Getters

func (*Project) Language

func (p *Project) Language() shared.Language

func (*Project) Metadata

func (p *Project) Metadata() map[string]string

func (*Project) ModelUsed

func (p *Project) ModelUsed() string

func (*Project) Name

func (p *Project) Name() shared.ProjectName

func (*Project) OutputPath

func (p *Project) OutputPath() string

func (*Project) ProjectType

func (p *Project) ProjectType() shared.ProjectType

func (*Project) SetGenerationStatus

func (p *Project) SetGenerationStatus(status string)

SetGenerationStatus updates the generation status

func (*Project) SetMetadata

func (p *Project) SetMetadata(key, value string)

SetMetadata sets a metadata key-value pair

func (*Project) SetModelUsed

func (p *Project) SetModelUsed(model string)

SetModelUsed records which model was used for generation

func (*Project) UpdatedAt

func (p *Project) UpdatedAt() time.Time

func (*Project) Validate

func (p *Project) Validate() error

Validate validates the project entity

type Repository

type Repository interface {
	// FindByID retrieves a project by its ID
	FindByID(id string) (*Project, error)

	// FindByName retrieves a project by its name
	FindByName(name string) (*Project, error)

	// FindAll retrieves all projects
	FindAll() ([]*Project, error)

	// Save persists a project
	Save(project *Project) error

	// Delete removes a project
	Delete(id string) error

	// Exists checks if a project exists
	Exists(id string) (bool, error)

	// ExistsByName checks if a project with given name exists
	ExistsByName(name string) (bool, error)
}

Repository defines the interface for project persistence This is a domain interface - implementations will be in infrastructure layer

Jump to

Keyboard shortcuts

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