githubwrap

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 4 Imported by: 0

README

Github-Wrapper

Simple Package that wrap Github api to make it easy to use.

currently feature :

  • Upload file to repository
  • Get downloadable link from repository

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGithubClient

func NewGithubClient(httpClient *http.Client) (client *github.Client)

func NewOauth2Client

func NewOauth2Client(ctx context.Context, accessToken string) (client *http.Client)

Types

type Wrapper

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

func NewWrapper added in v0.0.2

func NewWrapper(client *github.Client, owner, repo string) (wrapper *Wrapper)
func (wrp *Wrapper) GetLink(ctx context.Context, path string) (link string, err error)

func (*Wrapper) UploadFile

func (wrp *Wrapper) UploadFile(ctx context.Context, path, message string, content []byte) (err error)

Jump to

Keyboard shortcuts

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