plugin

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package plugin implements the stencil-golang plugin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

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

Instance contains a apiv1.Implementation satisfying plugin.

func New

func New(ctx context.Context) *Instance

New creates a new Instance.

func (*Instance) ExecuteTemplateFunction

func (i *Instance) ExecuteTemplateFunction(exec *apiv1.TemplateFunctionExec) (any, error)

ExecuteTemplateFunction executes a known template function to satisfy apiv1.Implementation.

func (*Instance) GetConfig

func (*Instance) GetConfig() (*apiv1.Config, error)

GetConfig returns a apiv1.Config for the Instance.

func (*Instance) GetLicense

func (i *Instance) GetLicense(t *apiv1.TemplateFunctionExec) (any, error)

GetLicense returns a license from Github's License API.

func (*Instance) GetLicenses

func (i *Instance) GetLicenses(_ *apiv1.TemplateFunctionExec) (any, error)

GetLicenses returns a list of commonly used licenses from Github's License API.

func (*Instance) GetTemplateFunctions

func (*Instance) GetTemplateFunctions() ([]*apiv1.TemplateFunction, error)

GetTemplateFunctions returns the functions implemented for this plugin to satisfy apiv1.Implementation.

Jump to

Keyboard shortcuts

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