putingh

package module
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2021 License: MIT Imports: 16 Imported by: 1

README

putingh (Put in GH)

Put file in the GH

Go Report Card GoDoc GitHub license

Usage

# Put file in git repository
GH_TOKEN=you_github_token putingh git://owner/repository/branch/name[/name]... localfile

# Put file in git repository release assets
GH_TOKEN=you_github_token putingh asset://owner/repository/release/name localfile

# Put file in gist
GH_TOKEN=you_github_token putingh gist://owner/description/name localfile

# Get file from git repository
GH_TOKEN=you_github_token putingh git://owner/repository/branch/name[/name]...

# Get file from git repository release assets
GH_TOKEN=you_github_token putingh asset://owner/repository/release/name

# Get file from gist
GH_TOKEN=you_github_token putingh gist://owner/description/name

License

Licensed under the MIT License. See LICENSE for the full license text.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = fmt.Errorf("not found")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	TmpDir           string
	GitName          string
	GitEmail         string
	GitCommitMessage string
}

type PutInGH

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

func NewPutInGH

func NewPutInGH(token string, conf Config) *PutInGH

func (*PutInGH) GetFrom added in v0.4.0

func (s *PutInGH) GetFrom(ctx context.Context, uri string) (io.Reader, error)

func (*PutInGH) GetFromGist added in v0.4.0

func (s *PutInGH) GetFromGist(ctx context.Context, owner, description, name string) (io.Reader, error)

func (*PutInGH) GetFromGit added in v0.4.0

func (s *PutInGH) GetFromGit(ctx context.Context, owner, repo, branch, name string) (io.Reader, error)

func (*PutInGH) GetFromReleasesAsset added in v0.4.0

func (s *PutInGH) GetFromReleasesAsset(ctx context.Context, owner, repo, release, name string) (io.Reader, error)

func (*PutInGH) PutIn added in v0.2.0

func (s *PutInGH) PutIn(ctx context.Context, uri string, r io.Reader) (string, error)

func (*PutInGH) PutInGist

func (s *PutInGH) PutInGist(ctx context.Context, owner, description, name string, r io.Reader) (string, error)

func (*PutInGH) PutInGistWithFile added in v0.2.0

func (s *PutInGH) PutInGistWithFile(ctx context.Context, owner, description, name string, filename string) (string, error)

func (*PutInGH) PutInGit

func (s *PutInGH) PutInGit(ctx context.Context, owner, repo, branch, name string, r io.Reader) (string, error)

func (*PutInGH) PutInGitWithFile added in v0.2.0

func (s *PutInGH) PutInGitWithFile(ctx context.Context, owner, repo, branch, name string, filename string) (string, error)

func (*PutInGH) PutInReleasesAsset

func (s *PutInGH) PutInReleasesAsset(ctx context.Context, owner, repo, release, name string, r io.Reader) (string, error)

func (*PutInGH) PutInReleasesAssetWithFile added in v0.2.0

func (s *PutInGH) PutInReleasesAssetWithFile(ctx context.Context, owner, repo, release, name string, filename string) (string, error)

func (*PutInGH) PutInWithFile added in v0.2.0

func (s *PutInGH) PutInWithFile(ctx context.Context, uri, filename string) (string, error)

Directories

Path Synopsis
cmd
putingh command

Jump to

Keyboard shortcuts

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