Documentation ¶
Index ¶
- Constants
- type Backend
- func (b *Backend) CheckWritePermissions(ctx context.Context) error
- func (b *Backend) Describe(ctx context.Context, digest string) (*pb.CASResource, error)
- func (b *Backend) Download(ctx context.Context, w io.Writer, digest string) error
- func (b *Backend) Exists(ctx context.Context, digest string) (bool, error)
- func (b *Backend) Upload(ctx context.Context, r io.Reader, resource *pb.CASResource) error
- type BackendProvider
- type Credentials
Constants ¶
View Source
const ProviderID = "AzureBlob"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func NewBackend ¶
func NewBackend(creds *Credentials) (*Backend, error)
func (*Backend) CheckWritePermissions ¶
CheckWritePermissions performs an actual write to the repository to check that the credentials
type BackendProvider ¶
type BackendProvider struct {
// contains filtered or unexported fields
}
func NewBackendProvider ¶
func NewBackendProvider(cReader credentials.Reader) *BackendProvider
func (*BackendProvider) FromCredentials ¶
func (p *BackendProvider) FromCredentials(ctx context.Context, secretName string) (backend.UploaderDownloader, error)
func (*BackendProvider) ID ¶
func (p *BackendProvider) ID() string
func (*BackendProvider) ValidateAndExtractCredentials ¶
func (p *BackendProvider) ValidateAndExtractCredentials(location string, credsJSON []byte) (any, error)
type Credentials ¶
type Credentials struct { // Storage Account Name StorageAccountName string // Storage Account Container Container string // Active Directory Tenant ID TenantID string // Registered application / service principal client ID ClientID string // Registered application / service principal client secret ClientSecret string }
func (*Credentials) Validate ¶
func (c *Credentials) Validate() error
Validate that the APICreds has all its properties set
Click to show internal directories.
Click to hide internal directories.