godel-refreshables-plugin

command module
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

README

Autorelease

godel-refreshables-plugin

A godel plugin for generating strongly-typed refreshable wrappers for arbitrary types.

For each target type, and the types required to construct it, the plugin will generate an interface definition (and implementation) which provides typed variants of the Current, Map, and Subscribe methods from the refreshable.Refreshable interface. Struct types additionally have generated methods to access each field as a Refreshable.

Plugin Configuration

The plugin reads a configuration file at godel/config/refreshables-plugin.yml which specifies the types for which Refreshable wrappers will be generated.

Example:

refreshables:
  # Relative path to local package
  ./pkg/mypackage:
    types:
      - MyType
  # Absolute path to local package
  github.com/user/project/pkg/mypackage:
    types:
      - MyType
  # Absolute path to remote package
  # In this case, an output path is required.
  github.com/otheruser/otherpackage:
    output: ./generated/otherpackage/zz_generated_refreshables.go
    types:
      - MyType

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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