github.com/drone/runner-go@v1.12.0/environ/provider/provider.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 provider provides environment variables to 6 // a pipeline. 7 package provider 8 9 import ( 10 "context" 11 12 "github.com/drone/drone-go/drone" 13 ) 14 15 // Request provides arguments for requesting a environment 16 // variables from an environment Provider. 17 type Request struct { 18 Repo *drone.Repo 19 Build *drone.Build 20 } 21 22 // Variable defines an environment variable. 23 type Variable struct { 24 Name string 25 Data string 26 Mask bool 27 } 28 29 // Provider is the interface that must be implemented by an 30 // environment provider. 31 type Provider interface { 32 // List returns a list of environment variables. 33 List(context.Context, *Request) ([]*Variable, error) 34 }