Documentation ¶
Index ¶
- func EvalAll(expressions map[string]string, attrs attribute.Bag, eval expr.Evaluator) (map[string]interface{}, error)
- type BuilderSupportsTemplateFn
- type HandlerSupportsTemplateFn
- type InferTypeFn
- type Info
- type ProcessCheckFn
- type ProcessQuotaFn
- type ProcessReportFn
- type Repository
- type SetTypeFn
- type TypeEvalFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuilderSupportsTemplateFn ¶
type BuilderSupportsTemplateFn func(hndlrBuilder adapter.HandlerBuilder) bool
BuilderSupportsTemplateFn check if the handlerBuilder supports template.
type HandlerSupportsTemplateFn ¶
HandlerSupportsTemplateFn check if the handler supports template.
type InferTypeFn ¶
InferTypeFn does Type inference from the Instance.params proto message.
type Info ¶
type Info struct { Name string Impl string Variety adptTmpl.TemplateVariety BldrInterfaceName string HndlrInterfaceName string CtrCfg proto.Message InferType InferTypeFn SetType SetTypeFn BuilderSupportsTemplate BuilderSupportsTemplateFn HandlerSupportsTemplate HandlerSupportsTemplateFn ProcessReport ProcessReportFn ProcessCheck ProcessCheckFn ProcessQuota ProcessQuotaFn }
Info contains all the information related a template like Default instance params, type inference method etc.
type ProcessCheckFn ¶
type ProcessCheckFn func(ctx context.Context, instName string, instCfg proto.Message, attrs attribute.Bag, mapper expr.Evaluator, handler adapter.Handler) (adapter.CheckResult, error)
ProcessCheckFn instantiates the instance object and dispatches them to the handler.
type ProcessQuotaFn ¶
type ProcessQuotaFn func(ctx context.Context, quotaName string, quotaCfg proto.Message, attrs attribute.Bag, mapper expr.Evaluator, handler adapter.Handler, args adapter.QuotaArgs) (adapter.QuotaResult, error)
ProcessQuotaFn instantiates the instance object and dispatches them to the handler.
type ProcessReportFn ¶
type ProcessReportFn func(ctx context.Context, instCfg map[string]proto.Message, attrs attribute.Bag, mapper expr.Evaluator, handler adapter.Handler) error
ProcessReportFn instantiates the instance object and dispatches them to the handler.
type Repository ¶
type Repository interface { GetTemplateInfo(template string) (Info, bool) SupportsTemplate(hndlrBuilder adapter.HandlerBuilder, tmpl string) (bool, string) }
Repository defines all the helper functions to access the generated template specific types and fields.
func NewRepository ¶
func NewRepository(templateInfos map[string]Info) Repository
NewRepository returns an implementation of Repository