Documentation ¶
Overview ¶
Package validation implements the validation logic in LUCI Config.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExamineResult ¶
type ExamineResult struct { // MissingFiles are files that don't have the corresponding GCS objects. // // Use the attached signed URL to instruct client to upload the config // content. MissingFiles []struct { File File SignedURL string } // UnvalidatableFiles are files that no service can validate. // // Those files SHOULD not be included in the validation request. UnvalidatableFiles []File }
ExamineResult is the result of `Examine` method.
func (*ExamineResult) Passed ¶
func (er *ExamineResult) Passed() bool
Passed return True if the config files passed the examination and can proceed to `Validate`.
type File ¶
type File interface { // GetPath returns the relative path to the config file from config root. GetPath() string // GetGSPath returns the GCS path to where the config file is stored. // // The GCS object that the path points to SHOULD exist before calling // `Validate`. GetGSPath() gs.Path // GetRawContent returns the raw and uncompressed content of this config. // // This is currently used to validate the configs LUCI Config itself is // interested in and validate configs against legacy services. GetRawContent(context.Context) ([]byte, error) }
File defines the interface of a config file in validation.
type Validator ¶
type Validator struct { // GsClient is used to talk Google Cloud Storage GsClient clients.GsClient // Finder is used to find the services that can validate a given config files. Finder finder // SelfRuleSet is the RuleSet that validates the configs against LUCI Config // itself. SelfRuleSet *validation.RuleSet }
Validator validates config files backed Google Cloud Storage.
Click to show internal directories.
Click to hide internal directories.