Documentation ¶
Index ¶
- Variables
- func CreatePathForApplication(appName string, basePath string, appdata *sysl.Application, fileName string, ...) (afero.File, error)
- func FJSONPB(w io.Writer, m protoreflect.ProtoMessage) error
- func FJSONPBWithOpt(w io.Writer, m protoreflect.ProtoMessage, o OutputOptions) error
- func FTextPB(w io.Writer, m protoreflect.ProtoMessage) error
- func FTextPBWithOpt(w io.Writer, m protoreflect.ProtoMessage, o OutputOptions) error
- func FromPB(pbPath string, fs afero.Fs) (*sysl.Module, error)
- func FromPBByteContents(pbPath string, contents []byte) (*sysl.Module, error)
- func FromPBStringContents(pbPath, contents string) (*sysl.Module, error)
- func GeneratePBBinaryMessage(w io.Writer, m protoreflect.ProtoMessage) error
- func GeneratePBBinaryMessageFile(m protoreflect.ProtoMessage, filename string, fs afero.Fs) error
- func JSONPB(m protoreflect.ProtoMessage, filename string, fs afero.Fs) error
- func JSONPBWithOpt(m protoreflect.ProtoMessage, filename string, fs afero.Fs, o OutputOptions) error
- func OutputSplitApplications(module *sysl.Module, outputMode string, opt OutputOptions, basePath string, ...) error
- func TextPB(m protoreflect.ProtoMessage, filename string, fs afero.Fs) error
- func TextPBWithOpt(m protoreflect.ProtoMessage, filename string, fs afero.Fs, o OutputOptions) error
- type OutputOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownExtension = errors.New("unknown extension")
Functions ¶
func CreatePathForApplication ¶ added in v0.658.0
func CreatePathForApplication( appName string, basePath string, appdata *sysl.Application, fileName string, fs afero.Fs) (afero.File, error)
Creates a directory path based on the Application name. Returns an open file descriptor. E.g. if the Application is: 'ANZx :: Foo :: Bar' it creates the following file and returns the descriptor: <basePath>/ANZx/Foo/Bar/<fileName>
func FJSONPBWithOpt ¶ added in v0.630.0
func FJSONPBWithOpt(w io.Writer, m protoreflect.ProtoMessage, o OutputOptions) error
func FTextPBWithOpt ¶ added in v0.630.0
func FTextPBWithOpt(w io.Writer, m protoreflect.ProtoMessage, o OutputOptions) error
func FromPB ¶ added in v0.374.0
FromPB unmarshals a Sysl module from an encoded protobuf message file.
func FromPBByteContents ¶ added in v0.533.0
FromPBByteContents unmarshals a Sysl module from an encoded protobuf message.
func FromPBStringContents ¶ added in v0.533.0
FromPBStringContents unmarshals a Sysl module from an encoded protobuf message.
func GeneratePBBinaryMessage ¶ added in v0.122.0
func GeneratePBBinaryMessage(w io.Writer, m protoreflect.ProtoMessage) error
GeneratePBBinaryMessage generates binary message to IO writer specified by `w`.
func GeneratePBBinaryMessageFile ¶ added in v0.122.0
func GeneratePBBinaryMessageFile(m protoreflect.ProtoMessage, filename string, fs afero.Fs) error
GeneratePBBinaryMessageFile generates binary message to the file specified by `filename`.
func JSONPB ¶
func JSONPB(m protoreflect.ProtoMessage, filename string, fs afero.Fs) error
JSONPB ...
func JSONPBWithOpt ¶ added in v0.630.0
func JSONPBWithOpt(m protoreflect.ProtoMessage, filename string, fs afero.Fs, o OutputOptions) error
func OutputSplitApplications ¶ added in v0.658.0
func OutputSplitApplications( module *sysl.Module, outputMode string, opt OutputOptions, basePath string, fileName string, fs afero.Fs) error
Iterates through Applications and does the following for each one:
- Creates an output path structure based on the Application name/parts
- Identifies the correct output method to run based on `outputMode`
- Executes the output method
func TextPB ¶
func TextPB(m protoreflect.ProtoMessage, filename string, fs afero.Fs) error
TextPB ...
func TextPBWithOpt ¶ added in v0.630.0
func TextPBWithOpt(m protoreflect.ProtoMessage, filename string, fs afero.Fs, o OutputOptions) error
Types ¶
type OutputOptions ¶ added in v0.630.0
type OutputOptions struct {
Compact bool
}
Click to show internal directories.
Click to hide internal directories.