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

Function NewBackend

pkg/blobmanager/oci/backend.go:62–74  ·  view source on GitHub ↗
(repository string, regOpts *RegistryOptions, opts ...NewBackendOpt)

Source from the content-addressed store, hash-verified

60}
61
62func NewBackend(repository string, regOpts *RegistryOptions, opts ...NewBackendOpt) (*Backend, error) {
63 b := &Backend{
64 repo: repository,
65 prefix: backend.DefaultPrefix,
66 keychain: regOpts.Keychain,
67 }
68
69 for _, opt := range opts {
70 opt(b)
71 }
72
73 return b, nil
74}
75
76// Exists check that the artifact is already present in the repository and it points to the
77// same image digest, meaning it has not been re-pushed/replaced

Callers 5

FromCredentialsMethod · 0.70
TestUploadMethod · 0.70
TestNewBackendMethod · 0.70
SetupTestMethod · 0.70

Calls

no outgoing calls

Tested by 3

TestUploadMethod · 0.56
TestNewBackendMethod · 0.56
SetupTestMethod · 0.56