Documentation
¶
Index ¶
- Variables
- func Run(ctx context.Context, config Config) error
- type Capabilities
- type Capability
- type CmdCapabilities
- type CmdConnect
- type CmdExport
- type CmdFetch
- type CmdImport
- type CmdList
- type CmdOption
- type CmdPush
- type CmdUnknown
- type Command
- type Config
- type ErrInvalidCommand
- type Helper
- type ListRef
- type PushRef
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidArguments = errors.New("invalid arguments.")
View Source
var ErrUnsupportedOption = errors.New("unsupported option")
Functions ¶
Types ¶
type Capabilities ¶
type Capabilities struct { Optional Capability Mandatory Capability Refspecs []string ExportMarks string ImportMarks string }
type Capability ¶
type Capability uint
const ( CapConnect Capability = 1 << iota CapPush CapFetch CapExport CapImport CapOption CapRefspec CapBidiImport CapExportMarks CapImportMarks CapNoPrivateUpdate CapCheckConnectivity CapSignedTags )
func (Capability) String ¶
func (c Capability) String() string
type CmdCapabilities ¶
type CmdCapabilities struct {
Config Config
}
type CmdUnknown ¶
type Config ¶
type Config struct { Helper Helper Dir string Remote string URL string Stdin io.Reader Stdout io.Writer Err error }
func DefaultConfig ¶
func DefaultConfig() Config
type ErrInvalidCommand ¶
type ErrInvalidCommand string
func (ErrInvalidCommand) Error ¶
func (e ErrInvalidCommand) Error() string
type Helper ¶
type Helper interface { Capabilities() Capabilities SetOption(key, value string) error List(ctx context.Context, cmd *CmdList) ([]ListRef, error) Fetch(ctx context.Context, cmd *CmdFetch) error Push(ctx context.Context, cmd *CmdPush) error Export(ctx context.Context, cmd *CmdExport) error Import(ctx context.Context, cmd *CmdImport) error Connect(ctx context.Context, cmd *CmdConnect) error Unknown(ctx context.Context, cmd *CmdUnknown) error }
Click to show internal directories.
Click to hide internal directories.