SchemaLoader

expect class SchemaLoader(fileSystem: FileSystem) : Loader, ProfileLoader

Load proto files and their transitive dependencies and parse them. Keep track of which files were loaded from where so that we can use that information later when deciding what to generate.

actual class SchemaLoader(fileSystem: FileSystem) : Loader, ProfileLoader
actual class SchemaLoader(fileSystem: FileSystem) : Loader, ProfileLoader
actual class SchemaLoader(fileSystem: FileSystem) : Loader, ProfileLoader

Constructors

Link copied to clipboard
expect constructor(fileSystem: FileSystem)
actual constructor(fileSystem: FileSystem)
constructor(fileSystem: FileSystem)
actual constructor(fileSystem: FileSystem)
actual constructor(fileSystem: FileSystem)

Properties

Link copied to clipboard

If true, the schema loader will load the whole graph, including files and types not used by anything in the source path.

If true, the schema loader will load the whole graph, including files and types not used by anything in the source path.

If true, the schema loader will load the whole graph, including files and types not used by anything in the source path.

If true, the schema loader will load the whole graph, including files and types not used by anything in the source path.

Link copied to clipboard

All qualified named Protobuf types in opaqueTypes will be evaluated as being of type bytes. On code generation, the fields of such types will be using the platform equivalent of bytes, like okio.ByteString for the JVM. Note that scalar types cannot be opaqued.

Link copied to clipboard

Strict by default. Note that golang cannot build protos with package cycles.

Strict by default. Note that golang cannot build protos with package cycles.

Strict by default. Note that golang cannot build protos with package cycles.

Strict by default. Note that golang cannot build protos with package cycles.

Link copied to clipboard

Subset of the schema that was loaded from the source path.

Subset of the schema that was loaded from the source path.

Subset of the schema that was loaded from the source path.

Subset of the schema that was loaded from the source path.

Functions

Link copied to clipboard
expect fun initRoots(sourcePath: List<Location>, protoPath: List<Location> = listOf())

Initialize the WireRun.sourcePath and WireRun.protoPath from which files are loaded.

actual fun initRoots(sourcePath: List<Location>, protoPath: List<Location>)

Initialize the WireRun.sourcePath and WireRun.protoPath from which files are loaded.

actual fun initRoots(sourcePath: List<Location>, protoPath: List<Location>)

Initialize the WireRun.sourcePath and WireRun.protoPath from which files are loaded.

actual fun initRoots(sourcePath: List<Location>, protoPath: List<Location>)

Initialize the WireRun.sourcePath and WireRun.protoPath from which files are loaded.

Link copied to clipboard
abstract fun load(path: String): ProtoFile
open override fun load(path: String): ProtoFile
open override fun load(path: String): ProtoFile
open override fun load(path: String): ProtoFile
Link copied to clipboard
abstract fun loadProfile(name: String, schema: Schema): Profile
open override fun loadProfile(name: String, schema: Schema): Profile
open override fun loadProfile(name: String, schema: Schema): Profile
open override fun loadProfile(name: String, schema: Schema): Profile
Link copied to clipboard
expect fun loadSchema(): Schema
actual fun loadSchema(): Schema
actual fun loadSchema(): Schema
actual fun loadSchema(): Schema
Link copied to clipboard
abstract fun withErrors(errors: ErrorCollector): Loader

Returns a new loader that reports failures to errors.

open override fun withErrors(errors: ErrorCollector): SchemaLoader

Returns a new loader that reports failures to errors.

open override fun withErrors(errors: ErrorCollector): SchemaLoader

Returns a new loader that reports failures to errors.

open override fun withErrors(errors: ErrorCollector): SchemaLoader

Returns a new loader that reports failures to errors.