plugin

package
v0.0.0-...-20ff174 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(settings Settings, pipeline drone.Pipeline, network drone.Network) drone.Plugin

New initializes a plugin from the given Settings, Pipeline, and Network.

Types

type File

type File struct {
	ProjectID int  `json:"projectID"`
	FileID    int  `json:"fileID"`
	Required  bool `json:"required"`
}

File defines a record within manifest.

type ForgeSvc

type ForgeSvc struct {
	Slug string `json:"slug"`
}

ForgeSvc defines the forgesvc api type.

type Manifest

type Manifest struct {
	Files []File `json:"files"`
}

Manifest defines the manifest input.

type Metadata

type Metadata struct {
	Title     string    `json:"displayName"`
	Release   string    `json:"releaseType"`
	Note      string    `json:"changelog"`
	Type      string    `json:"changelogType"`
	Games     []int     `json:"gameVersions"`
	Relations Relations `json:"relations"`
}

Metadata implements the api payload.

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin implements drone.Plugin to provide the plugin implementation.

func (*Plugin) Execute

func (p *Plugin) Execute() error

Execute provides the implementation of the plugin.

func (*Plugin) Validate

func (p *Plugin) Validate() error

Validate handles the settings validation of the plugin.

type Project

type Project struct {
	Slug string `json:"slug"`
	Type string `json:"type"`
}

Project is par of the api payload.

type Relations

type Relations struct {
	Projects []Project `json:"projects"`
}

Relations is par of the api payload.

type Response

type Response struct {
	Code    int    `json:"errorCode"`
	Message string `json:"errorMessage"`
	ID      int    `json:"id"`
}

Response implements the api response.

type Settings

type Settings struct {
	APIKey    string
	Project   int
	File      string
	Title     string
	Release   string
	Note      string
	Type      string
	Games     []int
	Relations string
	Manifest  string
	Metadata  string
}

Settings for the plugin.

Jump to

Keyboard shortcuts

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