Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Source Source `mapstructure:"source"`
Target Target `mapstructure:"target"`
Defaults Defaults `mapstructure:"defaults"`
Repositories []Repository `mapstructure:"repositories"`
}
func LoadConfig ¶
LoadConfig loads the configuration using viper from the given file and returns the configuration object.
func (*Config) FilteredRepositories ¶
func (c *Config) FilteredRepositories(args []string) iter.Seq[Repository]
func (*Config) LabelledRepositories ¶ added in v0.6.0
func (c *Config) LabelledRepositories(labels []string) []Repository
func (*Config) ParseRepositorySpec ¶
func (*Config) RepositorySetFromArgs ¶
func (c *Config) RepositorySetFromArgs(args []string) RepositorySet
type Repository ¶
type Repository struct {
Owner string `mapstructure:"owner" yaml:"owner,omitempty"`
Name string `mapstructure:"name"`
Interval *time.Duration `mapstructure:"interval" yaml:"interval,omitempty"`
PublicSource *bool `mapstructure:"public-source" yaml:"public-source,omitempty"`
PublicTarget *bool `mapstructure:"public-target" yaml:"public-target,omitempty"`
Labels []string `mapstructure:"labels"`
}
func (*Repository) Failure ¶
func (r *Repository) Failure(err error) string
func (*Repository) String ¶
func (r *Repository) String() string
func (*Repository) Success ¶
func (r *Repository) Success(message ...string) string
type RepositorySet ¶
type RepositorySet map[string]struct{}
func (*RepositorySet) EmptyOrContains ¶
func (r *RepositorySet) EmptyOrContains(repo Repository) bool
type Source ¶
type Source struct {
Type string `mapstructure:"type" yaml:"type,omitempty" default:"gitea"`
Url string `mapstructure:"url" yaml:"url,omitempty"`
RemoteUrl string `mapstructure:"remote-url" yaml:"remote-url,omitempty"`
Token string `mapstructure:"token" yaml:"-"`
}
Source may be either GitHub or Gitea
func (*Source) GetRemoteUrl ¶
Click to show internal directories.
Click to hide internal directories.