scaffold

package
v0.0.0-...-3f1cc49 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Copyright © 2023 Xu Wu <ixw1991@126.com> Use of this source code is governed by a MIT style license that can be found in the LICENSE file.

Index

Constants

View Source
const (
	DefaultTemplateGroup = "template"
)

Variables

This section is empty.

Functions

func DownloadAndUnpackTemplateToTempDir

func DownloadAndUnpackTemplateToTempDir(client *gitlabx.Client, templateName string) (string, error)

DownloadAndUnpackTemplateToTempDir 是一个函数,它下载指定模板并将其解压到临时目录, 然后返回解压后数据的路径。它接收两个参数:一个 gitlabx.Client 实例和一个字符串模板名。 它返回解压后的数据路径及错误信息。

func ListTemplates

func ListTemplates(client *gitlabx.Client) (string, error)

func VisitAndModifyFiles

func VisitAndModifyFiles(rootPath, path string, data TemplateData, f os.FileInfo, err error) (map[string]*gitlabx.FileData, error)

Types

type Config

type Config struct {
	Namespace        string   `mapstructure:"namespace"`
	Extensions       []string `mapstructure:"extensions"`
	Base64Extensions []string `mapstructure:"base64_extensions"`
	Files            []string `mapstructure:"files"`
}

type TemplateData

type TemplateData struct {
	Name string
	Port int
}

Jump to

Keyboard shortcuts

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