Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Set = wire.NewSet(ProvideEnforcer)
Set is used by wire.
Functions ¶
This section is empty.
Types ¶
type Enforcer ¶
type Enforcer struct {
// contains filtered or unexported fields
}
Enforcer applies a rule-set to protobuf messages.
func ProvideEnforcer ¶
func ProvideEnforcer(logger *log.Logger, tokens token.TokensServer) *Enforcer
ProvideEnforcer is used by wire.
func (*Enforcer) Enforce ¶
func (e *Enforcer) Enforce( ctx context.Context, dir capabilities.Direction, val protoreflect.Value, ) (bool, error)
Enforce modifies the given message in-place in order to conform to the embedded rule-set. The method returns true if the message already complied with the rule-set (i.e. no modifications were made).
Click to show internal directories.
Click to hide internal directories.