skillproposals

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DDL = []string{
	`CREATE TABLE IF NOT EXISTS goncho_skill_learning_proposals (
		id INTEGER PRIMARY KEY AUTOINCREMENT,
		proposal_id TEXT NOT NULL UNIQUE,
		workspace_id TEXT NOT NULL DEFAULT '',
		skill_name TEXT NOT NULL,
		source_task TEXT NOT NULL,
		draft_body TEXT NOT NULL,
		evidence_json TEXT NOT NULL DEFAULT '{}',
		status TEXT NOT NULL DEFAULT 'pending' CHECK(status IN ('pending','approved','rejected')),
		created_by TEXT NOT NULL,
		reviewed_by TEXT NOT NULL DEFAULT '',
		reviewed_at INTEGER,
		review_reason TEXT NOT NULL DEFAULT '',
		created_at INTEGER NOT NULL
	)`,
	`CREATE INDEX IF NOT EXISTS idx_goncho_skill_learning_workspace_status ON goncho_skill_learning_proposals(workspace_id, status, created_at DESC)`,
	`CREATE INDEX IF NOT EXISTS idx_goncho_skill_learning_skill_status ON goncho_skill_learning_proposals(skill_name, status, created_at DESC)`,
	`CREATE INDEX IF NOT EXISTS idx_goncho_skill_learning_created_at ON goncho_skill_learning_proposals(created_at DESC)`,
}

Functions

This section is empty.

Types

type SkillLearningProposal

type SkillLearningProposal struct {
	ID           int64                       `json:"id"`
	ProposalID   string                      `json:"proposal_id"`
	WorkspaceID  string                      `json:"workspace_id"`
	SkillName    string                      `json:"skill_name"`
	SourceTask   string                      `json:"source_task"`
	DraftBody    string                      `json:"draft_body"`
	EvidenceJSON json.RawMessage             `json:"evidence_json"`
	Status       SkillLearningProposalStatus `json:"status"`
	CreatedBy    string                      `json:"created_by"`
	ReviewedBy   string                      `json:"reviewed_by,omitempty"`
	ReviewedAt   *time.Time                  `json:"reviewed_at,omitempty"`
	ReviewReason string                      `json:"review_reason,omitempty"`
	CreatedAt    time.Time                   `json:"created_at"`
}

func GetSkillLearningProposal

func GetSkillLearningProposal(ctx context.Context, db *sql.DB, proposalID string) (SkillLearningProposal, error)

type SkillLearningProposalCreateParams

type SkillLearningProposalCreateParams struct {
	WorkspaceID string    `json:"workspace_id,omitempty"`
	SkillName   string    `json:"skill_name"`
	SourceTask  string    `json:"source_task"`
	DraftBody   string    `json:"draft_body"`
	CreatedBy   string    `json:"created_by"`
	Evidence    any       `json:"evidence,omitempty"`
	CreatedAt   time.Time `json:"created_at,omitempty"`
}

type SkillLearningProposalList

type SkillLearningProposalList struct {
	Items []SkillLearningProposal `json:"items"`
	Count int                     `json:"count"`
}

type SkillLearningProposalQuery

type SkillLearningProposalQuery struct {
	WorkspaceID string                      `json:"workspace_id,omitempty"`
	Status      SkillLearningProposalStatus `json:"status,omitempty"`
	Limit       int                         `json:"limit,omitempty"`
}

type SkillLearningProposalRef

type SkillLearningProposalRef struct {
	ProposalID  string                      `json:"proposal_id"`
	WorkspaceID string                      `json:"workspace_id"`
	SkillName   string                      `json:"skill_name"`
	Status      SkillLearningProposalStatus `json:"status"`
}

type SkillLearningProposalReviewParams

type SkillLearningProposalReviewParams struct {
	ProposalID   string    `json:"proposal_id"`
	ReviewedBy   string    `json:"reviewed_by"`
	ReviewReason string    `json:"review_reason"`
	ReviewedAt   time.Time `json:"reviewed_at,omitempty"`
}

type SkillLearningProposalStatus

type SkillLearningProposalStatus string
const (
	SkillLearningProposalPending  SkillLearningProposalStatus = "pending"
	SkillLearningProposalApproved SkillLearningProposalStatus = "approved"
	SkillLearningProposalRejected SkillLearningProposalStatus = "rejected"
)

Jump to

Keyboard shortcuts

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