templates

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(tpl []byte, obj interface{}) ([]byte, error)

Render renders the given a Go text template as a []byte and any object to be exposed within the template as "." into the resulting []byte. It also permits the use of functions from the sprig library.

Types

type Deployer

type Deployer interface {
	FindTemplate(template string) ([]byte, error)
	Deploy(
		deploymentName string,
		resourceGroupName string,
		location string,
		template []byte,
		armParams map[string]interface{},
	) (map[string]interface{}, error)
	Update(
		deploymentName string,
		resourceGroupName string,
		location string,
		template []byte,
		armParams map[string]interface{},
	) (map[string]interface{}, error)
	Delete(deploymentName string, resourceGroupName string) error
}

Deployer is an interface to be implemented by any component capable of deploying resource to Azure using an ARM template

func NewDeployer

func NewDeployer(
	context *portercontext.Context,
	groupsClient resourcesSDK.GroupsClient,
	deploymentsClient resourcesSDK.DeploymentsClient,
) Deployer

NewDeployer returns a new ARM-based implementation of the Deployer interface

Jump to

Keyboard shortcuts

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