{"modulePath":"github.com/exitflynn/codesync","version":"v0.0.0-20250505074821-8f349c47fb42","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Types\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\nClient wraps the GitHub API client\n\n```go\nfunc NewClient(token string) *Client\n```\nNewClient creates a new GitHub API client\n\n```go\nfunc (c *Client) ExtractFunction(content, language, functionName string) (string, error)\n```\nExtractFunction attempts to extract a function from a file\n\n```go\nfunc (c *Client) GetCommitsSince(owner, repo, path string, since time.Time, sinceCommit string) ([]CommitInfo, error)\n```\nGetCommitsSince gets all commits for a file since a specific date or commit\n\n```go\nfunc (c *Client) GetDirectory(owner, repo, path, ref string) (map[string]*FileInfo, error)\n```\nGetDirectory retrieves all files from a directory in a GitHub repository\n\n```go\nfunc (c *Client) GetFile(owner, repo, path, ref string) (*FileInfo, error)\n```\nGetFile retrieves a file from a GitHub repository\n\n```go\nfunc (c *Client) GetFileDiff(owner, repo, path, baseRef, headRef string) (string, error)\n```\nGetFileDiff gets the diff between two versions of a file\n\n```go\nfunc (c *Client) GetRawFile(owner, repo, path, ref string) ([]byte, error)\n```\nGetRawFile gets the raw content of a file without processing\n\n```go\ntype Commit struct {\n\tSHA  string\n\tDate time.Time\n}\n```\n\n```go\ntype CommitInfo struct {\n\tSHA       string\n\tMessage   string\n\tAuthor    string\n\tTimestamp time.Time\n}\n```\nCommitInfo represents information about a commit\n\n```go\ntype FileContent struct {\n\tContent string\n}\n```\n\n```go\ntype FileInfo struct {\n\tContent  string\n\tPath     string\n\tSHA      string\n\tUpdated  time.Time\n\tCommitID string\n}\n```\nFileInfo represents information about a file in a GitHub repository\n\n```go\ntype GitHubClient interface {\n\tGetFile(owner, repo, path, revision string) (*FileContent, error)\n\tGetCommitsSince(owner, repo, path string, since time.Time, until string) ([]Commit, error)\n\tExtractFunction(content, language, functionName string) (string, error)\n}\n```\n\n","path":"github.com/exitflynn/codesync/internal/github","name":"github","synopsis":"","isRedistributable":true}
