builder

package module
v0.0.0-...-e2c0047 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NpmCommand

func NpmCommand(config NodeConfig) (string, error)

func PnpmCommand

func PnpmCommand(config NodeConfig) (string, error)

Types

type BuildConfig

type BuildConfig struct {
	NodeConfig NodeConfig
}

type Builder

type Builder interface {
	Build(config BuildConfig) (string, error)
}

Builder 接口

type BuilderItem

type BuilderItem struct {
	FileType string
	Builder  Builder
}

type C

type C struct {
	Path string
}

C 构建器结构体

func NewC

func NewC(path string) *C

func (*C) Build

func (c *C) Build(config BuildConfig) (string, error)

type Docker

type Docker struct {
	Path string
	Name string
}

Docker 构建器结构体

func NewDocker

func NewDocker(path, name string) *Docker

func (*Docker) Build

func (d *Docker) Build(config BuildConfig) (string, error)

type Go

type Go struct {
	Path string
}

Go 构建器结构体

func NewGo

func NewGo(path string) *Go

func (*Go) Build

func (g *Go) Build(config BuildConfig) (string, error)

type Gradle

type Gradle struct {
	Path string
}

Gradle 构建器结构体

func NewGradle

func NewGradle(path string) *Gradle

func (*Gradle) Build

func (g *Gradle) Build(config BuildConfig) (string, error)

type Maven

type Maven struct {
	Path string
}

Maven 构建器结构体

func NewMaven

func NewMaven(path string) *Maven

func (*Maven) Build

func (m *Maven) Build(config BuildConfig) (string, error)

type Node

type Node struct {
	Path string
}

Node 构建器结构体

func NewNode

func NewNode(path string) *Node

func (*Node) Build

func (n *Node) Build(config BuildConfig) (string, error)

type NodeConfig

type NodeConfig struct {
	NodePackage string
	BuildTag    string
}

type Project

type Project struct {
	Path         string        `json:"path"`
	Name         string        `json:"name"`
	Ports        []string      `json:"ports"`
	Repository   Repository    `json:"repository"`
	BuildMessage string        `json:"build_message"`
	BuilderList  []BuilderItem `json:"-"`
}

Project 结构体定义: 存储构建器信息

func NewProject

func NewProject(path, name string, ports []string, url, branch string) *Project

func (*Project) Build

func (p *Project) Build(config BuildConfig)

Build 构建项目

func (*Project) DeployToDocker

func (p *Project) DeployToDocker()

DeployToDocker 部署到docker

func (*Project) GetSourceCode

func (p *Project) GetSourceCode()

GetSourceCode 克隆或拉取仓库

func (*Project) InitBuilder

func (p *Project) InitBuilder()

InitBuilder 初始化构建器

type Python

type Python struct {
	Path string
}

Python 构建器结构体

func NewPython

func NewPython(path string) *Python

func (*Python) Build

func (p *Python) Build(config BuildConfig) (string, error)

type Repository

type Repository struct {
	URL    string `json:"url"`
	Branch string `json:"branch"`
}

Repository 结构体定义: 存储仓库信息

func NewRepository

func NewRepository(url, branch string) *Repository

func (*Repository) Clone

func (repo *Repository) Clone(path string)

Clone 克隆仓库到指定路径

func (*Repository) Update

func (repo *Repository) Update()

Update 拉取最新的仓库更改

type Rust

type Rust struct {
	Path string
}

Rust 构建器结构体

func NewRust

func NewRust(path string) *Rust

func (*Rust) Build

func (r *Rust) Build(config BuildConfig) (string, error)

Jump to

Keyboard shortcuts

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