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

Method Validate

pkg/credentials/credentials.go:77–89  ·  view source on GitHub ↗

Validate that the OCIKeypair has all its properties set

()

Source from the content-addressed store, hash-verified

75
76// Validate that the OCIKeypair has all its properties set
77func (o *OCIKeypair) Validate() error {
78 if o.Repo == "" {
79 return fmt.Errorf("%w: missing repo", ErrValidation)
80 }
81 if o.Username == "" {
82 return fmt.Errorf("%w: missing username", ErrValidation)
83 }
84 if o.Password == "" {
85 return fmt.Errorf("%w: missing password", ErrValidation)
86 }
87
88 return nil
89}
90
91// Validate that the APICreds has all its properties set
92func (a *APICreds) Validate() error {

Callers 3

FromCredentialsMethod · 0.95
CreateOrUpdateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected