Documentation ¶ Overview ¶ Package typescrub computes scrub paths for schema types. Index ¶ func HeadersToJen(headers []string) Code func PathsToJen(paths []scrub.Path) Code type Computer func NewComputer(log zerolog.Logger) *Computer func (c *Computer) Compute(typ schema.Type, mode ParseMode) Desc type Desc type ParseMode Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func HeadersToJen ¶ func HeadersToJen(headers []string) Code func PathsToJen ¶ func PathsToJen(paths []scrub.Path) Code Types ¶ type Computer ¶ type Computer struct { // contains filtered or unexported fields } Computer computes scrub paths for types, caching the computation. It can safely be reused across multiple types. It is not safe for concurrent use. func NewComputer ¶ func NewComputer(log zerolog.Logger) *Computer New constructs a new Computer. func (*Computer) Compute ¶ func (c *Computer) Compute(typ schema.Type, mode ParseMode) Desc Compute computes the scrub paths for the given typ. It is not safe for concurrent use. type Desc ¶ type Desc struct { Payload []scrub.Path Headers []string } type ParseMode ¶ type ParseMode int const ( // AuthHandler specifies that the type is an auth handler. AuthHandler ParseMode = 1 << iota // DisableScrubbing specifies that scrubbing should be disabled. // Used for local development. DisableScrubbing ) Source Files ¶ View all Source files jen.gotypescrub.go Click to show internal directories. Click to hide internal directories.