utils

package
v0.0.0-...-6e61812 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Owner = "waishnav"
	Repo  = "danto-hugo"
)

Variables

This section is empty.

Functions

func ExtractFrontMatter

func ExtractFrontMatter(fileContentWithFrontMatter string) (string, string)

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

Jump to

Keyboard shortcuts

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