libgithub

package module
v0.0.0-...-bb4c920 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: MIT Imports: 5 Imported by: 0

README

libgithub

a library for access github repository

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GithubClient

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

func NewGithubClient

func NewGithubClient(token, owner, repo, filePath, name, email string) *GithubClient

http://github.com/kprc/libgithub/github.go token access token from your setting owner kprc repo libgithub filePath github.go

func (*GithubClient) CreateFile

func (gc *GithubClient) CreateFile(commitMsg, fileContent string) error

func (*GithubClient) GetContent

func (gc *GithubClient) GetContent() (content, hash string, err error)

func (*GithubClient) UpdateFile

func (gc *GithubClient) UpdateFile(commitMsg, fileContent string) error

func (*GithubClient) UpdateFile2

func (gc *GithubClient) UpdateFile2(commitMsg, fileContent, hash string) error

type RepoSetting

type RepoSetting struct {
	Owner      string
	Repository string
	Path       string
	Token      string
	Name       string
	Email      string
}

Jump to

Keyboard shortcuts

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