app

package
v0.0.0-...-cdd4905 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultImports = []string{"fmt"}

DefaultImports represents the default imports that we want the initial service to have.

Functions

func HealthHandler

func HealthHandler(w http.ResponseWriter, r *http.Request)

HealthHandler checks for the healthiness of the api.

func RepoHandler

func RepoHandler(w http.ResponseWriter, r *http.Request)

RepoHandler manages the creation of a GH repository.

func StartCLI

func StartCLI(args []string) error

StartCLI initializes the CLI start and exit.

func StartServer

func StartServer()

StartServer initializes the server and starts it with a graceful shutdown on signals.

Types

type Generator

type Generator struct {
	Token    string
	Metadata Metadata
}

Generator is the service generator using the GH token for repo creation and the metadata for the configured service.

type Metadata

type Metadata struct {
	ProjectPath  string   `yaml:"projectPath,omitempty"`
	Name         string   `yaml:"name"`
	Owner        string   `yaml:"owner"`
	Version      string   `yaml:"version"`
	Imports      []string `yaml:"imports,flow"`
	Description  string   `yaml:"description"`
	Entrypoint   string   `yaml:"entrypoint"`
	MainBranch   string   `yaml:"mainBranch"`
	HasCopyright bool     `yaml:"hasCopyright"`
	HasLicense   bool     `yaml:"hasLicense"`
	HasGitIgnore bool     `yaml:"hasGitignore"`
	IsPrivate    bool     `yaml:"isPrivate"`
}

Metadata is the metadata used to create a new service.

Jump to

Keyboard shortcuts

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