githubtools

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetReadOnlyNotice

func GetReadOnlyNotice() string

Types

type GitHubClient

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

func NewGitHubClient

func NewGitHubClient(logger *slog.Logger) *GitHubClient

func (*GitHubClient) CallTool

func (c *GitHubClient) CallTool(ctx context.Context, name string, args json.RawMessage) (interface{}, error)

func (*GitHubClient) GetRateLimiter

func (c *GitHubClient) GetRateLimiter() *ratelimit.TokenBucket

func (*GitHubClient) GetTools

func (c *GitHubClient) GetTools() []ToolDefinition

func (*GitHubClient) IsReadOnly

func (c *GitHubClient) IsReadOnly() bool

type IssueResult

type IssueResult struct {
	Number    int    `json:"number"`
	Title     string `json:"title"`
	State     string `json:"state"`
	Body      string `json:"body"`
	User      string `json:"user"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
	URL       string `json:"url"`
}

type PRArgs

type PRArgs struct {
	Owner string `json:"owner"`
	Repo  string `json:"repo"`
	Title string `json:"title"`
	Head  string `json:"head"`
	Base  string `json:"base"`
	Body  string `json:"body,omitempty"`
}

type PRResult

type PRResult struct {
	Number  int    `json:"number"`
	Title   string `json:"title"`
	State   string `json:"state"`
	URL     string `json:"url"`
	HTMLURL string `json:"html_url"`
}

type RepoResult

type RepoResult struct {
	Name        string `json:"name"`
	FullName    string `json:"full_name"`
	Description string `json:"description"`
	URL         string `json:"url"`
	Private     bool   `json:"private"`
	Fork        bool   `json:"fork"`
	Stars       int    `json:"stars"`
	Language    string `json:"language"`
}

type ToolDefinition

type ToolDefinition struct {
	Name        string          `json:"name"`
	Description string          `json:"description"`
	InputSchema json.RawMessage `json:"inputSchema"`
}

type ToolHandler

type ToolHandler func(ctx context.Context, client *github.Client, args json.RawMessage) (interface{}, error)

Jump to

Keyboard shortcuts

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