config

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteExample

func WriteExample(path string, force bool) error

Types

type File

type File struct {
	DefaultTarget string            `yaml:"default_target,omitempty"`
	DefaultLabels []string          `yaml:"default_labels,omitempty"`
	Targets       map[string]Target `yaml:"targets"`
}

func Load

func Load(path string) (*File, error)

func (*File) ResolveTarget added in v0.16.1

func (f *File) ResolveTarget(explicit string) (string, Target, error)

ResolveTarget selects a publication target using an explicit name, the configured default, or the sole configured target, in that order.

type GitHubTarget

type GitHubTarget struct {
	Owner             string                     `yaml:"owner" json:"owner"`
	Repository        string                     `yaml:"repository" json:"repository"`
	APIURL            string                     `yaml:"api_url,omitempty" json:"api_url,omitempty"`
	KindLabels        map[domain.ItemKind]string `yaml:"kind_labels,omitempty" json:"kind_labels,omitempty"`
	HierarchyFallback string                     `yaml:"hierarchy_fallback,omitempty" json:"hierarchy_fallback,omitempty"`
}

type JiraTarget

type JiraTarget struct {
	BaseURL           string                     `yaml:"base_url" json:"base_url"`
	ProjectKey        string                     `yaml:"project_key" json:"project_key"`
	KindMapping       map[domain.ItemKind]string `yaml:"kind_mapping" json:"kind_mapping"`
	HierarchyFallback string                     `yaml:"hierarchy_fallback,omitempty" json:"hierarchy_fallback,omitempty"`
}

type Target

type Target struct {
	Provider string        `yaml:"provider" json:"provider"`
	Jira     *JiraTarget   `yaml:"jira,omitempty" json:"jira,omitempty"`
	GitHub   *GitHubTarget `yaml:"github,omitempty" json:"github,omitempty"`
}

func (Target) Validate

func (t Target) Validate() error

Jump to

Keyboard shortcuts

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