config

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Org  string
	Repo string
}

type Config

type Config struct {
	Base          *Base
	GitLabBaseURL string `yaml:"gitlab_base_url"`
	Vars          map[string]interface{}
	Templates     map[string]string
	Post          map[string]*PostConfig
	Exec          map[string][]*ExecConfig
	Hide          map[string]string
	SkipNoToken   bool `yaml:"skip_no_token"`
	Silent        bool
}

type ExecConfig

type ExecConfig struct {
	When               string
	Template           string
	TemplateForTooLong string   `yaml:"template_for_too_long"`
	DontComment        bool     `yaml:"dont_comment"`
	EmbeddedVarNames   []string `yaml:"embedded_var_names"`
	UpdateCondition    string   `yaml:"update"`
}

type ExistFile

type ExistFile func(string) bool

type PostConfig

type PostConfig struct {
	Template           string
	TemplateForTooLong string
	EmbeddedVarNames   []string
	// UpdateCondition Update the comment that matches with the condition.
	// If multiple comments match, the latest comment is updated
	// If no comment matches, aa new comment is created
	UpdateCondition string
}

func (*PostConfig) UnmarshalYAML

func (pc *PostConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

type Reader

type Reader struct {
	ExistFile ExistFile
}

func (*Reader) FindAndRead

func (reader *Reader) FindAndRead(cfgPath, wd string) (*Config, error)

Jump to

Keyboard shortcuts

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