Documentation
¶
Index ¶
- type ActionTask
- type ActionTaskList
- type ActionTaskStep
- type Attachment
- type AttachmentList
- type Comment
- type EmptyResponse
- type Issue
- type IssueDependency
- type IssueDependencyList
- type Label
- type LabelList
- type Milestone
- type MilestoneList
- type PullRequest
- type PullRequestList
- type Release
- type ReleaseList
- type Repository
- type RepositoryList
- type WikiPage
- type WikiPageList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionTask ¶
type ActionTask struct {
ID int64 `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
WorkflowID int64 `json:"workflow_id"`
RunID int64 `json:"run_id"`
JobID int64 `json:"job_id"`
Steps []ActionTaskStep `json:"steps,omitempty"`
}
ActionTask represents an action task response (custom implementation as SDK doesn't support) Used by endpoints: - GET /repos/{owner}/{repo}/actions/tasks
func (*ActionTask) ToMarkdown ¶
func (at *ActionTask) ToMarkdown() string
ToMarkdown renders action task with name, status and execution time Example: **Build and Test** `success` Run ID: 123 | Job ID: 456 Started: 2024-01-15 14:30 | Duration: 2m15s Steps:
- Setup Go `success`
- Run Tests `success`
- Build Binary `success`
type ActionTaskList ¶
type ActionTaskList []*ActionTask
ActionTaskList represents a list of action tasks response Used by endpoints: - GET /repos/{owner}/{repo}/actions/tasks
func (ActionTaskList) ToMarkdown ¶
func (atl ActionTaskList) ToMarkdown() string
ToMarkdown renders action tasks as a numbered list with status Example: 1. **Build and Test** `success` Run ID: 123 | Job ID: 456 Started: 2024-01-15 14:30 | Duration: 2m15s Steps:
- Setup Go `success`
- Run Tests `success`
2. **Deploy** `running` Run ID: 124 | Job ID: 457 Started: 2024-01-15 14:35
type ActionTaskStep ¶
type ActionTaskStep struct {
Name string `json:"name"`
Status string `json:"status"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
Conclusion string `json:"conclusion,omitempty"`
}
ActionTaskStep represents a step in an action task
func (*ActionTaskStep) ToMarkdown ¶
func (ats *ActionTaskStep) ToMarkdown() string
ToMarkdown renders action task step with name, status and timing Example: **Run Tests** `success` (passed) - 1m30s
type Attachment ¶
type Attachment struct {
*forgejo.Attachment
}
Attachment represents an attachment response with embedded SDK attachment Used by endpoints: - GET /repos/{owner}/{repo}/releases/{id}/assets (list release attachments) - POST /repos/{owner}/{repo}/releases/{id}/assets (create release attachment) - PATCH /repos/{owner}/{repo}/releases/assets/{id} (edit release attachment) - GET /repos/{owner}/{repo}/issues/{index}/attachments (list issue attachments) - POST /repos/{owner}/{repo}/issues/{index}/attachments (create issue attachment) - PATCH /repos/{owner}/{repo}/issues/{index}/attachments/{attachment_id} (edit issue attachment)
func (*Attachment) ToMarkdown ¶
func (a *Attachment) ToMarkdown() string
ToMarkdown renders attachment with name, size and download link Example: **document.pdf** (1024 bytes) [Download](https://git.example.com/attachments/123)
type AttachmentList ¶
type AttachmentList []*Attachment
AttachmentList represents a list of attachments response Used by endpoints: - GET /repos/{owner}/{repo}/releases/{id}/assets - GET /repos/{owner}/{repo}/issues/{index}/attachments
func (AttachmentList) ToMarkdown ¶
func (al AttachmentList) ToMarkdown() string
ToMarkdown renders attachments as a bullet list with download info Example: - **document.pdf** (1024 bytes) [Download](https://git.example.com/attachments/123) - **screenshot.png** (2048 bytes) [Download](https://git.example.com/attachments/124)
type Comment ¶
Comment represents a comment response with embedded SDK comment Used by endpoints: - POST /repos/{owner}/{repo}/issues/{index}/comments (create)
func (*Comment) ToMarkdown ¶
ToMarkdown renders comment with author, timestamp and content Example: **alice** (2024-01-15 14:30) I think the issue is in the authentication module...
type EmptyResponse ¶
type EmptyResponse struct{}
EmptyResponse represents an empty response for endpoints that don't return data Used by endpoints that only return status codes: - DELETE /repos/{owner}/{repo}/labels/{id} - DELETE /repos/{owner}/{repo}/milestones/{id} - DELETE /repos/{owner}/{repo}/releases/{id} - DELETE /repos/{owner}/{repo}/releases/assets/{id} - DELETE /repos/{owner}/{repo}/issues/{index}/labels/{id} - DELETE /repos/{owner}/{repo}/issues/{index}/attachments/{attachment_id} - DELETE /repos/{owner}/{repo}/wiki/page/{pageName}
func (EmptyResponse) ToMarkdown ¶
func (er EmptyResponse) ToMarkdown() string
ToMarkdown renders simple success message for empty responses Example: *Operation completed successfully*
type Issue ¶
Issue represents an issue response with embedded SDK issue Used by endpoints: - POST /repos/{owner}/{repo}/issues (create) - PATCH /repos/{owner}/{repo}/issues/{index} (edit)
func (*Issue) ToMarkdown ¶
ToMarkdown renders issue with title, state, assignees, labels and basic info Example: **#123 Fix login bug** (open) Author: johndoe Assignees: [alice bob] Labels: [bug priority-high] Milestone: v1.0.0 Due: 2024-12-31
The login page crashes when...
type IssueDependency ¶
type IssueDependency struct {
ID int64 `json:"id"`
IssueID int64 `json:"issue_id"`
DependencyID int64 `json:"dependency_id"`
CreatedUnix int64 `json:"created_unix"`
Issue *Issue `json:"issue,omitempty"`
Dependency *Issue `json:"dependency,omitempty"`
}
IssueDependency represents an issue dependency response (custom implementation as SDK doesn't support) Used by endpoints: - POST /repos/{owner}/{repo}/issues/{index}/dependencies
func (*IssueDependency) ToMarkdown ¶
func (id *IssueDependency) ToMarkdown() string
ToMarkdown renders issue dependency with issue titles and numbers Example: #123 Fix login bug depends on #45 Update authentication library
type IssueDependencyList ¶
type IssueDependencyList []*IssueDependency
IssueDependencyList represents a list of issue dependencies response
func (IssueDependencyList) ToMarkdown ¶
func (idl IssueDependencyList) ToMarkdown() string
ToMarkdown renders issue dependencies as a bullet list Example: - #123 Fix login bug depends on #45 Update authentication library - #124 Add user profile depends on #46 Database migration
type Label ¶
Label represents a label response with embedded SDK label Used by endpoints: - GET /repos/{owner}/{repo}/labels (list) - POST /repos/{owner}/{repo}/labels (create) - PATCH /repos/{owner}/{repo}/labels/{id} (edit) - POST /repos/{owner}/{repo}/issues/{index}/labels (add to issue) - PUT /repos/{owner}/{repo}/issues/{index}/labels (replace issue labels) - DELETE /repos/{owner}/{repo}/issues/{index}/labels/{id} (remove from issue)
func (*Label) ToMarkdown ¶
ToMarkdown renders a label as a colored badge with name and description Example: **bug** `#ff0000` - Something isn't working
type LabelList ¶
type LabelList []*Label
LabelList represents a list of labels response Used by endpoints: - GET /repos/{owner}/{repo}/labels - POST /repos/{owner}/{repo}/issues/{index}/labels - PUT /repos/{owner}/{repo}/issues/{index}/labels
func (LabelList) ToMarkdown ¶
ToMarkdown renders labels as a bullet list of colored badges Example: - **bug** `#ff0000` - Something isn't working - **enhancement** `#a2eeef` - New feature or request
type Milestone ¶
Milestone represents a milestone response with embedded SDK milestone Used by endpoints: - GET /repos/{owner}/{repo}/milestones (list) - POST /repos/{owner}/{repo}/milestones (create) - PATCH /repos/{owner}/{repo}/milestones/{id} (edit)
func (*Milestone) ToMarkdown ¶
ToMarkdown renders milestone with title, state, due date and progress Example: **v1.0.0** (open) - Due: 2024-12-31 - Progress: 5/10 Fix critical bugs before release
type MilestoneList ¶
type MilestoneList []*Milestone
MilestoneList represents a list of milestones response Used by endpoints: - GET /repos/{owner}/{repo}/milestones
func (MilestoneList) ToMarkdown ¶
func (ml MilestoneList) ToMarkdown() string
ToMarkdown renders milestones as a numbered list with details Example: 1. **v1.0.0** (open) - Due: 2024-12-31 - Progress: 5/10 Fix critical bugs before release 2. **v0.9.0** (closed) - Progress: 10/10 Beta release with new features
type PullRequest ¶
type PullRequest struct {
*forgejo.PullRequest
}
PullRequest represents a pull request response with embedded SDK pull request Used by endpoints: - GET /repos/{owner}/{repo}/pulls (list) - GET /repos/{owner}/{repo}/pulls/{index} (get)
func (*PullRequest) ToMarkdown ¶
func (pr *PullRequest) ToMarkdown() string
ToMarkdown renders pull request with title, state, author and branch info Example: **#42 Add user authentication** (open) Author: johndoe Branch: feature/auth → main
This PR implements OAuth2 authentication...
type PullRequestList ¶
type PullRequestList []*PullRequest
PullRequestList represents a list of pull requests response Used by endpoints: - GET /repos/{owner}/{repo}/pulls
func (PullRequestList) ToMarkdown ¶
func (prl PullRequestList) ToMarkdown() string
ToMarkdown renders pull requests as a numbered list with basic info Example: 1. **#42 Add user authentication** (open) Author: johndoe Branch: feature/auth → main
This PR implements OAuth2 authentication... 2. **#41 Fix database connection** (merged) Author: alice Branch: bugfix/db → main
type Release ¶
Release represents a release response with embedded SDK release Used by endpoints: - GET /repos/{owner}/{repo}/releases (list) - POST /repos/{owner}/{repo}/releases (create) - PATCH /repos/{owner}/{repo}/releases/{id} (edit)
func (*Release) ToMarkdown ¶
ToMarkdown renders release with tag, name, draft/prerelease status and description Example: **v1.0.0** - Major Release `PRERELEASE` (2024-01-15) This release includes new authentication system and bug fixes...
type ReleaseList ¶
type ReleaseList []*Release
ReleaseList represents a list of releases response Used by endpoints: - GET /repos/{owner}/{repo}/releases
func (ReleaseList) ToMarkdown ¶
func (rl ReleaseList) ToMarkdown() string
ToMarkdown renders releases as a numbered list with details Example: 1. **v1.0.0** - Major Release `PRERELEASE` (2024-01-15) This release includes new authentication system... 2. **v0.9.0** - Beta Release (2024-01-01) Initial beta version with core features
type Repository ¶
type Repository struct {
*forgejo.Repository
}
Repository represents a repository response with embedded SDK repository Used by endpoints: - GET /repos/search - GET /user/repos - GET /orgs/{org}/repos
func (*Repository) ToMarkdown ¶
func (r *Repository) ToMarkdown() string
ToMarkdown renders repository with name, description, stats and key info Example: **owner/repo-name** `PRIVATE` `FORK` A sample repository for testing purposes Stars: 42 | Forks: 7 | Issues: 3 | PRs: 1 [View Repository](https://git.example.com/owner/repo-name)
type RepositoryList ¶
type RepositoryList []*Repository
RepositoryList represents a list of repositories response Used by endpoints: - GET /repos/search - GET /user/repos - GET /orgs/{org}/repos
func (RepositoryList) ToMarkdown ¶
func (rl RepositoryList) ToMarkdown() string
ToMarkdown renders repositories as a numbered list with basic stats Example: 1. **owner/repo-name** `PRIVATE` `FORK` A sample repository for testing purposes Stars: 42 | Forks: 7 | Issues: 3 | PRs: 1 [View Repository](https://git.example.com/owner/repo-name) 2. **owner/another-repo** Another repository Stars: 15 | Forks: 2 | Issues: 0 | PRs: 0
type WikiPage ¶
type WikiPage struct {
Title string `json:"title"`
Content string `json:"content"`
CommitMessage string `json:"commit_message,omitempty"`
LastCommitSHA string `json:"last_commit_sha,omitempty"`
LastModified time.Time `json:"last_modified,omitempty"`
HTMLContentURL string `json:"html_content_url,omitempty"`
SubURL string `json:"sub_url,omitempty"`
}
WikiPage represents a wiki page response (custom implementation as SDK doesn't support) Used by endpoints: - GET /repos/{owner}/{repo}/wiki/page/{pageName} - POST /repos/{owner}/{repo}/wiki/new - PATCH /repos/{owner}/{repo}/wiki/page/{pageName}
func (*WikiPage) ToMarkdown ¶
ToMarkdown renders wiki page with title, last modified date and content Example: # Getting Started *Last modified: 2024-01-15 14:30*
Welcome to our project wiki...
type WikiPageList ¶
type WikiPageList []*WikiPage
WikiPageList represents a list of wiki pages response Used by endpoints: - GET /repos/{owner}/{repo}/wiki/pages
func (WikiPageList) ToMarkdown ¶
func (wl WikiPageList) ToMarkdown() string
ToMarkdown renders wiki pages as a table of contents with links Example: ## Wiki Pages - **Getting Started** (2024-01-15) - **API Documentation** (2024-01-10) - **Contributing Guide** (2024-01-05)