resourceconfig

package
v0.405.5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Extractor = common.NewExtractor("resourceconfig", (*Fact)(nil), Extract)

Extractor extracts config values relating to another decl, e.g. database configurations associated with a database decl.

Configs follow a pattern where they implement an interface, like `ftl.DatabaseConfig`. We extract values by looking at known receiver methods. For example:

type FooConfig struct{}

func (f FooConfig) Name() string {
    return "foo"
}

From this, we'd extract the "foo" value as the database name for `FooConfig`.

Functions

func Extract

func Extract(pass *analysis.Pass) (interface{}, error)

Types

type Fact

type Fact = common.DefaultFact[Tag]

type Tag

type Tag struct{} // Tag uniquely identifies the fact type for this extractor.

Jump to

Keyboard shortcuts

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