This repository was archived by the owner on Apr 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11module github.com/oras-project/oras-credentials-go
22
33go 1.19
4+
5+ require oras.land/oras-go/v2 v2.0.2
6+
7+ require golang.org/x/sync v0.1.0 // indirect
Original file line number Diff line number Diff line change 1+ golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o =
2+ golang.org/x/sync v0.1.0 /go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM =
3+ oras.land/oras-go/v2 v2.0.2 h1:3aSQdJ7EUC0ft2e9PjJB9Jzastz5ojPA4LzZ3Q4YbUc =
4+ oras.land/oras-go/v2 v2.0.2 /go.mod h1:PWnWc/Kyyg7wUTUsDHshrsJkzuxXzreeMd6NrfdnFSo =
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright The ORAS Authors.
3+ Licensed under the Apache License, Version 2.0 (the "License");
4+ you may not use this file except in compliance with the License.
5+ You may obtain a copy of the License at
6+
7+ http://www.apache.org/licenses/LICENSE-2.0
8+
9+ Unless required by applicable law or agreed to in writing, software
10+ distributed under the License is distributed on an "AS IS" BASIS,
11+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ See the License for the specific language governing permissions and
13+ limitations under the License.
14+ */
15+
16+ package credentials
17+
18+ import (
19+ "context"
20+
21+ "oras.land/oras-go/v2/registry/remote/auth"
22+ )
23+
24+ // Store is the interface that any credentials store must implement.
25+ type Store interface {
26+ // Get retrieves credentials from the store for the given server address.
27+ Get (ctx context.Context , serverAddress string ) (auth.Credential , error )
28+ // Put saves credentials into the store for the given server address.
29+ Put (ctx context.Context , serverAddress string , cred auth.Credential ) error
30+ // Delete removes credentials from the store for the given server address.
31+ Delete (ctx context.Context , serverAddress string ) error
32+ }
You can’t perform that action at this time.
0 commit comments