git

package module
v0.0.0-...-f95ae21 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseHost

func ParseHost(urs string) (string, error)

ParseHost from git url string.

func SetLogger

func SetLogger(l Logger)

SetLogger sets logger for the package.

Types

type LogLevel

type LogLevel int

LogLevel ...

const (
	// DebugLevel ...
	DebugLevel LogLevel = 3
	// InfoLevel ...
	InfoLevel LogLevel = 2
	// WarnLevel ...
	WarnLevel LogLevel = 1
	// ErrLevel ...
	ErrLevel LogLevel = 0
)

func (LogLevel) String

func (l LogLevel) String() string

type Logger

type Logger interface {
	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warningf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
}

Logger interface used in this package.

func NewLogger

func NewLogger(lev LogLevel) Logger

NewLogger ...

type Repository

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

Repository ...

func NewRepository

func NewRepository() *Repository

NewRepository ...

func (*Repository) Clone

func (r *Repository) Clone(urs string, path string) error

Clone repository.

func (*Repository) Delete

func (r *Repository) Delete(service string, id string) (bool, error)

Delete bytes.

func (*Repository) Exists

func (r *Repository) Exists(service string, id string) (bool, error)

Exists ...

func (*Repository) Get

func (r *Repository) Get(service string, id string) ([]byte, error)

Get bytes.

func (*Repository) IDs

func (r *Repository) IDs(service string, opts ...keyring.IDsOption) ([]string, error)

IDs ...

func (*Repository) Name

func (r *Repository) Name() string

Name of git keyring.Store.

func (*Repository) Open

func (r *Repository) Open(path string) error

Open repository.

func (*Repository) Path

func (r *Repository) Path() string

Path to repo.

func (*Repository) Pull

func (r *Repository) Pull() error

Pull changes.

func (*Repository) Push

func (r *Repository) Push() error

Push changes.

func (*Repository) Reset

func (r *Repository) Reset(service string) error

Reset ...

func (*Repository) Set

func (r *Repository) Set(service string, id string, data []byte) error

Set bytes.

func (*Repository) SetKey

func (r *Repository) SetKey(key *keys.EdX25519Key) error

SetKey sets the ssh key.

Jump to

Keyboard shortcuts

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