woodpecker/pipeline/backend/docker/backend_options.go
qwerty287 81b74025d4
Update Go imports paths (#4605)
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2024-12-22 10:44:34 +01:00

21 lines
545 B
Go

package docker
import (
"github.com/go-viper/mapstructure/v2"
backend "go.woodpecker-ci.org/woodpecker/v3/pipeline/backend/types"
)
// BackendOptions defines all the advanced options for the docker backend.
type BackendOptions struct {
User string `mapstructure:"user"`
}
func parseBackendOptions(step *backend.Step) (BackendOptions, error) {
var result BackendOptions
if step == nil || step.BackendOptions == nil {
return result, nil
}
err := mapstructure.WeakDecode(step.BackendOptions[EngineName], &result)
return result, err
}