declarative

package
v0.9.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Endpoints []*Endpoint `json:"endpoints"`
	Sources   []*Source   `json:"sources"`
}

Configuration declarative configuration

func (*Configuration) Init added in v0.7.0

func (cfg *Configuration) Init()

Init initializes entities

func (*Configuration) SchemaName added in v0.8.0

func (cfg *Configuration) SchemaName() string

func (*Configuration) Validate

func (cfg *Configuration) Validate() error

type Declarative

type Declarative struct {
	// contains filtered or unexported fields
}

func NewDeclarative

func NewDeclarative(db *db.DB) *Declarative

func (*Declarative) Dump

func (m *Declarative) Dump(ctx context.Context, wid string) (*Configuration, error)

func (*Declarative) Sync

func (m *Declarative) Sync(wid string, cfg *Configuration) error

type Endpoint

type Endpoint struct {
	entities.Endpoint `yaml:",inline"`
	Plugins           []*entities.Plugin `json:"plugins"`
}

func (*Endpoint) UnmarshalJSON

func (m *Endpoint) UnmarshalJSON(data []byte) error

type Source added in v0.7.0

type Source struct {
	entities.Source `yaml:",inline"`
	Plugins         []*entities.Plugin `json:"plugins"`
}

func (*Source) UnmarshalJSON added in v0.7.0

func (m *Source) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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