templates

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfServerTpl = `
# This is TOML document.

name = "{{.Name}}"
port = 8080

`

	ConfLoggerTpl = `` /* 193-byte string literal not displayed */

	ConfGrpcTpl = `
[grpc]
    discovery = ["127.0.0.1:8500"]
    services = ["A_service", "B_service"]
    request_timeout = 500 #ms

`

	ConfDiscoveryTpl = `
[discovery]
    endpoints = ["127.0.0.1:8500"]

`

	ConfCacheTpl = `
[redis]
    host = "127.0.0.1:6379"
    auth = ""
    index = 14
    max_idle = 10

`

	ConfMysqlTpl = `` /* 278-byte string literal not displayed */

	ConfMongoTpl = `
[mongo]
    host = "127.0.0.1:27017"
    #auth = "test:BwUSdSQxtUx@"
    auth = ""
    database = ["db1"]

`
)
View Source
const (
	GatewayMainTpl = `` /* 1033-byte string literal not displayed */

	ServiceMainTpl = `` /* 1663-byte string literal not displayed */

	ServiceMainImportCacheTpl = `
	"{{.Root}}/{{.Name}}/internal/cache"
`
	ServiceMainImportStoreTpl = `
	"{{.Root}}/{{.Name}}/internal/store"
`
	ServiceMainConfigCacheTpl = `
	Redis     redis.Config
`
	ServiceMainConfigMongoTpl = `
	Mongo     mongo.Config
`
	ServiceMainConfigMysqlTpl = `
	Mysql     []mysql.Config
`

	ServiceMainRepoCacheTpl = `
         cache.NewRedisRepo(redis.NewPool(Conf.Redis)),
`
	ServiceMainRepoMongoTpl = `
        store.NewMongoRepo(mongo.NewPool(Conf.Mongo)),
`
	ServiceMainRepoMysqlTpl = `
        store.NewMysqlRepo(mysql.NewPool(Conf.Mysql)),
`
)

Variables

This section is empty.

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