sync

package
v0.2.0-preview2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateSource

func UpdateSource(sources []asset.AssetSource, newSource asset.AssetSource) []asset.AssetSource

UpdateSource updates or adds a source to an asset's sources

Types

type AssetSyncer

type AssetSyncer struct{}

func NewAssetSyncer

func NewAssetSyncer() *AssetSyncer

func (*AssetSyncer) ApplyConfig

func (s *AssetSyncer) ApplyConfig(existing, new *asset.Asset, rawConfig plugin.RawPluginConfig) *asset.Asset

ApplyConfig applies the plugin configuration to an asset

func (s *AssetSyncer) ProcessExternalLinks(ast *asset.Asset, links []plugin.ExternalLink) []asset.ExternalLink

type ChangeType

type ChangeType string
const (
	Created  ChangeType = "created"
	Updated  ChangeType = "updated"
	NoChange ChangeType = "no_change"
)

type Summary

type Summary struct {
	Assets        map[string]ChangeType
	Lineage       map[string]ChangeType
	Documentation map[string]ChangeType
}

Summary tracks the changes made during a sync operation

func (*Summary) CountByType

func (s *Summary) CountByType(items map[string]ChangeType, changeType ChangeType) int

CountByType counts the number of items with a specific change type

func (*Summary) Print

func (s *Summary) Print()

Print outputs a formatted summary of all changes

Jump to

Keyboard shortcuts

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