model

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeApp added in v0.2.0

func DecodeApp(r io.Reader) (*app.Config, error)

decodeApp decodes the model file into an app.Config struct

func GetFlowName added in v0.2.0

func GetFlowName(flowuri string) string

func ParseApp

func ParseApp(modelfile string) (*app.Config, error)

ParseApp parses the model file into an app.Config struct

Types

type ModelResources

type ModelResources struct {
	AppName      string
	Assets       []string
	Transactions []string
	Schemas      map[string]string
	Schedulables map[string]string
}

func ParseFlowApp

func ParseFlowApp(jsonFile string) (*ModelResources, error)

type ResourceAttribute

type ResourceAttribute struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	IsRef      bool   `json:"isRef, omitempty"`
	IsArray    bool   `json:"isArray, omitempty"`
	IsOptional bool   `json:"isOptional, omitempty"`
	PartyType  string `json:"partyType, omitempty`
}

type ResourceMetadataModel

type ResourceMetadataModel struct {
	Metadata struct {
		Type         string `json:"type"`
		Parent       string `json:"parent, omitempty"`
		CordaClass   string `json:"cordaClass, omitempty"`
		IdentifiedBy string `json:"identifiedBy, omitempty"`
		IsAbstract   bool   `json:"isAbstract, omitempty"`
		Decorators   []struct {
			Name string   `json:"name"`
			Args []string `json:"args, omitempty"`
		} `json:"decorators, omitempty"`
	} `json:"metadata"`
	Attributes []ResourceAttribute `json:"attributes"`
}

func ParseResourceModel

func ParseResourceModel(jsonResource string) *ResourceMetadataModel

Jump to

Keyboard shortcuts

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