Documentation ¶
Index ¶
- Constants
- Variables
- func DeflateAndEncode(text []byte) (string, error)
- func DoConstructSequenceDiagrams(cmdContextParam *CmdContextParamSeqgen, model *sysl.Module, ...) (map[string]string, error)
- func EnsureFlagsNonEmpty(cmd *kingpin.CmdClause, excludes ...string)
- func GenerateDataModels(datagenParams *CmdContextParamDatagen, model *sysl.Module, ...) (map[string]string, error)
- func GenerateDatabaseScripts(scriptParams *CmdDatabaseScriptParams, model *sysl.Module, ...) ([]database.ScriptOutput, error)
- func GenerateIntegrations(intgenParams *CmdContextParamIntgen, model *sysl.Module, logger *logrus.Logger) (map[string]string, error)
- func GenerateModDatabaseScripts(scriptParams *CmdDatabaseScriptParams, modelOld, modelNew *sysl.Module, ...) ([]database.ScriptOutput, error)
- func GenerateView(args *Args, params *IntsParam, mod *sysl.Module) string
- func LoadSyslModule(root, filename string, fs afero.Fs, logger *logrus.Logger) (*sysl.Module, string, error)
- func Main2(args []string, fs afero.Fs, logger *logrus.Logger, ...) int
- func Main3(args []string, fs afero.Fs, logger *logrus.Logger) error
- func MergeAttributes(app, edpnt map[string]*sysl.Attribute) map[string]*sysl.Attribute
- func OutputPlantuml(output, plantuml, umlInput string, fs afero.Fs) error
- func ParseBlackBoxesFromArgument(blackboxFlags map[string]string) [][]string
- func Serialize(w io.Writer, delim string, node Node) error
- func TransformBlackBoxes(blackboxes []*sysl.Attribute) [][]string
- func TransformBlackboxesToUptos(m map[string]*Upto, bbs [][]string, uptoType UptoType)
- type AppDependency
- type AppElement
- type AppLabeler
- type AppPair
- type Args
- type ClassLabeler
- type CmdContextParamCodegen
- type CmdContextParamDatagen
- type CmdContextParamIntgen
- type CmdContextParamSeqgen
- type CmdDatabaseScriptParams
- type CodeGenOutput
- type Command
- type DataModelParam
- type DataModelView
- type Element
- type EndpointCollectionElement
- type EndpointElement
- type EndpointLabeler
- type EndpointLabelerParam
- type EntityViewParam
- type ExecuteArgs
- type FormatParser
- func (fp *FormatParser) FmtOutput(appname, epname, eplongname string, attrs map[string]*sysl.Attribute) string
- func (fp *FormatParser) FmtSeq(epname, eplongname string, attrs map[string]*sysl.Attribute) string
- func (fp *FormatParser) LabelApp(appname, controls string, attrs map[string]*sysl.Attribute) string
- func (fp *FormatParser) LabelClass(classname string) string
- func (fp *FormatParser) LabelEndpoint(p *EndpointLabelerParam) string
- func (fp *FormatParser) Parse(attrs map[string]string) string
- type IntsDiagramVisitor
- type IntsParam
- type Node
- type RelationshipParam
- type SequenceDiagramVisitor
- type SequenceDiagramWriter
- func (s *SequenceDiagramWriter) Activate(agent string)
- func (s *SequenceDiagramWriter) Activated(agent string, suppressed bool) func()
- func (s *SequenceDiagramWriter) Deactivate(agent string)
- func (s *SequenceDiagramWriter) Indent()
- func (s *SequenceDiagramWriter) String() string
- func (s *SequenceDiagramWriter) Unindent()
- func (s *SequenceDiagramWriter) Write(p []byte) (n int, err error)
- func (s *SequenceDiagramWriter) WriteByte(c byte) error
- func (s *SequenceDiagramWriter) WriteHead(v string) (int, error)
- func (s *SequenceDiagramWriter) WriteString(v string) (n int, err error)
- func (s *SequenceDiagramWriter) WriteTo(w io.Writer) (n int64, err error)
- type StatementElement
- type Upto
- type UptoType
- type VarManager
- type Visitor
Constants ¶
const ( MatchSymbol = iota + 1 MatchWord MatchLookahead )
const ( PlantUMLEnvVar = "SYSL_PLANTUML" PlantUMLDefault = "http://localhost:8080/plantuml" )
const ( UpTo = 0 BBApplication = 1 BBEndpointCollection = 2 BBCommandLine = 3 )
const ArrowColorNone = "none"
const ComponentStart = `` /* 132-byte string literal not displayed */
const PumlHeader = `` /* 216-byte string literal not displayed */
const StateStart = `` /* 159-byte string literal not displayed */
Variables ¶
var ( Version = "unspecified" GitCommit = "unspecified" BuildDate = "unspecified" BuildOS = "unspecified" )
Version - Binary version GitCommit - Commit SHA of the source code BuildDate - Binary build date BuildOS - Operating System used to build binary
Functions ¶
func DeflateAndEncode ¶
The functions below ported from https://github.com/dougn/python-plantuml/blob/master/plantuml.py
func EnsureFlagsNonEmpty ¶
func EnsureFlagsNonEmpty(cmd *kingpin.CmdClause, excludes ...string)
Helper function to validate that a set of command flags are not empty values
func GenerateDataModels ¶
func GenerateDatabaseScripts ¶ added in v0.4.2
func GenerateDatabaseScripts(scriptParams *CmdDatabaseScriptParams, model *sysl.Module, logger *logrus.Logger) ([]database.ScriptOutput, error)
func GenerateIntegrations ¶
func GenerateModDatabaseScripts ¶ added in v0.4.2
func GenerateModDatabaseScripts(scriptParams *CmdDatabaseScriptParams, modelOld, modelNew *sysl.Module, logger *logrus.Logger) ([]database.ScriptOutput, error)
func LoadSyslModule ¶
func Main2 ¶
func Main2( args []string, fs afero.Fs, logger *logrus.Logger, main3 func(args []string, fs afero.Fs, logger *logrus.Logger) error, ) int
Main2 calls Main3 and handles any errors it returns. It takes its output streams and command-line arguments and even Main3 as parameters to support testability.
func Main3 ¶
Main3 is the real main function. It takes its output streams and command-line arguments as parameters to support testability.
func MergeAttributes ¶
func TransformBlackBoxes ¶
Types ¶
type AppDependency ¶
type AppDependency struct {
Self, Target AppElement
Statement *sysl.Statement
}
func (*AppDependency) String ¶
func (dep *AppDependency) String() string
type AppElement ¶
type AppLabeler ¶
type ClassLabeler ¶
type CmdContextParamCodegen ¶
type CmdContextParamCodegen struct {
// contains filtered or unexported fields
}
type CmdContextParamDatagen ¶
type CmdContextParamDatagen struct {
// contains filtered or unexported fields
}
type CmdContextParamIntgen ¶
type CmdContextParamIntgen struct {
// contains filtered or unexported fields
}
type CmdContextParamSeqgen ¶
type CmdContextParamSeqgen struct {
// contains filtered or unexported fields
}
type CmdDatabaseScriptParams ¶ added in v0.4.2
type CmdDatabaseScriptParams struct {
// contains filtered or unexported fields
}
type CodeGenOutput ¶
type CodeGenOutput struct {
// contains filtered or unexported fields
}
func GenerateCode ¶
func GenerateCode( codegenParams *CmdContextParamCodegen, model *sysl.Module, modelAppName string, fs afero.Fs, logger *logrus.Logger) ([]*CodeGenOutput, error)
GenerateCode transform input sysl model to code in the target language described by grammar and a sysl transform
type Command ¶
type Command interface { Configure(*kingpin.Application) *kingpin.CmdClause Execute(ExecuteArgs) error Name() string MaxSyslModule() int }
type DataModelParam ¶
type DataModelParam struct { ClassLabeler // contains filtered or unexported fields }
type DataModelView ¶
type DataModelView struct { ClassLabeler // contains filtered or unexported fields }
func MakeDataModelView ¶
func MakeDataModelView( p ClassLabeler, mod *proto.Module, stringBuilder *strings.Builder, title, project string, ) *DataModelView
func (*DataModelView) GenerateDataView ¶
func (v *DataModelView) GenerateDataView(dataParam *DataModelParam) string
func (*DataModelView) UniqueVarForAppName ¶
func (v *DataModelView) UniqueVarForAppName(appName string) string
type EndpointCollectionElement ¶
type EndpointCollectionElement struct {
// contains filtered or unexported fields
}
func MakeEndpointCollectionElement ¶
func MakeEndpointCollectionElement( title string, endpoints []string, blackboxes map[string]*Upto, ) *EndpointCollectionElement
func (*EndpointCollectionElement) Accept ¶
func (e *EndpointCollectionElement) Accept(v Visitor) error
type EndpointElement ¶
type EndpointElement struct {
// contains filtered or unexported fields
}
func (*EndpointElement) Accept ¶
func (e *EndpointElement) Accept(v Visitor) error
type EndpointLabeler ¶
type EndpointLabeler interface {
LabelEndpoint(*EndpointLabelerParam) string
}
type EndpointLabelerParam ¶
type EntityViewParam ¶
type EntityViewParam struct {
// contains filtered or unexported fields
}
type ExecuteArgs ¶
type FormatParser ¶
type FormatParser struct {
// contains filtered or unexported fields
}
func MakeFormatParser ¶
func MakeFormatParser(fmtStr string) *FormatParser
func (*FormatParser) LabelClass ¶
func (fp *FormatParser) LabelClass(classname string) string
func (*FormatParser) LabelEndpoint ¶
func (fp *FormatParser) LabelEndpoint(p *EndpointLabelerParam) string
type IntsDiagramVisitor ¶
type IntsDiagramVisitor struct {
// contains filtered or unexported fields
}
func MakeIntsDiagramVisitor ¶
func (*IntsDiagramVisitor) VarManagerForComponent ¶
func (v *IntsDiagramVisitor) VarManagerForComponent(appName string, nameMap map[string]string) string
func (*IntsDiagramVisitor) VarManagerForEPA ¶
func (v *IntsDiagramVisitor) VarManagerForEPA(name string) string
func (*IntsDiagramVisitor) VarManagerForTopState ¶
func (v *IntsDiagramVisitor) VarManagerForTopState(appName string) string
type RelationshipParam ¶
type SequenceDiagramVisitor ¶
type SequenceDiagramVisitor struct { AppLabeler EndpointLabeler // contains filtered or unexported fields }
func MakeSequenceDiagramVisitor ¶
func MakeSequenceDiagramVisitor( a AppLabeler, e EndpointLabeler, w *SequenceDiagramWriter, m *sysl.Module, appName string, group string, logger *logrus.Logger, ) *SequenceDiagramVisitor
func (*SequenceDiagramVisitor) UniqueVarForAppName ¶
func (v *SequenceDiagramVisitor) UniqueVarForAppName(appName string) string
func (*SequenceDiagramVisitor) Visit ¶
func (v *SequenceDiagramVisitor) Visit(e Element) error
type SequenceDiagramWriter ¶
type SequenceDiagramWriter struct {
// contains filtered or unexported fields
}
func MakeSequenceDiagramWriter ¶
func MakeSequenceDiagramWriter(autogenWarning bool, properties ...string) *SequenceDiagramWriter
func (*SequenceDiagramWriter) Activate ¶
func (s *SequenceDiagramWriter) Activate(agent string)
func (*SequenceDiagramWriter) Activated ¶
func (s *SequenceDiagramWriter) Activated(agent string, suppressed bool) func()
func (*SequenceDiagramWriter) Deactivate ¶
func (s *SequenceDiagramWriter) Deactivate(agent string)
func (*SequenceDiagramWriter) Indent ¶
func (s *SequenceDiagramWriter) Indent()
func (*SequenceDiagramWriter) String ¶
func (s *SequenceDiagramWriter) String() string
func (*SequenceDiagramWriter) Unindent ¶
func (s *SequenceDiagramWriter) Unindent()
func (*SequenceDiagramWriter) Write ¶
func (s *SequenceDiagramWriter) Write(p []byte) (n int, err error)
func (*SequenceDiagramWriter) WriteByte ¶
func (s *SequenceDiagramWriter) WriteByte(c byte) error
func (*SequenceDiagramWriter) WriteHead ¶
func (s *SequenceDiagramWriter) WriteHead(v string) (int, error)
func (*SequenceDiagramWriter) WriteString ¶
func (s *SequenceDiagramWriter) WriteString(v string) (n int, err error)
type StatementElement ¶
type StatementElement struct { EndpointElement // contains filtered or unexported fields }
func (*StatementElement) Accept ¶
func (e *StatementElement) Accept(v Visitor) error
type VarManager ¶
Source Files ¶
- cmd_binaryinfo.go
- cmd_codegen.go
- cmd_databasescript.go
- cmd_databasescript_mod.go
- cmd_datamodel.go
- cmd_export.go
- cmd_import.go
- cmd_ints.go
- cmd_protobuf.go
- cmd_repl.go
- cmd_runner.go
- cmd_sequencediagram.go
- cmd_validate.go
- codegen.go
- datamodelview.go
- deps.go
- diagutil.go
- fmtParser.go
- ints_builder.go
- ints_view.go
- plantuml.go
- seqs.go
- sysl.go
- sysl_const.go
- types.go
- utils.go
- visitor.go
- writer.go