git

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: CC0-1.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const GIT_MAINBRANCH = "main"
View Source
const NOT_SYNC_STATUS = "Not Sync"
View Source
const SYNCED_STATUS = "Synced"

Variables

This section is empty.

Functions

This section is empty.

Types

type GitClient

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

func NewClient

func NewClient(repo1, owner1, token string, ctx context.Context) (GitClient, error)

func (*GitClient) CommitFile

func (g *GitClient) CommitFile(filename string, content []byte) error

func (*GitClient) CommitNewFile

func (client *GitClient) CommitNewFile(fileName, branch, folder string, content []byte) (*github.RepositoryContentResponse, error)

func (*GitClient) GetContentOfFile

func (client *GitClient) GetContentOfFile(fileName, folder string, ref string) (*github.RepositoryContent, error)

func (*GitClient) GetFileHistory

func (client *GitClient) GetFileHistory(fileName string, folder string) ([]*github.RepositoryCommit, error)

func (*GitClient) GetFileHistory1

func (g *GitClient) GetFileHistory1(filePath string) error

func (*GitClient) GetOwner

func (g *GitClient) GetOwner() string

func (*GitClient) GetRepoName

func (g *GitClient) GetRepoName() string

func (*GitClient) IncreaseRevisionOfFile

func (client *GitClient) IncreaseRevisionOfFile(fileName, folder string, newRevision, newSha string) error

func (*GitClient) IsFileNotExist

func (client *GitClient) IsFileNotExist(fileName, folder string) (bool, error)

func (*GitClient) UpdateFile

func (client *GitClient) UpdateFile(fileName, folder string, content []byte) (*github.RepositoryContentResponse, error)

Jump to

Keyboard shortcuts

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