Documentation
¶
Index ¶
- Constants
- func ExtractFrontMatter(fileContentWithFrontMatter string) (string, string)
- func GenerateMarkdownFile(collectionItem database.GetCollectionItemRow) string
- type GitHubClient
- func (c *GitHubClient) CreateFile(path, content, message string) error
- func (c *GitHubClient) DeleteFile(path, message string) error
- func (c *GitHubClient) GetContents(path string) ([]*github.RepositoryContent, error)
- func (c *GitHubClient) GetFileContent(path string) (string, error)
- func (c *GitHubClient) ListCommits(path string) ([]*github.RepositoryCommit, error)
- func (c *GitHubClient) UpdateFile(path, content, message string) error
Constants ¶
View Source
const ( Owner = "waishnav" Repo = "danto-hugo" )
Variables ¶
This section is empty.
Functions ¶
func ExtractFrontMatter ¶
ParseMarkdown takes a raw markdown string, separates the frontmatter from the content, and parses them.
func GenerateMarkdownFile ¶
func GenerateMarkdownFile(collectionItem database.GetCollectionItemRow) string
Types ¶
type GitHubClient ¶
type GitHubClient struct {
// contains filtered or unexported fields
}
func NewGitHubClient ¶
func NewGitHubClient() (*GitHubClient, error)
func (*GitHubClient) CreateFile ¶
func (c *GitHubClient) CreateFile(path, content, message string) error
func (*GitHubClient) DeleteFile ¶
func (c *GitHubClient) DeleteFile(path, message string) error
func (*GitHubClient) GetContents ¶
func (c *GitHubClient) GetContents(path string) ([]*github.RepositoryContent, error)
func (*GitHubClient) GetFileContent ¶
func (c *GitHubClient) GetFileContent(path string) (string, error)
func (*GitHubClient) ListCommits ¶
func (c *GitHubClient) ListCommits(path string) ([]*github.RepositoryCommit, error)
func (*GitHubClient) UpdateFile ¶
func (c *GitHubClient) UpdateFile(path, content, message string) error
Click to show internal directories.
Click to hide internal directories.