Documentation ¶
Overview ¶
Package contract implements generate smart contract for hyperledger sawtooth
- Copyright © 2018. TIBCO Software Inc.
- This file is subject to the license terms contained
- in the license file that is distributed with this file.
Index ¶
Constants ¶
View Source
const CargoTomlTemplate = `` /* 333-byte string literal not displayed */
CargoTomlTemplate cargo toml template
View Source
const LibRsTemplate = `{{range $crate, $_ := .Crates}}extern crate {{$crate}};
{{end}}
{{range $use, $_ := .Uses}}use {{$use}};
{{end}}
`
LibRsTemplate lib.rs template
View Source
const MainRsTemplate = `` /* 277-byte string literal not displayed */
MainRsTemplate main.rs template
Variables ¶
This section is empty.
Functions ¶
func NewGenerator ¶
func NewGenerator(opts *GenOptions) contract.Generator
NewGenerator is the generator constructor
Types ¶
type CargoToml ¶
type CargoToml struct { Name string Version string DovetailMacroPath string GitDependencies []GitDependency }
CargoToml struct for cargo toml template
type GenOptions ¶
GenOptions defines the generator options
func NewGenOptions ¶
func NewGenOptions(targetPath, modelFile, dovetailMacroPath string) *GenOptions
NewGenOptions is the options constructor
type Generator ¶
type Generator struct {
Opts *GenOptions
}
Generator defines the generator attributes
type GitDependency ¶
GitDependency struct for cargo toml template dependencies
Click to show internal directories.
Click to hide internal directories.