Command

com.ossuminc.riddl.command.Command
trait Command[OPT <: CommandOptions](val commandName: String)(implicit evidence$1: ClassTag[OPT], io: PlatformContext)

The service interface for Riddlc command plugins

Attributes

Source
Command.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def getOptionsParser: (OParser[Unit, OPT], OPT)

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

Source
Command.scala
def interpretConfig(config: Config): OPT

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

Source
Command.scala

Concrete methods

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

Attributes

Source
Command.scala
def loadOptionsFrom(configFile: Path): Either[Messages, OPT]

Attributes

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

Attributes

Source
Command.scala
def parseOptions(args: Array[String]): Option[OPT]

Attributes

Source
Command.scala
protected def replaceInputFile(options: OPT, inputFile: Path): OPT

Attributes

Source
Command.scala
def resolveInputFileToConfigFile(options: OPT, configFile: Path): OPT

Attributes

Source
Command.scala
def run(options: OPT, 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

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

Attributes

Source
Command.scala

Concrete fields

protected val builder: OParserBuilder[OPT]

Attributes

Source
Command.scala

Attributes

Source
Command.scala