Documentation ¶
Index ¶
- Constants
- Variables
- func NewApp() *cli.App
- func SetupGithubRemote(ctx context.Context, namespace string, repoName string, ...) error
- func SyncTemplates(dest string) error
- func SynthesizePipelineConfigurationFile(pipeline Pipeline, outDir string) (string, error)
- func SynthesizeProject(ctx context.Context, tid string, dm *DerivedMetadata) error
- func SynthesizeProjectFromDir(ctx map[string]any, srcTemplateDir string, cfg *Configuration, outDir string) (err error)
- func VersionControl(dir, repoName string) (*git.Repository, error)
- type Commands
- type Configuration
- type DerivedMetadata
- type GithubAPI
- type Pipeline
- type SSHKeys
- type TemplateProvider
Constants ¶
View Source
const ( GEN_CFG_FILENAME = "package.yml" TEMPLATE_DIRNAME = "templates" DEFAULT_TEMPLATES_DIR = "~/.jumpstart/" + TEMPLATE_DIRNAME TEMPLATE_SOURCE = "https://github.com/nurdsoft/jumpstart-templates" )
View Source
const (
DEFAULT_CODEPROVIDER = "github.com"
)
Variables ¶
View Source
var ( VERSION string COMMIT string BUILDTIME string )
Functions ¶
func SetupGithubRemote ¶
func SetupGithubRemote(ctx context.Context, namespace string, repoName string, localRepo *git.Repository, push bool) error
namespace should be empty if it is not an org
func SyncTemplates ¶
func SynthesizeProject ¶
func SynthesizeProject(ctx context.Context, tid string, dm *DerivedMetadata) error
func VersionControl ¶
Types ¶
type Commands ¶
type Commands struct { UnixLike []string `yaml:"unix"` Windows []string `yaml:"windows"` All []string }
func (*Commands) UnmarshalYAML ¶
type Configuration ¶
type Configuration struct { Name string `yaml:"name"` Binary string `yaml:"binary"` Commands Commands `yaml:"commands"` Pipeline Pipeline `yaml:"pipeline"` }
func GetTemplateConfiguration ¶
func GetTemplateConfiguration(ctx pongo2.Context, srcTemplateDir string) (*Configuration, error)
type DerivedMetadata ¶
type DerivedMetadata struct { // Project name Name string // Github namespace / organization Namespace string // Authenticated user User string // Code provider CodeProvider string // Output directory OutDir string }
func NewDerivedMetadata ¶
func NewDerivedMetadata(ctx context.Context, input string) (*DerivedMetadata, error)
func (*DerivedMetadata) IsGithubOrg ¶
func (dm *DerivedMetadata) IsGithubOrg() bool
type GithubAPI ¶
type GithubAPI struct {
// contains filtered or unexported fields
}
func NewGithubAPI ¶
func NewGithubAPI() *GithubAPI
func (*GithubAPI) CreateRepo ¶
func (api *GithubAPI) CreateRepo(ctx context.Context, orgName, repoName string) (*github.Repository, error)
orgName is the name of the organization to create the repo in. If it is an empty string, the repo will be created in the user's account.
type Pipeline ¶
func (*Pipeline) Dockerfile ¶
type SSHKeys ¶
type SSHKeys struct {
// contains filtered or unexported fields
}
func NewSSHKeys ¶
func NewSSHKeys() *SSHKeys
func (*SSHKeys) SetSelected ¶
type TemplateProvider ¶
type TemplateProvider struct {
// contains filtered or unexported fields
}
func NewTemplateProvider ¶
func NewTemplateProvider(baseDir string) (*TemplateProvider, error)
func (*TemplateProvider) GetTemplate ¶
func (tp *TemplateProvider) GetTemplate(name string) string
func (*TemplateProvider) ListTemplates ¶
func (tp *TemplateProvider) ListTemplates() []string
Click to show internal directories.
Click to hide internal directories.