productprovider

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextKeyLabel       nautesctx.ContextKey = "productprovider.syncer.label"
	ContextKeyConfig      nautesctx.ContextKey = "productprovider.syncer.config"
	ContextKeyListOptions nautesctx.ContextKey = "productprovider.syncer.listopts"
)

Variables

View Source
var ProductProviders = map[string]ProviderFacotry{}

Functions

func FromSyncContext

func FromSyncContext(ctx context.Context) (*nautescfg.Config, map[string]string, []client.ListOption, error)

func NewSyncContext

func NewSyncContext(ctx context.Context, cfg nautescfg.Config, label map[string]string, listOpts []client.ListOption) context.Context

Types

type MockProductProvider

type MockProductProvider struct {
	ProductList []nautescrd.Product
	ProductMeta baseinterface.ProductMeta
	Provider    baseinterface.CodeRepoProvider
}
var MockProvider *MockProductProvider

func (*MockProductProvider) GetCodeRepoProvider

func (p *MockProductProvider) GetCodeRepoProvider(ctx context.Context) (baseinterface.CodeRepoProvider, error)

func (*MockProductProvider) GetProductMeta

func (*MockProductProvider) GetProducts

func (p *MockProductProvider) GetProducts() ([]nautescrd.Product, error)

type MockProductProviderFactory

type MockProductProviderFactory struct{}

func (*MockProductProviderFactory) GetProvider

type ProductProviderSyncer

type ProductProviderSyncer struct {
	NautesConfig nautescfg.NautesConfigs
	Rest         *rest.Config
	// contains filtered or unexported fields
}

func (*ProductProviderSyncer) Setup

func (s *ProductProviderSyncer) Setup() error

func (*ProductProviderSyncer) Sync

func (s *ProductProviderSyncer) Sync(ctx context.Context, productProvider nautescrd.ProductProvider) error

type ProviderFacotry

type ProviderFacotry interface {
	GetProvider(ctx context.Context, name string, k8s client.Client, cfg nautescfg.Config) (baseinterface.ProductProvider, error)
}

Jump to

Keyboard shortcuts

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