gh

package
v5.11.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ContentLocationRE = regexp.MustCompile(`^github.com/([^/]+)/([^/]+)/(.*?)(@([^@]+))?$`)
)

Functions

func NewJsonnetImporter

func NewJsonnetImporter(client Interface) jsonnet.Importer

Types

type API

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

func (*API) GetBranch

func (gh *API) GetBranch(location *Location) (*Branch, error)

func (*API) GetFile

func (gh *API) GetFile(location *Location) (File, error)

func (*API) GetFileAsync

func (gh *API) GetFileAsync(location *Location) *FileFuture

func (*API) GetFiles

func (gh *API) GetFiles(location *Location) ([]File, error)

func (*API) GetStatuses

func (gh *API) GetStatuses(location *Location) ([]github.RepoStatus, error)

type Branch

type Branch struct {
	Location
	github.Rate
	Name, SHA string
	Author    string
	Date      time.Time
	Message   string
}

type ErrNotAFile

type ErrNotAFile struct {
	Location *Location
}

func (ErrNotAFile) Error

func (err ErrNotAFile) Error() string

type File

type File struct {
	Location *Location
	Content  string
}

func (*File) Name

func (f *File) Name() string

type FileFuture

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

func (*FileFuture) Get

func (ff *FileFuture) Get() (File, error)

type Interface

type Interface interface {
	GetBranch(location *Location) (*Branch, error)
	GetFile(location *Location) (File, error)
	GetFiles(location *Location) ([]File, error)
	GetStatuses(location *Location) ([]github.RepoStatus, error)
}

func New

func New(token string, cacheDir string, statsd statsdw.Interface) Interface

type Location

type Location struct {
	Owner, Repo, Path, Ref string `yaml:",omitempty"`
}

func NewLocation

func NewLocation(location string) (*Location, error)

func (*Location) Clean

func (l *Location) Clean()

func (*Location) Defaults

func (l *Location) Defaults(defaults Location)

func (Location) String

func (l Location) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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