checker

package
v0.11.0-alpha.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	Check(pkg.KclPkg) error
}

Checker defines an interface for checking KclPkg dependencies.

type IdentChecker

type IdentChecker struct{}

IdentChecker validates the dependencies name in kclPkg.

func NewIdentChecker added in v0.11.0

func NewIdentChecker() *IdentChecker

NewIdentChecker creates a new IdentChecker.

func (*IdentChecker) Check

func (ic *IdentChecker) Check(kclPkg pkg.KclPkg) error

type ModChecker added in v0.11.0

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

ModChecker is responsible for running multiple checkers on a KCL module.

func NewModChecker added in v0.11.0

func NewModChecker(options ...ModCheckerOption) *ModChecker

NewModChecker creates a new ModChecker with options.

func (*ModChecker) AddChecker added in v0.11.0

func (mc *ModChecker) AddChecker(checker Checker)

func (*ModChecker) Check added in v0.11.0

func (mc *ModChecker) Check(kclPkg pkg.KclPkg) error

Check runs all individual checks for a kclPkg.

func (*ModChecker) CheckersSize added in v0.11.0

func (mc *ModChecker) CheckersSize() int

type ModCheckerOption added in v0.11.0

type ModCheckerOption func(*ModChecker)

ModCheckerOption configures how we set up ModChecker.

func WithChecker added in v0.11.0

func WithChecker(checker Checker) ModCheckerOption

WithChecker adds a single Checker to ModChecker.

func WithCheckers added in v0.11.0

func WithCheckers(checkers ...Checker) ModCheckerOption

WithCheckers adds multiple Checkers to ModChecker.

type SumChecker

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

SumChecker validates the dependencies sum in kclPkg.

func NewSumChecker added in v0.11.0

func NewSumChecker(options ...SumCheckerOption) *SumChecker

NewSumChecker creates a new SumChecker with options.

func (*SumChecker) Check

func (sc *SumChecker) Check(kclPkg pkg.KclPkg) error

Check verifies the checksums of the dependencies in the KclPkg.

func (*SumChecker) FetchOciManifestIntoJsonStr added in v0.11.0

func (sc *SumChecker) FetchOciManifestIntoJsonStr(opts opt.OciFetchOptions) (string, error)

FetchOciManifestIntoJsonStr fetches the OCI manifest and returns it as a JSON string.

func (*SumChecker) GetCredentials added in v0.11.0

func (sc *SumChecker) GetCredentials(hostName string) (*remoteauth.Credential, error)

GetCredentials retrieves the OCI credentials for the given hostname.

type SumCheckerOption added in v0.11.0

type SumCheckerOption func(*SumChecker)

SumCheckerOption configures how we set up SumChecker.

func WithSettings added in v0.11.0

func WithSettings(settings settings.Settings) SumCheckerOption

WithSettings sets the settings for SumChecker.

type VersionChecker

type VersionChecker struct{}

VersionChecker validates the dependencies version in kclPkg.

func NewVersionChecker added in v0.11.0

func NewVersionChecker() *VersionChecker

NewVersionChecker creates a new VersionChecker.

func (*VersionChecker) Check

func (vc *VersionChecker) Check(kclPkg pkg.KclPkg) error

Jump to

Keyboard shortcuts

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