clients

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action added in v0.0.8

type Action string

Action 表示动作

const (
	ActionFetch Action = "fetch"
	ActionPush  Action = "push"
)

定义各种动作

func (Action) String added in v0.0.8

func (a Action) String() string

type AdvertisementLoader added in v0.0.8

type AdvertisementLoader struct {
	HEAD string
	// contains filtered or unexported fields
}

AdvertisementLoader ...

func (*AdvertisementLoader) Load added in v0.0.8

func (inst *AdvertisementLoader) Load() error

Load ...

type Client added in v0.0.8

type Client interface {
	Accept(c *Context) bool
	Execute(c *Context) error
}

Client ...

type ClientRegistration added in v0.0.8

type ClientRegistration struct {
	Client Client
}

ClientRegistration ...

type ClientRegistry added in v0.0.8

type ClientRegistry interface {
	GetClientRegistration() *ClientRegistration
}

ClientRegistry ... [inject:".git-client-registry"]

type CommonActions added in v0.0.8

type CommonActions struct {
}

CommonActions ...

func (*CommonActions) LoadAdvertisement added in v0.0.8

func (inst *CommonActions) LoadAdvertisement(c *Context) *AdvertisementLoader

LoadAdvertisement ...

func (*CommonActions) LoadLocalConfig added in v0.0.8

func (inst *CommonActions) LoadLocalConfig(c *Context) *LocalConfigLoader

LoadLocalConfig ...

func (*CommonActions) LoadRemoteConfig added in v0.0.8

func (inst *CommonActions) LoadRemoteConfig(c *Context) *RemoteConfigLoader

LoadRemoteConfig ...

func (*CommonActions) LoadRemoteRefs added in v0.0.8

func (inst *CommonActions) LoadRemoteRefs(c *Context) *RemoteRefsLoader

LoadRemoteRefs ...

type Context

type Context struct {
	Lib        store.Lib
	Repository store.Repository
	Session    store.Session
	Path       afs.Path
	Connection pktline.Connection

	// collections
	Branches map[string]*gitconfig.Branch // all
	Remotes  map[string]*gitconfig.Remote // all
	RnB      []*gitconfig.RemoteAndBranch
	Intents  []*Intent

	// current
	Intent        Intent
	RawRemote     gitconfig.Remote
	RawBranch     gitconfig.Branch
	FetchTemplate gitconfig.FetchRefspecTemplate
	RemoteName    string
}

Context ...

func (*Context) Clone

func (inst *Context) Clone() *Context

Clone ...

func (*Context) Init

func (inst *Context) Init(ctx context.Context, wd afs.Path) error

Init ...

func (*Context) OpenConnection

func (inst *Context) OpenConnection(params *pktline.ConnParams) (pktline.Connection, error)

OpenConnection ...

func (*Context) OpenSession

func (inst *Context) OpenSession() (store.Session, error)

OpenSession ...

type Intent added in v0.0.8

type Intent struct {
	Action Action
	URL    string

	MergeRef  git.ReferenceName // like 'refs/heads/main'
	FetchRef  git.ReferenceName // like 'refs/remotes/origin/main'
	RemoteRef git.ReferenceName // like 'refs/heads/main'
}

Intent ...

type LocalConfigLoader added in v0.0.8

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

func (*LocalConfigLoader) Load added in v0.0.8

func (inst *LocalConfigLoader) Load() error

type MainClient added in v0.0.8

type MainClient interface {
	Client
}

MainClient ... [inject:"#git-main-client"]

type MainClientImpl added in v0.0.8

type MainClientImpl struct {
	markup.Component `id:"git-main-client"`

	ClientRegistryList []ClientRegistry `inject:".git-client-registry"`
	// contains filtered or unexported fields
}

MainClientImpl ...

func (*MainClientImpl) Accept added in v0.0.8

func (inst *MainClientImpl) Accept(c *Context) bool

Accept ...

func (*MainClientImpl) Execute added in v0.0.8

func (inst *MainClientImpl) Execute(c *Context) error

Execute ...

type RemoteConfigLoader added in v0.0.8

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

RemoteConfigLoader ...

func (*RemoteConfigLoader) Load added in v0.0.8

func (inst *RemoteConfigLoader) Load() error

Load ...

type RemoteRefsLoader added in v0.0.8

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

RemoteRefsLoader ...

func (*RemoteRefsLoader) Load added in v0.0.8

func (inst *RemoteRefsLoader) Load() error

Load ...

Jump to

Keyboard shortcuts

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