create

package
v0.0.0-...-33f46c0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRDParserService

type CRDParserService interface {
	IsCRDClusterScoped(crPath, manifestPath string) (bool, error)
}

type ComponentArchiveService

type ComponentArchiveService interface {
	CreateComponentArchive(componentDescriptor *compdesc.ComponentDescriptor) (*comparch.ComponentArchive,
		error)
	AddModuleResourcesToArchive(componentArchive componentarchive.ComponentArchive,
		moduleResources []componentdescriptor.Resource) error
}

type FileResolver

type FileResolver interface {
	Resolve(file string) (string, error)
	CleanupTempFiles() []error
}

type FileSystem

type FileSystem interface {
	ReadFile(path string) ([]byte, error)
}

type GitSourcesService

type GitSourcesService interface {
	AddGitSources(componentDescriptor *compdesc.ComponentDescriptor, gitRepoURL, moduleVersion string) error
}

type ModuleConfigService

type ModuleConfigService interface {
	ParseAndValidateModuleConfig(moduleConfigFile string) (*contentprovider.ModuleConfig, error)
}

type ModuleTemplateService

type ModuleTemplateService interface {
	GenerateModuleTemplate(moduleConfig *contentprovider.ModuleConfig,
		descriptor *compdesc.ComponentDescriptor,
		data []byte,
		isCrdClusterScoped bool,
		templateOutput string) error
}

type Options

type Options struct {
	Out                  iotools.Out
	ConfigFile           string
	Credentials          string
	Insecure             bool
	TemplateOutput       string
	RegistryURL          string
	RegistryCredSelector string
}

func (Options) Validate

func (opts Options) Validate() error

type RegistryService

type RegistryService interface {
	PushComponentVersion(archive *comparch.ComponentArchive, insecure bool, credentials, registryURL string) error
	GetComponentVersion(archive *comparch.ComponentArchive, insecure bool,
		userPasswordCreds, registryURL string) (cpi.ComponentVersionAccess, error)
}

type SecurityConfigService

type SecurityConfigService interface {
	ParseSecurityConfigData(securityConfigFile string) (*contentprovider.SecurityScanConfig, error)
	AppendSecurityScanConfig(descriptor *compdesc.ComponentDescriptor,
		securityConfig contentprovider.SecurityScanConfig) error
}

type Service

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

func NewService

func NewService(moduleConfigService ModuleConfigService,
	gitSourcesService GitSourcesService,
	securityConfigService SecurityConfigService,
	componentArchiveService ComponentArchiveService,
	registryService RegistryService,
	moduleTemplateService ModuleTemplateService,
	crdParserService CRDParserService,
	manifestFileResolver FileResolver,
	defaultCRFileResolver FileResolver,
	fileSystem FileSystem,
) (*Service, error)

func (*Service) Run

func (s *Service) Run(opts Options) error

Jump to

Keyboard shortcuts

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