Documentation
¶
Index ¶
- type Goal
- type Manager
- func (m *Manager) Create(ctx context.Context, title, description string) (*Goal, error)
- func (m *Manager) Delete(ctx context.Context, id string) error
- func (m *Manager) Get(ctx context.Context, id string) (*Goal, error)
- func (m *Manager) GetGoalsBySession(ctx context.Context, sessionID string) ([]*Goal, error)
- func (m *Manager) LinkSession(ctx context.Context, goalID, sessionID string) error
- func (m *Manager) List(ctx context.Context, status Status) ([]*Goal, error)
- func (m *Manager) UnlinkSession(ctx context.Context, goalID, sessionID string) error
- func (m *Manager) Update(ctx context.Context, id string, updates map[string]interface{}) (*Goal, error)
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Goal ¶
type Goal struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Status Status `json:"status"`
Progress int `json:"progress"` // 0-100
SessionIDs []string `json:"session_ids"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
}
Goal represents a user goal
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages goals
func NewManager ¶
NewManager creates a new goal manager
func (*Manager) GetGoalsBySession ¶
GetGoalsBySession gets all goals linked to a session
func (*Manager) LinkSession ¶
LinkSession links a session to a goal
func (*Manager) UnlinkSession ¶
UnlinkSession unlinks a session from a goal
Click to show internal directories.
Click to hide internal directories.