plugin

package
v0.0.0-...-6d45568 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvPluginResultShareHost = "PLUGIN_RESULT_SHARE_HOST"

	NamePluginDebug   = "config.debug"
	EnvPluginTimeOut  = "PLUGIN_TIMEOUT_SECOND"
	NamePluginTimeOut = "config.timeout_second"

	EnvWebHook  = "PLUGIN_WEBHOOK"
	NameWebHook = "config.webhook"
	EnvMsgType  = "PLUGIN_MSG_TYPE"
	NameMsgType = "config.msg_type"
)

Variables

This section is empty.

Functions

func CommonFlag

func CommonFlag() []cli.Flag

CommonFlag Other modules also have flags

func Flag

func Flag() []cli.Flag

Flag set flag at here

func HideFlag

func HideFlag() []cli.Flag

HideFlag set plugin hide flag at here

func IsBuildDebugOpen

func IsBuildDebugOpen(c *cli.Context) bool

IsBuildDebugOpen when config or drone build open debug will open debug

Types

type Config

type Config struct {
	Debug         bool
	TimeoutSecond uint

	Webhook string
	MsgType string
}

Config plugin private config

type Plugin

type Plugin struct {
	Name    string
	Version string
	Drone   drone_info.Drone
	Config  Config
}

Plugin plugin all config

func BindCliFlag

func BindCliFlag(c *cli.Context, cliVersion, cliName string, drone drone_info.Drone) (*Plugin, error)

BindCliFlag check args here

func (*Plugin) CleanResultEnv

func (p *Plugin) CleanResultEnv() error

func (*Plugin) Exec

func (p *Plugin) Exec() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL