repo

package
v0.0.0-...-f463375 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2016 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBranch

func GetBranch(id string) (string, error)

func GetFileReader

func GetFileReader(commit, id string) (io.ReadCloser, error)

func ListBranches

func ListBranches() ([]string, error)

func Register

func Register(name string, m Manager)

func Setup

func Setup() error

Types

type Command

type Command interface {
	Match(string) bool
	Run(string, ssh.Channel) (uint64, error)
}

func Commands

func Commands() []Command

type Commit

type Commit struct {
	ID          string
	Message     string
	AuthorName  string
	AuthorEmail string
	Timestamp   time.Time
}

func GetCommit

func GetCommit(id string) (Commit, error)

func ListCommits

func ListCommits(branch string, page int) ([]Commit, error)

type File

type File struct {
	Name    string
	Size    int64
	IsDir   bool
	ModTime time.Time
}

func GetFile

func GetFile(commit, id string) (File, error)

func ListFiles

func ListFiles(commit string) ([]File, error)

type Manager

type Manager interface {
	Initialize() error
	Commands() []Command
	ListBranches() ([]string, error)
	GetBranch(id string) (string, error)
	ListCommits(branch string, page int) ([]Commit, error)
	GetCommit(id string) (Commit, error)
	ListFiles(commit string) ([]File, error)
	GetFile(commit, id string) (File, error)
	GetFileReader(commit, id string) (io.ReadCloser, error)
}

type Pull

type Pull struct{} // Command interface

func (Pull) Match

func (pull Pull) Match(command string) bool

func (Pull) Run

func (pull Pull) Run(command string, ch ssh.Channel) (uint64, error)

type Push

type Push struct{} // Command interface

func (Push) Match

func (push Push) Match(command string) bool

func (Push) Run

func (push Push) Run(command string, ch ssh.Channel) (uint64, error)

Jump to

Keyboard shortcuts

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