testrig

package
v0.135.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package testrig provides tools for generating standalone test environment for sysl generated services

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRig

func GenerateRig(fs afero.Fs, templateFile string, outputDir string, modules []*sysl.Module) error

GenerateRig creates full set of files required to start up a test rig for every service, it creates main.go (optionally with DB connection) and a dockerfile to containerize it if the service contains DB tables, it creates sidecar postgres container and creates a schema there finally, it creates docker-compose.yml at the point of all (likely your project's root) that joins all containerized services

func GetDockerfileStub

func GetDockerfileStub() string

func GetMainDBStub added in v0.34.0

func GetMainDBStub() string

func GetMainStub

func GetMainStub() string

Types

type ServiceImplVars

type ServiceImplVars struct {
	InterfaceFactory string `json:"interface_factory"`
	CallbackFactory  string `json:"callback_factory"`
	// contains filtered or unexported fields
}

type ServiceVars

type ServiceVars struct {
	Port string          `json:"port"`
	Impl ServiceImplVars `json:"impl"`
	// contains filtered or unexported fields
}

type ServiceVarsMap

type ServiceVarsMap map[string]ServiceVars

Jump to

Keyboard shortcuts

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