FromCommand

com.ossuminc.riddl.commands.FromCommand
See theFromCommand companion object
class FromCommand(using val pc: PlatformContext) extends Command[Options]

Attributes

Companion
object
Source
FromCommand.scala
Graph
Supertypes
trait Command[Options]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def getOptionsParser: (OParser[Unit, Options], Options)

Provide a scopt OParser for the commands options type, OPT

Provide a scopt OParser for the commands options type, OPT

Attributes

Returns

A pair: the OParser and the default values for OPT

Definition Classes
Source
FromCommand.scala
override def interpretConfig(config: Config): Options

Provide a typesafe/Config reader for the commands options.

Provide a typesafe/Config reader for the commands options. This reader should read an object having the same name as the command. The fields of that object must correspond to the fields of the OPT type.

Attributes

Returns

A pureconfig.ConfigReader[OPT] that knows how to read OPT

Definition Classes
Source
FromCommand.scala
override def loadOptionsFrom(configFile: Path): Either[Messages, Options]

Attributes

Definition Classes
Source
FromCommand.scala
override def replaceInputFile(opts: Options, inputFile: Path): Options

Attributes

Definition Classes
Source
FromCommand.scala
override def run(options: Options, outputDirOverride: Option[Path]): Either[Messages, PassesResult]

Execute the command given the options.

Execute the command given the options. Error should be returned as Left(messages) and not directly logged. The log is for verbose or debug output

Value parameters

options

The command specific options

Attributes

Returns

Either a set of Messages on error or a Unit on success

Definition Classes
Source
FromCommand.scala

Inherited methods

def inputFile(f: (File, Options) => Options): OParser[File, Options]

Attributes

Inherited from:
Command
Source
Command.scala
def outputDir(f: (File, Options) => Options): OParser[File, Options]

Attributes

Inherited from:
Command
Source
Command.scala

Attributes

Inherited from:
Command
Source
Command.scala
def resolveInputFileToConfigFile(options: Options, configFile: Path): Options

Attributes

Inherited from:
Command
Source
Command.scala
def run(args: Array[String], outputDirOverride: Option[Path]): Either[Messages, PassesResult]

Attributes

Inherited from:
Command
Source
Command.scala

Inherited fields

protected val builder: OParserBuilder[Options]

Attributes

Inherited from:
Command
Source
Command.scala

Attributes

Inherited from:
Command
Source
Command.scala

Givens

Givens

Attributes

Source
FromCommand.scala