0
0
mirror of https://github.com/thegeeklab/wp-plugin-go.git synced 2024-11-22 00:20:38 +00:00

Add Context struct

This commit is contained in:
Don 2019-09-09 17:34:39 -07:00
parent a3ef97d454
commit c7b7745e10

View File

@ -8,23 +8,27 @@ package plugin
import "time"
type (
// BaseConfig is the common configuration for a plugin.
// Context contains information about the current execution context.
//
// The configuration organizes all the information available to a plugin
// executing as a step within a stage.
// The context organizes all the information available to a plugin executing
// as a step within a stage.
//
// Plugins can choose to compose this within their own config.
//
// import "github.com/drone-plugins/drone-plugin-lib/pkg/plugin"
//
// type MyPluginConfig struct {
// plugin.BaseConfig
// type MyPluginContext struct {
// plugin.Context
// Foo string
// Bar string
// }
BaseConfig struct {
Stage Stage
Step Step
Context struct {
Build Build
Repo Repo
Commit Commit
Stage Stage
Step Step
SemVer SemVer
}
// Build represents a build of a repository.