scaffold

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: Apache-2.0 Imports: 13 Imported by: 3

README

scaffold

Build Status Go Report Card GoDoc License PRs Welcome

scaffold

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessSprocs

func ProcessSprocs(dbConn idb, sprocPath string, domainEngPath, sprocGenPath, templatePath string) (err error)

ProcessSprocs generates classes for every stored procedure that reads information back from the database, as well as generates the go code required to execute the sproc against the database and parse the response

Types

type Template

type Template struct {
	// contains filtered or unexported fields
}

Template is used to hold a string format. It can either be populated by passing a path to a template, or populating it with a string argument it acts as a cleaner strings.Replace that can be chained

func NewTemplate

func NewTemplate(basePath string, templatePath string) (template *Template, err error)

NewTemplate returns a template that is populated with the contents contained within the file pointed at by the arguments

func NewTemplateEmpty

func NewTemplateEmpty() (template *Template)

NewTemplateEmpty returns a template that doesn't contain anything. Often used in coordination with UpdateBase to populate a template with a string instead of a file

func (*Template) Get

func (t *Template) Get() (template string)

Get returns the contents of the template

func (*Template) Repl

func (t *Template) Repl(stringToReplace string, replacingValue string) *Template

Repl replaces some contents of the template and returns the same template so the method calls can be chained

func (*Template) UpdateBase

func (t *Template) UpdateBase(newBase string)

UpdateBase changes the contents of the template to the contents of the argument. Completely eradicates the contents of the old template

Jump to

Keyboard shortcuts

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