config

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	KindText          = "text"
	KindNumber        = "number"
	KindBoolean       = "boolean"
	KindReference     = "reference"
	KindService       = "service"
	KindGroup         = "group"
	KindFunctionality = "functionality"
	KindEnvironment   = "environment"
	KindIncidentType  = "incident_type"
	KindCause         = "cause"
	KindUser          = "user"
	KindSlackChannel  = "slack_channel"
	KindSlackAlias    = "slack_alias"
)

Variables

This section is empty.

Functions

func Marshal added in v0.3.0

func Marshal(cfg *Config) ([]byte, error)

func Validate

func Validate(cfg *Config) error

Types

type BackstageSourceConfig

type BackstageSourceConfig struct {
	URL     string   `yaml:"url" json:"url" hcl:"url"`
	Token   string   `yaml:"token,omitempty" json:"token,omitempty" hcl:"token,optional"`
	Filter  string   `yaml:"filter,omitempty" json:"filter,omitempty" hcl:"filter,optional"`
	Filters []string `yaml:"filters,omitempty" json:"filters,omitempty" hcl:"filters,optional"`
	Kind    string   `yaml:"kind,omitempty" json:"kind,omitempty" hcl:"kind,optional"`
}

type CSVSourceConfig

type CSVSourceConfig struct {
	Files     []string `yaml:"files" json:"files" hcl:"files"`
	Delimiter string   `yaml:"delimiter,omitempty" json:"delimiter,omitempty" hcl:"delimiter,optional"`
}

type Config

type Config struct {
	Version   int        `yaml:"version" json:"version" hcl:"version"`
	SyncID    string     `yaml:"sync_id" json:"sync_id" hcl:"sync_id"`
	Pipelines []Pipeline `yaml:"pipelines" json:"pipelines" hcl:"pipeline,block"`
}

func Load

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

type ExecSourceConfig

type ExecSourceConfig struct {
	Command string   `yaml:"command" json:"command" hcl:"command"`
	Args    []string `yaml:"args,omitempty" json:"args,omitempty" hcl:"args,optional"`
}

type FieldValue added in v0.3.0

type FieldValue struct {
	Value   string `yaml:"value" json:"value" hcl:"value"`
	Kind    string `yaml:"kind,omitempty" json:"kind,omitempty" hcl:"kind,optional"`
	Catalog string `yaml:"catalog,omitempty" json:"catalog,omitempty" hcl:"catalog,optional"`
}

func (FieldValue) EffectiveKind added in v0.3.0

func (f FieldValue) EffectiveKind() string

func (FieldValue) MarshalJSON added in v0.3.0

func (f FieldValue) MarshalJSON() ([]byte, error)

func (FieldValue) MarshalYAML added in v0.3.0

func (f FieldValue) MarshalYAML() (any, error)

func (*FieldValue) UnmarshalJSON added in v0.3.0

func (f *FieldValue) UnmarshalJSON(data []byte) error

func (*FieldValue) UnmarshalYAML added in v0.3.0

func (f *FieldValue) UnmarshalYAML(node *yaml.Node) error

type GitHubSourceConfig

type GitHubSourceConfig struct {
	Token    string   `yaml:"token,omitempty" json:"token,omitempty" hcl:"token,optional"`
	Owner    string   `yaml:"owner" json:"owner" hcl:"owner"`
	Repos    []string `yaml:"repos,omitempty" json:"repos,omitempty" hcl:"repos,optional"`
	Files    []string `yaml:"files" json:"files" hcl:"files"`
	Ref      string   `yaml:"ref,omitempty" json:"ref,omitempty" hcl:"ref,optional"`
	Archived bool     `yaml:"archived,omitempty" json:"archived,omitempty" hcl:"archived,optional"`
}

type GraphQLSourceConfig

