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

Function WithOCIAuth

pkg/attestation/crafter/crafter.go:112–122  ·  view source on GitHub ↗
(server, username, password string)

Source from the content-addressed store, hash-verified

110}
111
112func WithOCIAuth(server, username, password string) NewOpt {
113 return func(c *Crafter) error {
114 k, err := ociauth.NewCredentialsFromRegistry(server, username, password)
115 if err != nil {
116 return fmt.Errorf("failed to load OCI credentials: %w", err)
117 }
118
119 c.ociRegistryAuth = k
120 return nil
121 }
122}
123
124func WithNoStrictValidation(noStrictValidation bool) NewOpt {
125 return func(c *Crafter) error {

Callers 1

NewAttestationAddFunction · 0.92

Calls 1

Tested by

no test coverage detected