source

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackstageSource

type BackstageSource struct {
	URL    string
	Token  string
	Filter string
	Kind   string
}

func NewBackstageSource

func NewBackstageSource(cfg *config.BackstageSourceConfig) *BackstageSource

func (*BackstageSource) Load

func (s *BackstageSource) Load(ctx context.Context) ([]Entry, error)

func (*BackstageSource) Name

func (s *BackstageSource) Name() string

type CSVSource

type CSVSource struct {
	Files     []string
	Delimiter rune
	BaseDir   string
}

func NewCSVSource

func NewCSVSource(files []string, delimiter string, baseDir string) *CSVSource

func (*CSVSource) Load

func (s *CSVSource) Load(ctx context.Context) ([]Entry, error)

func (*CSVSource) Name

func (s *CSVSource) Name() string

type Entry

type Entry map[string]any

func Parse

func Parse(data []byte) ([]Entry, error)

type ExecSource

type ExecSource struct {
	Command string
	Args    []string
}

func NewExecSource

func NewExecSource(command string, args []string) *ExecSource

func (*ExecSource) Load

func (s *ExecSource) Load(ctx context.Context) ([]Entry, error)

func (*ExecSource) Name

func (s *ExecSource) Name() string

type GitHubSource

type GitHubSource struct {
	Token           string
	Owner           string
	Repos           []string
	Files           []string
	Ref             string
	IncludeArchived bool
}

func NewGitHubSource

func NewGitHubSource(cfg *config.GitHubSourceConfig) *GitHubSource

func (*GitHubSource) Load

func (s *GitHubSource) Load(ctx context.Context) ([]Entry, error)

func (*GitHubSource) Name

func (s *GitHubSource) Name() string

type GraphQLSource

type GraphQLSource struct {
	URL      string
	Query    string
	Headers  map[string]string
	Result   string
	Paginate *config.PaginateConfig
}

func NewGraphQLSource

func NewGraphQLSource(cfg *config.GraphQLSourceConfig) *GraphQLSource

func (*GraphQLSource) Load

func (s *GraphQLSource) Load(ctx context.Context) ([]Entry, error)

func (*GraphQLSource) Name

func (s *GraphQLSource) Name() string

type HTTPSource

type HTTPSource struct {
	URL     string
	Method  string
	Headers map[string]string
	Body    string
	Result  string
}

func NewHTTPSource

func NewHTTPSource(cfg *config.HTTPSourceConfig) *HTTPSource

func (*HTTPSource) Load

func (s *HTTPSource) Load(ctx context.Context) ([]Entry, error)

func (*HTTPSource) Name

func (s *HTTPSource) Name() string

type InlineSource

type InlineSource struct {
	Entries []map[string]any
}

func NewInlineSource

func NewInlineSource(entries []map[string]any) *InlineSource

func (*InlineSource) Load

func (s *InlineSource) Load(ctx context.Context) ([]Entry, error)

func (*InlineSource) Name

func (s *InlineSource) Name() string

type LocalSource

type LocalSource struct {
	Files   []string
	BaseDir string
}

func NewLocalSource

func NewLocalSource(files []string, baseDir string) *LocalSource

func (*LocalSource) Load

func (s *LocalSource) Load(ctx context.Context) ([]Entry, error)

func (*LocalSource) Name

func (s *LocalSource) Name() string

type Source

type Source interface {
	Name() string
	Load(ctx context.Context) ([]Entry, error)
}

func FromConfig

func FromConfig(cfg config.SourceConfig, baseDir string) (Source, error)

type URLSource

type URLSource struct {
	URLs    []string
	Headers map[string]string
}

func NewURLSource

func NewURLSource(cfg *config.URLSourceConfig) *URLSource

func (*URLSource) Load

func (s *URLSource) Load(ctx context.Context) ([]Entry, error)

func (*URLSource) Name

func (s *URLSource) Name() string

Jump to

Keyboard shortcuts

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