type GraphQLSourceConfig struct {
	URL      string            `yaml:"url" json:"url" hcl:"url"`
	Query    string            `yaml:"query" json:"query" hcl:"query"`
	Headers  map[string]string `yaml:"headers,omitempty" json:"headers,omitempty" hcl:"headers,optional"`
	Result   string            `yaml:"result" json:"result" hcl:"result"`
	Paginate *PaginateConfig   `yaml:"paginate,omitempty" json:"paginate,omitempty" hcl:"paginate,block"`
}

type HTTPSourceConfig

type HTTPSourceConfig struct {
	URL     string            `yaml:"url" json:"url" hcl:"url"`
	Method  string            `yaml:"method,omitempty" json:"method,omitempty" hcl:"method,optional"`
	Headers map[string]string `yaml:"headers,omitempty" json:"headers,omitempty" hcl:"headers,optional"`
	Body    string            `yaml:"body,omitempty" json:"body,omitempty" hcl:"body,optional"`
	Result  string            `yaml:"result" json:"result" hcl:"result"`
}

type InlineSourceConfig

type InlineSourceConfig struct {
	Entries []map[string]any `yaml:"entries" json:"entries" hcl:"entries"`
}

type LocalSourceConfig

type LocalSourceConfig struct {
	Files []string `yaml:"files" json:"files" hcl:"files"`
}

type Output

type Output struct {
	Type        string                `yaml:"type,omitempty" json:"type,omitempty" hcl:"type,optional"`
	Catalog     string                `yaml:"catalog" json:"catalog" hcl:"catalog"`
	ExternalID  string                `yaml:"external_id" json:"external_id" hcl:"external_id"`
	Name        string                `yaml:"name" json:"name" hcl:"name"`
	BackstageID string                `yaml:"backstage_id,omitempty" json:"backstage_id,omitempty" hcl:"backstage_id,optional"`
	Fields      map[string]FieldValue `yaml:"fields,omitempty" json:"fields,omitempty" hcl:"fields,optional"`
}

type PaginateConfig

type PaginateConfig struct {
	Mode       string `yaml:"mode" json:"mode" hcl:"mode"`
	PageSize   int    `yaml:"page_size" json:"page_size" hcl:"page_size"`
	CursorPath string `yaml:"cursor_path,omitempty" json:"cursor_path,omitempty" hcl:"cursor_path,optional"`
}

type Pipeline

type Pipeline struct {
	Sources []SourceConfig `yaml:"sources" json:"sources" hcl:"source,block"`
	Outputs []Output       `yaml:"outputs" json:"outputs" hcl:"output,block"`
}

type SourceConfig

type SourceConfig struct {
	Local     *LocalSourceConfig     `yaml:"local,omitempty" json:"local,omitempty" hcl:"local,block"`
	Inline    *InlineSourceConfig    `yaml:"inline,omitempty" json:"inline,omitempty" hcl:"inline,block"`
	GitHub    *GitHubSourceConfig    `yaml:"github,omitempty" json:"github,omitempty" hcl:"github,block"`
	Exec      *ExecSourceConfig      `yaml:"exec,omitempty" json:"exec,omitempty" hcl:"exec,block"`
	Backstage *BackstageSourceConfig `yaml:"backstage,omitempty" json:"backstage,omitempty" hcl:"backstage,block"`
	GraphQL   *GraphQLSourceConfig   `yaml:"graphql,omitempty" json:"graphql,omitempty" hcl:"graphql,block"`
	CSV       *CSVSourceConfig       `yaml:"csv,omitempty" json:"csv,omitempty" hcl:"csv,block"`
	URL       *URLSourceConfig       `yaml:"url,omitempty" json:"url,omitempty" hcl:"url,block"`
	HTTP      *HTTPSourceConfig      `yaml:"http,omitempty" json:"http,omitempty" hcl:"http,block"`
}

type URLSourceConfig

type URLSourceConfig struct {
	URLs    []string          `yaml:"urls" json:"urls" hcl:"urls"`
	Headers map[string]string `yaml:"headers,omitempty" json:"headers,omitempty" hcl:"headers,optional"`
}

Jump to

Keyboard shortcuts

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