2020-11-25 19:44:45 +00:00
|
|
|
// Copyright (c) 2020, the Drone Plugins project authors.
|
2021-09-13 21:00:00 +00:00
|
|
|
// Copyright (c) 2021, Robert Kaussow <mail@thegeeklab.de>
|
|
|
|
|
2020-11-25 19:44:45 +00:00
|
|
|
// Use of this source code is governed by an Apache 2.0 license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
package plugin
|
|
|
|
|
|
|
|
import (
|
2022-05-29 11:54:52 +00:00
|
|
|
"github.com/thegeeklab/drone-plugin-lib/v2/drone"
|
2020-11-25 19:44:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Plugin implements drone.Plugin to provide the plugin implementation.
|
|
|
|
type Plugin struct {
|
|
|
|
settings Settings
|
|
|
|
pipeline drone.Pipeline
|
|
|
|
network drone.Network
|
|
|
|
}
|
|
|
|
|
|
|
|
// New initializes a plugin from the given Settings, Pipeline, and Network.
|
2023-02-08 09:14:07 +00:00
|
|
|
func New(settings Settings, pipeline drone.Pipeline, network drone.Network) *Plugin {
|
2020-11-25 19:44:45 +00:00
|
|
|
return &Plugin{
|
|
|
|
settings: settings,
|
|
|
|
pipeline: pipeline,
|
|
|
|
network: network,
|
|
|
|
}
|
|
|
|
}
|