reconcile

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Entries

func Entries(ctx context.Context, logger kitlog.Logger, cl EntriesClient, catalogType *client.CatalogTypeV2, entryModels []*output.CatalogEntryModel, progress *EntriesProgress) error

func GetEntries added in v0.13.0

func GetEntries(ctx context.Context, cl *client.ClientWithResponses, catalogTypeID string) (catalogType *client.CatalogTypeV2, entries []client.CatalogEntryV2, err error)

GetEntries paginates through all catalog entries for the given type.

Types

type EntriesClient added in v0.13.0

type EntriesClient struct {
	GetEntries func(ctx context.Context, catalogTypeID string) (*client.CatalogTypeV2, []client.CatalogEntryV2, error)
	Delete     func(ctx context.Context, entry *client.CatalogEntryV2) error
	Create     func(ctx context.Context, payload client.CreateEntryRequestBody) (*client.CatalogEntryV2, error)
	Update     func(ctx context.Context, entry *client.CatalogEntryV2, payload client.UpdateEntryRequestBody) (*client.CatalogEntryV2, error)
}

func EntriesClientFromClient added in v0.13.0

func EntriesClientFromClient(cl *client.ClientWithResponses) EntriesClient

EntriesClientFromClient wraps a real client with hooks that can create, update and delete entries. This can be overriden for custom behaviour, such as a dry-run that shouldn't actually perform updates.

type EntriesProgress

type EntriesProgress struct {
	OnDeleteStart    func(total int)
	OnDeleteProgress func()
	OnCreateStart    func(total int)
	OnCreateProgress func()
	OnUpdateStart    func(total int)
	OnUpdateProgress func()
}

Jump to

Keyboard shortcuts

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