gitremote

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitRemote

type GitRemote struct {
	GitUrl    string
	LocalPath string

	*GitRemoteConfig
	// contains filtered or unexported fields
}

func NewGitRemote

func NewGitRemote(
	ctx context.Context,
	localPath string,
	config *GitRemoteConfig,
) (*GitRemote, error)

func (*GitRemote) Init

func (gr *GitRemote) Init(ctx context.Context) error

Init 初始化remote

func (*GitRemote) Pull

func (gr *GitRemote) Pull(ctx context.Context) error

Pull 将远端的store文件拉取到本地

func (*GitRemote) Push

func (gr *GitRemote) Push(ctx context.Context) error

Push 将本地的store文件推送到远端

type GitRemoteConfig

type GitRemoteConfig struct {
	Url            string `json:"url" yaml:"url"`
	Name           string `json:"name" yaml:"name"`
	Email          string `json:"email" yaml:"email"`
	PrivateKeyPath string `json:"privateKeyPath" yaml:"privateKeyPath"`
	PublicKeyPath  string `json:"publicKeyPath" yaml:"publicKeyPath"`
}

Jump to

Keyboard shortcuts

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