mirror of
https://github.com/thegeeklab/wp-plugin-go.git
synced 2024-11-22 10:20:39 +00:00
Add Context struct
This commit is contained in:
parent
a3ef97d454
commit
c7b7745e10
@ -8,23 +8,27 @@ package plugin
|
|||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
type (
|
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
|
// The context organizes all the information available to a plugin executing
|
||||||
// executing as a step within a stage.
|
// as a step within a stage.
|
||||||
//
|
//
|
||||||
// Plugins can choose to compose this within their own config.
|
// Plugins can choose to compose this within their own config.
|
||||||
//
|
//
|
||||||
// import "github.com/drone-plugins/drone-plugin-lib/pkg/plugin"
|
// import "github.com/drone-plugins/drone-plugin-lib/pkg/plugin"
|
||||||
//
|
//
|
||||||
// type MyPluginConfig struct {
|
// type MyPluginContext struct {
|
||||||
// plugin.BaseConfig
|
// plugin.Context
|
||||||
// Foo string
|
// Foo string
|
||||||
// Bar string
|
// Bar string
|
||||||
// }
|
// }
|
||||||
BaseConfig struct {
|
Context struct {
|
||||||
|
Build Build
|
||||||
|
Repo Repo
|
||||||
|
Commit Commit
|
||||||
Stage Stage
|
Stage Stage
|
||||||
Step Step
|
Step Step
|
||||||
|
SemVer SemVer
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build represents a build of a repository.
|
// Build represents a build of a repository.
|
||||||
|
Loading…
Reference in New Issue
Block a user