Documentation ¶
Overview ¶
Package infer defines an analyzer that identifies Sources that either 1. are defined from a Source type, or 2. have a Source type as a field
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "sourceinfer", Doc: `This analyzer infers named source types from typedefs and fields. Suppose Foo has been configured to be a source type. Then, the following type definition would cause Bar to be identified as a source, because its underlying type is Foo: type Bar Foo Indeed, if Foo contains sensitive data, then so does Bar, because they have the same fields. Similarly, the following type definition would cause Baz to be identified as a source, because it holds a field of type Foo: type Baz struct { f Foo } Indeed, if Foo contains sensitive data, and Bar contains Foo, Bar also contains that data, via Foo. Types identified as sources during analysis are used to evaluate the sourceyness of types that depend on them. For example, in the below type definitions, both Qux and Quux will be identified as sources: type Qux Foo type Quux Qux `, Run: run, Requires: []*analysis.Analyzer{ fieldtags.Analyzer, inspect.Analyzer, }, ResultType: reflect.TypeOf(new(ResultType)).Elem(), FactTypes: []analysis.Fact{new(inferredSourceFact)}, }
Functions ¶
This section is empty.
Types ¶
type ResultType ¶
ResultType is a set of types.Object that are inferred Sources.
Click to show internal directories.
Click to hide internal directories.