Documentation
¶
Index ¶
- Constants
- type BooleanProperty
- type Branch
- type ConfigIndex
- type ConfigLoader
- func (inst *ConfigLoader) GetIndex(cfg repositories.Config) ConfigIndex
- func (inst *ConfigLoader) LoadBranch(cfg repositories.Config, name string) *Branch
- func (inst *ConfigLoader) LoadCore(cfg repositories.Config) *Core
- func (inst *ConfigLoader) LoadRemote(cfg repositories.Config, name string) *Remote
- type Core
- type FetchRefspecTemplate
- func (t FetchRefspecTemplate) GetLocalTemplate() string
- func (t FetchRefspecTemplate) GetRemoteTemplate() string
- func (t FetchRefspecTemplate) MakeLocalRefspecWithName(name string) git.ReferenceName
- func (t FetchRefspecTemplate) MakeRemoteRefspecWithName(name string) git.ReferenceName
- func (t FetchRefspecTemplate) String() string
- type FloatProperty
- type Group
- type IntProperty
- type KeyTemplate
- type Property
- type PropertyAccess
- type Remote
- type RemoteAndBranch
- type Remotes
- type StringProperty
- type UserProperties
- func (inst *UserProperties) AuthorEmail() StringProperty
- func (inst *UserProperties) AuthorName() StringProperty
- func (inst *UserProperties) CommitterEmail() StringProperty
- func (inst *UserProperties) CommitterName() StringProperty
- func (inst *UserProperties) UserEmail() StringProperty
- func (inst *UserProperties) UserName() StringProperty
- func (inst *UserProperties) UserSigningKey() StringProperty
- func (inst *UserProperties) UserUseConfigOnly() BooleanProperty
Constants ¶
const NamePlaceholder = "<name>"
NamePlaceholder 名称占位符
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BooleanProperty ¶
BooleanProperty ...
type Branch ¶ added in v0.0.7
type Branch struct { Name string Exists bool Merge string // ='refs/heads/main' Remote string // the remote name PushRemote string Description string }
Branch 表示 config["branch.<name>.*"]
type ConfigIndex ¶ added in v0.0.7
type ConfigIndex interface { GetConfig() repositories.Config ListClasses() []string ListNames(aClass string) []string // key like 'a.b.*' Contains(key string) bool }
ConfigIndex ... [aaa.bbb.ccc] is [<class>.<name>.<field>]
type ConfigLoader ¶ added in v0.0.7
type ConfigLoader struct { }
ConfigLoader ...
func (*ConfigLoader) GetIndex ¶ added in v0.0.7
func (inst *ConfigLoader) GetIndex(cfg repositories.Config) ConfigIndex
GetIndex ...
func (*ConfigLoader) LoadBranch ¶ added in v0.0.7
func (inst *ConfigLoader) LoadBranch(cfg repositories.Config, name string) *Branch
LoadBranch ...
func (*ConfigLoader) LoadCore ¶ added in v0.0.7
func (inst *ConfigLoader) LoadCore(cfg repositories.Config) *Core
LoadCore ...
func (*ConfigLoader) LoadRemote ¶ added in v0.0.7
func (inst *ConfigLoader) LoadRemote(cfg repositories.Config, name string) *Remote
LoadRemote ...
type FetchRefspecTemplate ¶ added in v0.0.7
type FetchRefspecTemplate string
FetchRefspecTemplate 表示一个 fetch 模板, like '+refs/heads/*:refs/remotes/origin/*', default key='remote.<name>.fetch'
func (FetchRefspecTemplate) GetLocalTemplate ¶ added in v0.0.7
func (t FetchRefspecTemplate) GetLocalTemplate() string
GetLocalTemplate ...
func (FetchRefspecTemplate) GetRemoteTemplate ¶ added in v0.0.7
func (t FetchRefspecTemplate) GetRemoteTemplate() string
GetRemoteTemplate ...
func (FetchRefspecTemplate) MakeLocalRefspecWithName ¶ added in v0.0.7
func (t FetchRefspecTemplate) MakeLocalRefspecWithName(name string) git.ReferenceName
MakeLocalRefspecWithName ...
func (FetchRefspecTemplate) MakeRemoteRefspecWithName ¶ added in v0.0.7
func (t FetchRefspecTemplate) MakeRemoteRefspecWithName(name string) git.ReferenceName
MakeRemoteRefspecWithName ...
func (FetchRefspecTemplate) String ¶ added in v0.0.7
func (t FetchRefspecTemplate) String() string
type FloatProperty ¶
FloatProperty ...
type KeyTemplate ¶
type KeyTemplate string
KeyTemplate 表示仓库配置的属性名模板
const ( BranchSort KeyTemplate = "branch.sort" BranchNameRemote KeyTemplate = "branch.<name>.remote" BranchNamePushRemote KeyTemplate = "branch.<name>.pushRemote" BranchNameMerge KeyTemplate = "branch.<name>.merge" BranchNameMergeOptions KeyTemplate = "branch.<name>.mergeOptions" BranchNameRebase KeyTemplate = "branch.<name>.rebase" BranchNameDescription KeyTemplate = "branch.<name>.description" )
定义仓库配置名称 (branch.*)
const ( CoreLogAllRefUpdates KeyTemplate = "core.logAllRefUpdates" CoreSymlinks KeyTemplate = "core.symlinks" CoreIgnoreCase KeyTemplate = "core.ignoreCase" CoreBare KeyTemplate = "core.bare" CoreRepositoryFormatVersion KeyTemplate = "core.repositoryFormatVersion" CoreFileMode KeyTemplate = "core.fileMode" CoreCompressionAlgorithm KeyTemplate = "core.compressionAlgorithm" CoreDigestAlgorithm KeyTemplate = "core.digestAlgorithm" CoreObjectsPathPattern KeyTemplate = "core.objectsPathPattern" )
定义仓库配置名称 (core.*)
const ( RemoteNameURL KeyTemplate = "remote.<name>.url" RemoteNamePushURL KeyTemplate = "remote.<name>.pushurl" RemoteNameProxy KeyTemplate = "remote.<name>.proxy" RemoteNameFetch KeyTemplate = "remote.<name>.fetch" RemoteNamePush KeyTemplate = "remote.<name>.push" RemoteNameMirror KeyTemplate = "remote.<name>.mirror" )
定义仓库配置名称 (remote.*)
const ( AuthorName KeyTemplate = "author.name" AuthorEmail KeyTemplate = "author.email" CommitterName KeyTemplate = "committer.name" CommitterEmail KeyTemplate = "committer.email" UserName KeyTemplate = "user.name" UserEmail KeyTemplate = "user.email" UserUseConfigOnly KeyTemplate = "user.useConfigOnly" UserSigningKey KeyTemplate = "user.signingKey" )
定义仓库配置名称 (user.*)
func (KeyTemplate) String ¶ added in v0.0.3
func (kt KeyTemplate) String() string
type PropertyAccess ¶
type PropertyAccess interface { ForString(template KeyTemplate, id string, def string) StringProperty ForInt(template KeyTemplate, id string, def int) IntProperty ForBool(template KeyTemplate, id string, def bool) BooleanProperty ForFloat(template KeyTemplate, id string, def float64) FloatProperty }
PropertyAccess ...
type Remote ¶ added in v0.0.7
type Remote struct { Name string Exists bool URL string // ='git@github.com:example/example.git' Fetch string // ='+refs/heads/*:refs/remotes/origin/*' }
Remote 表示 config["remote.<name>.*"]
type RemoteAndBranch ¶ added in v0.0.7
RemoteAndBranch 表示一组相关的 remote-branches
type StringProperty ¶
StringProperty ...
type UserProperties ¶
type UserProperties struct {
// contains filtered or unexported fields
}
UserProperties ...
func (*UserProperties) AuthorEmail ¶
func (inst *UserProperties) AuthorEmail() StringProperty
AuthorEmail ...
func (*UserProperties) AuthorName ¶
func (inst *UserProperties) AuthorName() StringProperty
AuthorName ...
func (*UserProperties) CommitterEmail ¶
func (inst *UserProperties) CommitterEmail() StringProperty
CommitterEmail ...
func (*UserProperties) CommitterName ¶
func (inst *UserProperties) CommitterName() StringProperty
CommitterName ...
func (*UserProperties) UserEmail ¶
func (inst *UserProperties) UserEmail() StringProperty
UserEmail ...
func (*UserProperties) UserName ¶
func (inst *UserProperties) UserName() StringProperty
UserName ...
func (*UserProperties) UserSigningKey ¶
func (inst *UserProperties) UserSigningKey() StringProperty
UserSigningKey ...
func (*UserProperties) UserUseConfigOnly ¶
func (inst *UserProperties) UserUseConfigOnly() BooleanProperty
UserUseConfigOnly ...