common

package
v4.0.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package common contains interfaces and non-specific protocol entities

Index

Constants

View Source
const GitUploadPackServiceName = "git-upload-pack"

Variables

View Source
var (
	ErrRepositoryNotFound    = errors.New("repository not found")
	ErrAuthorizationRequired = errors.New("authorization required")
	ErrEmptyGitUploadPack    = errors.New("empty git-upload-pack given")
	ErrInvalidAuthMethod     = errors.New("invalid auth method")
)

Functions

This section is empty.

Types

type AuthMethod

type AuthMethod interface {
	Name() string
	String() string
}

type Endpoint

type Endpoint url.URL

func NewEndpoint

func NewEndpoint(endpoint string) (Endpoint, error)

func (*Endpoint) String

func (e *Endpoint) String() string

type GitUploadPackInfo

type GitUploadPackInfo struct {
	Capabilities *packp.Capabilities
	Refs         memory.ReferenceStorage
}

func NewGitUploadPackInfo

func NewGitUploadPackInfo() *GitUploadPackInfo

func (*GitUploadPackInfo) Bytes

func (i *GitUploadPackInfo) Bytes() []byte

func (*GitUploadPackInfo) Decode

func (i *GitUploadPackInfo) Decode(r io.Reader) error

func (*GitUploadPackInfo) Head

func (i *GitUploadPackInfo) Head() *core.Reference

func (*GitUploadPackInfo) String

func (i *GitUploadPackInfo) String() string

type GitUploadPackRequest

type GitUploadPackRequest struct {
	Wants []core.Hash
	Haves []core.Hash
	Depth int
}

func (*GitUploadPackRequest) Have

func (r *GitUploadPackRequest) Have(h ...core.Hash)

func (*GitUploadPackRequest) Reader

func (r *GitUploadPackRequest) Reader() *strings.Reader

func (*GitUploadPackRequest) String

func (r *GitUploadPackRequest) String() string

func (*GitUploadPackRequest) Want

func (r *GitUploadPackRequest) Want(h ...core.Hash)

type GitUploadPackService

type GitUploadPackService interface {
	Connect() error
	SetAuth(AuthMethod) error
	Info() (*GitUploadPackInfo, error)
	Fetch(*GitUploadPackRequest) (io.ReadCloser, error)
	Disconnect() error
}

Jump to

Keyboard shortcuts

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