conf

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth added in v0.4.0

type Auth struct {
	TokenDuration time.Duration `yaml:"tokenDuration,omitempty" json:"tokenDuration,omitempty"`
}

type Branch added in v0.4.0

type Branch struct {
	Remote string `yaml:"remote,omitempty" json:"remote,omitempty"`
	Merge  string `yaml:"merge,omitempty" json:"merge,omitempty"`
}

type Config

type Config struct {
	User    *User              `yaml:"user,omitempty" json:"user,omitempty"`
	Remote  map[string]*Remote `yaml:"remote,omitempty" json:"remote,omitempty"`
	Receive *Receive           `yaml:"receive,omitempty" json:"receive,omitempty"`
	Branch  map[string]*Branch `yaml:"branch,omitempty" json:"branch,omitempty"`
	Auth    *Auth              `yaml:"auth,omitempty" json:"auth,omitempty"`
	Pack    *Pack              `yaml:"pack,omitempty" json:"pack,omitempty"`
}

func (*Config) MaxPackFileSize added in v0.4.0

func (c *Config) MaxPackFileSize() uint64

func (*Config) TokenDuration added in v0.4.0

func (c *Config) TokenDuration() time.Duration

type Pack added in v0.4.0

type Pack struct {
	// MaxFileSize is the maximum pack file size in bytes. Note that unlike in Git, pack format
	// is only used as a transport format during fetch and push. This size is pre-compression.
	MaxFileSize uint64 `yaml:"maxFileSize,omitempty" json:"maxFileSize,omitempty"`
}

type Receive added in v0.4.0

type Receive struct {
	DenyNonFastForwards *bool `yaml:"denyNonFastForwards,omitempty" json:"denyNonFastForwards,omitempty"`
	DenyDeletes         *bool `yaml:"denyDeletes,omitempty" json:"denyDeletes,omitempty"`
}

type Refspec

type Refspec struct {
	Force  bool
	Negate bool
	// contains filtered or unexported fields
}

func MustParseRefspec

func MustParseRefspec(s string) *Refspec

func NewRefspec

func NewRefspec(src, dst string, negate, force bool) (rs *Refspec, err error)

func ParseRefspec

func ParseRefspec(s string) (*Refspec, error)

func (*Refspec) Dst

func (s *Refspec) Dst() string

func (*Refspec) DstForRef

func (s *Refspec) DstForRef(p string) string

func (*Refspec) DstMatchRef

func (s *Refspec) DstMatchRef(r string) bool

func (*Refspec) Exclude

func (s *Refspec) Exclude(r string) bool

func (*Refspec) IsGlob

func (s *Refspec) IsGlob() bool

func (*Refspec) MarshalText

func (s *Refspec) MarshalText() (text []byte, err error)

func (*Refspec) Src

func (s *Refspec) Src() string

func (*Refspec) SrcMatchRef

func (s *Refspec) SrcMatchRef(r string) bool

func (*Refspec) String

func (s *Refspec) String() string

func (*Refspec) UnmarshalText

func (s *Refspec) UnmarshalText(text []byte) error

type Remote added in v0.4.0

type Remote struct {
	URL    string
	Fetch  []*Refspec `yaml:"fetch,omitempty" json:"fetch,omitempty"`
	Push   []*Refspec `yaml:"push,omitempty" json:"push,omitempty"`
	Mirror bool       `yaml:"mirror,omitempty" json:"mirror,omitempty"`
}

func (*Remote) FetchDstForRef added in v0.4.0

func (cr *Remote) FetchDstForRef(r string) string

func (*Remote) FetchDstMatchRef added in v0.4.0

func (cr *Remote) FetchDstMatchRef(r string) bool

type Store added in v0.4.0

type Store interface {
	Open() (*Config, error)
	Save(*Config) error
}

type User added in v0.4.0

type User struct {
	Email string `yaml:"email,omitempty" json:"email,omitempty"`
	Name  string `yaml:"name,omitempty" json:"name,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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