github.com/drone/runner-go@v1.12.0/registry/registry.go (about)

     1  // Copyright 2019 Drone.IO Inc. All rights reserved.
     2  // Use of this source code is governed by the Polyform License
     3  // that can be found in the LICENSE file.
     4  
     5  // Package registry provides registry credentials used
     6  // to pull private images from a registry.
     7  package registry
     8  
     9  import (
    10  	"context"
    11  
    12  	"github.com/drone/drone-go/drone"
    13  )
    14  
    15  // Request provides arguments for requesting a secret from
    16  // a secret Provider.
    17  type Request struct {
    18  	Repo  *drone.Repo
    19  	Build *drone.Build
    20  }
    21  
    22  // Provider is the interface that must be implemented by a
    23  // registry provider.
    24  type Provider interface {
    25  	// Find finds and returns a list of registry credentials.
    26  	List(context.Context, *Request) ([]*drone.Registry, error)
    27  }