plugin

package
v0.0.0-...-3426df6 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Copyright 2018 Drone.IO Inc

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Taken from github.com/drone/drone-template-lib

Index

Constants

This section is empty.

Variables

View Source
var DefaultTemplate []byte

DefaultTemplate is the default template.

Functions

This section is empty.

Types

type Error

type Error string

Error is a plugin error.

const (
	// ErrMissingURLOrToken is the missing url or token error.
	ErrMissingURLOrToken Error = "missing url or token"
	// ErrMissingTeamOrChannel is the missing team or channel error.
	ErrMissingTeamOrChannel Error = "missing team or channel"
)

Error values.

func (Error) Error

func (err Error) Error() string

Error satisfies the error interface.

type Plugin

type Plugin struct {
	URL      string
	Token    string
	Team     string
	Channel  string
	Template string
	Replace  string
	// contains filtered or unexported fields
}

Plugin implements drone.Plugin to provide the plugin implementation.

func New

func New() *Plugin

New creates the drone mattermost plugin.

func (*Plugin) BuildReplacer

func (p *Plugin) BuildReplacer() error

BuildReplacer builds a replacer.

func (*Plugin) CreatePost

func (p *Plugin) CreatePost(pipeline drone.Pipeline, network drone.Network) error

CreatePost creates the post.

func (*Plugin) Execute

func (p *Plugin) Execute(ctx *cli.Context) error

Execute executes the plugin.

func (*Plugin) Flags

func (p *Plugin) Flags() []cli.Flag

Flags returns the configuration flags for the plugin.

func (*Plugin) Run

func (p *Plugin) Run(ctx *cli.Context) error

Run is the cli run entry.

Jump to

Keyboard shortcuts

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