woodpecker-docker-buildx/plugin/plugin.go
6543 fca44ab7ae Fix func to determine default login (#29)
only add default login if auth profided or no login entry exist

Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/29
Reviewed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-10-11 11:38:36 +02:00

29 lines
670 B
Go

package plugin
import (
"github.com/drone-plugins/drone-plugin-lib/drone"
)
// 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.
func New(settings Settings, pipeline drone.Pipeline, network drone.Network) drone.Plugin {
return &Plugin{
settings: &settings,
pipeline: pipeline,
network: network,
}
}
// newSettingsOnly initializes a plugin from the given Settings only.
func newSettingsOnly(settings *Settings) drone.Plugin {
return &Plugin{
settings: settings,
}
}