template

package
v2.9.4 Latest Latest
Warning

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

Go to latest
Published: May 2, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DockerFNC = `FROM alpine
ADD {{.Alias}}-{{.Type}} /{{.Alias}}-{{.Type}}
ENTRYPOINT [ "/{{.Alias}}-{{.Type}}" ]
`

	DockerSRV = `FROM alpine
ADD {{.Alias}}-{{.Type}} /{{.Alias}}-{{.Type}}
ENTRYPOINT [ "/{{.Alias}}-{{.Type}}" ]
`

	DockerWEB = `FROM alpine
ADD html /html
ADD {{.Alias}}-{{.Type}} /{{.Alias}}-{{.Type}}
WORKDIR /
ENTRYPOINT [ "/{{.Alias}}-{{.Type}}" ]
`
)
View Source
var (
	HandlerFNC = `` /* 385-byte string literal not displayed */

	HandlerSRV = `` /* 1483-byte string literal not displayed */

	SubscriberFNC = `` /* 333-byte string literal not displayed */

	SubscriberSRV = `` /* 473-byte string literal not displayed */

	HandlerAPI = `` /* 1285-byte string literal not displayed */

	HandlerWEB = `` /* 1078-byte string literal not displayed */

)
View Source
var (
	MainFNC = `` /* 565-byte string literal not displayed */

	MainSRV = `` /* 687-byte string literal not displayed */

	MainAPI = `` /* 679-byte string literal not displayed */

	MainWEB = `` /* 743-byte string literal not displayed */

)
View Source
var (
	Makefile = `` /* 643-byte string literal not displayed */

	GenerateFile = `package main
//go:generate make proto
`
)
View Source
var (
	ProtoFNC = `` /* 235-byte string literal not displayed */

	ProtoSRV = `` /* 526-byte string literal not displayed */

	ProtoAPI = `` /* 168-byte string literal not displayed */

)
View Source
var (
	Readme = `# {{title .Alias}} Service

This is the {{title .Alias}} service

Generated with

` + "```" +
		`
{{.Command}}
` + "```" + `

## Getting Started

- [Configuration](#configuration)
- [Dependencies](#dependencies)
- [Usage](#usage)

## Configuration

- FQDN: {{.FQDN}}
- Type: {{.Type}}
- Alias: {{.Alias}}

## Dependencies

Micro services depend on service discovery. The default is multicast DNS, a zeroconf system.

In the event you need a resilient multi-host setup we recommend etcd.

` + "```" +
		`
# install etcd
brew install etcd

# run etcd
etcd
` + "```" + `

## Usage

A Makefile is included for convenience

Build the binary

` + "```" +
		`
make build
` + "```" + `

Run the service
` + "```" +
		`
./{{.Alias}}-{{.Type}}
` + "```" + `

Build a docker image
` + "```" +
		`
make docker
` + "```"

	ReadmeFNC = `# {{title .Alias}} Function

This is the {{title .Alias}} function

Generated with

` + "```" +
		`
{{.Command}}
` + "```" + `

## Getting Started

- [Configuration](#configuration)
- [Dependencies](#dependencies)
- [Usage](#usage)

## Configuration

- FQDN: {{.FQDN}}
- Type: {{.Type}}
- Alias: {{.Alias}}

## Dependencies

Micro functions depend on service discovery. The default is etcd.

` + "```" +
		`
# install etcd
brew install etcd

# run etcd
etcd
` + "```" + `

## Usage

A Makefile is included for convenience

Build the binary

` + "```" +
		`
make build
` + "```" + `

Run the function once
` + "```" +
		`
./{{.Alias}}-{{.Type}}
` + "```" + `

Build a docker image
` + "```" +
		`
make docker
` + "```"
)
View Source
var (
	GitIgnore = `
{{.Alias}}-{{.Type}}
`
)
View Source
var (
	HTMLWEB = `` /* 2960-byte string literal not displayed */

)
View Source
var (
	Module = `` /* 267-byte string literal not displayed */

)
View Source
var (
	Plugin = `package main
{{if .Plugins}}
import ({{range .Plugins}}
	_ "github.com/micro/go-plugins/{{.}}"{{end}}
){{end}}
`
)
View Source
var (
	WrapperAPI = `` /* 965-byte string literal not displayed */

)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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