You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
runner-go/secret/secret.go

30 lines
742 B
Go

// Copyright 2019 Drone.IO Inc. All rights reserved.
// Use of this source code is governed by the Polyform License
// that can be found in the LICENSE file.
// Package secret provides secrets to a pipeline.
package secret
import (
"context"
"git.awesome-for.me/liuzhiguo/drone-go/drone"
"git.awesome-for.me/liuzhiguo/runner-go/manifest"
)
// Request provides arguments for requesting a secret from
// a secret Provider.
type Request struct {
Name string
Repo *drone.Repo
Build *drone.Build
Conf *manifest.Manifest
}
// Provider is the interface that must be implemented by a
// secret provider.
type Provider interface {
// Find finds and returns a requested secret.
Find(context.Context, *Request) (*drone.Secret, error)
}