models

package
v0.0.0-...-acc4708 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2017 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo interface {
	// Attributes
	Name() string
	Description() string
	Path() string
	DefaultBranch() string
	Branches() ([]string, error)

	// Actions
	Open() error
	Readme(branch string) *RepoReadme
	Find(branch, path string) (RepoFile, error)
	Equals(other Repo) bool
}

func NewRepo

func NewRepo(name, description, path, defbranch string) Repo

type RepoFile

type RepoFile interface {
	// Attributes
	Name() string
	IsFile() bool
	IsDir() bool
	IsExecutable() bool
	Size() int64

	// Actions
	Equals(RepoFile) bool
	GetBlob() (string, error)
	GetBlobBytes() ([]byte, error)
	ListFiles() ([]RepoFile, error)
}

type RepoReadme

type RepoReadme struct {
	Content []byte
	Type    RepoReadmeType
}

func NewRepoReadme

func NewRepoReadme(blob []byte, type_ RepoReadmeType) *RepoReadme

type RepoReadmeType

type RepoReadmeType int
const (
	RepoReadmeTypePlain RepoReadmeType = iota
	RepoReadmeTypeMarkdown
)

Jump to

Keyboard shortcuts

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