templates

package
v0.0.42 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package templates provides utilities for generating Dockerfile templates based on different transport types (uvx, npx).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDockerfileTemplate

func GetDockerfileTemplate(transportType TransportType, data TemplateData) (string, error)

GetDockerfileTemplate returns the Dockerfile template for the specified transport type.

Types

type TemplateData

type TemplateData struct {
	// MCPPackage is the name of the MCP package to run.
	MCPPackage string
	// MCPArgs are the arguments to pass to the MCP package.
	MCPArgs []string
	// CACertContent is the content of the custom CA certificate to include in the image.
	CACertContent string
	// IsLocalPath indicates if the MCPPackage is a local path that should be copied into the container.
	IsLocalPath bool
}

TemplateData represents the data to be passed to the Dockerfile template.

type TransportType

type TransportType string

TransportType represents the type of transport to use.

const (
	// TransportTypeUVX represents the uvx transport.
	TransportTypeUVX TransportType = "uvx"
	// TransportTypeNPX represents the npx transport.
	TransportTypeNPX TransportType = "npx"
	// TransportTypeGO represents the go transport.
	TransportTypeGO TransportType = "go"
)

func ParseTransportType

func ParseTransportType(s string) (TransportType, error)

ParseTransportType parses a string into a transport type.

Jump to

Keyboard shortcuts

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