MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / Validate

Method Validate

pkg/credentials/credentials.go:92–100  ·  view source on GitHub ↗

Validate that the APICreds has all its properties set

()

Source from the content-addressed store, hash-verified

90
91// Validate that the APICreds has all its properties set
92func (a *APICreds) Validate() error {
93 if a.Host == "" {
94 return fmt.Errorf("%w: missing host", ErrValidation)
95 }
96 if a.Key == "" {
97 return fmt.Errorf("%w: missing key", ErrValidation)
98 }
99 return nil
100}
101
102type Role int64
103

Callers 9

TestValidateAPICredsFunction · 0.45
TestValidateOCIKeyPairFunction · 0.45
validateResourceFunction · 0.45
ValidateFindingFunction · 0.45
RenderMethod · 0.45
gracefulGitRepoHeadFunction · 0.45
addMaterialMethod · 0.45
CraftFunction · 0.45
ValidateCompleteMethod · 0.45

Calls

no outgoing calls

Tested by 2

TestValidateAPICredsFunction · 0.36
TestValidateOCIKeyPairFunction · 0.36