Files
obsidian-mcp/internal/repository/git_repository.go
Andrey Epifancev da289d4a7e feat: Implement foundation layer with domain entities and repository interfaces
- Add complete domain layer: Note, Vault, WikiLink, Tag, Frontmatter, Graph entities
- Implement repository interfaces for data access abstraction
- Create comprehensive configuration system with YAML and env support
- Add CLI entry point with signal handling and graceful shutdown
- Fix mermaid diagram syntax in design.md (array notation)
- Add CLAUDE.md for development guidance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 10:22:28 +04:00

33 lines
655 B
Go

package repository
import (
"context"
"time"
)
type GitStatus struct {
Branch string
Modified []string
Untracked []string
Staged []string
Ahead int
Behind int
}
type Commit struct {
Hash string
Author string
Date time.Time
Message string
Files []string
}
type GitRepository interface {
Status(ctx context.Context) (*GitStatus, error)
Pull(ctx context.Context) error
Push(ctx context.Context) error
Commit(ctx context.Context, message string, files []string) error
Log(ctx context.Context, path string, limit int) ([]*Commit, error)
IsEnabled() bool
Clone(ctx context.Context, url string, path string) error
}