Versions in this module Expand all Collapse all v0 v0.0.1 Jan 7, 2021 Changes in this version + var Categories = []Category + var ErrListRemoved = errors.New("removed from database, update your config") + func RegisterListBuilder(class string, builder BuildListFn) + func RegisterWrapperBuilder(class string, builder BuildWrapperFn) + type BuildListFn func(builder *Builder, parents []string, def ListDef) (List, error) + type BuildWrapperFn func(builder *Builder, def WrapperDef, list List) (List, error) + type Builder struct + func NewBuilder(services apiservice.Discover, opt ...BuilderOption) *Builder + func (b *Builder) Build(def ListDef) (List, error) + func (b *Builder) BuildChild(parents []string, def ListDef) (List, error) + func (b *Builder) List(id string) (List, bool) + func (b *Builder) OnShutdown(f func() error) + func (b *Builder) OnStartup(f func() error) + func (b *Builder) Shutdown() error + func (b *Builder) Start() error + func (b Builder) APIService(name string) (apiservice.Service, bool) + func (b Builder) CertPath(cert string) string + func (b Builder) DataPath(source string) string + func (b Builder) Logger() yalogi.Logger + type BuilderOption func(*builderOpts) + func CertsDir(s string) BuilderOption + func DataDir(s string) BuilderOption + func SetLogger(l yalogi.Logger) BuilderOption + type Category int + const Blacklist + const Infolist + const Mixedlist + const Whitelist + func ToCategory(s string) (Category, error) + func (c *Category) UnmarshalJSON(data []byte) error + func (c Category) IsValid() bool + func (c Category) MarshalJSON() ([]byte, error) + func (c Category) String() string + type Format int + const CIDR + const Plain + const Sub + func ToFormat(s string) (Format, error) + func (f Format) String() string + type List interface + Class func() string + ID func() string + Ping func() error + type ListDef struct + Category Category + Class string + Client *grpctls.ClientCfg + Contains []ListDef + Deprecated bool + Disabled bool + ID string + Name string + Opts map[string]interface{} + Removed bool + Resources []xlist.Resource + Source string + Tags []string + Web string + Wrappers []WrapperDef + func FilterCategory(c Category, l []ListDef) []ListDef + func FilterClass(c string, l []ListDef) []ListDef + func FilterID(id string, l []ListDef) (ListDef, bool) + func FilterResource(r xlist.Resource, l []ListDef) []ListDef + func FilterTag(tag string, l []ListDef) []ListDef + func ListDefsFromFile(path string) ([]ListDef, error) + func (def ListDef) ClientCfg() grpctls.ClientCfg + type ListDefsByID []ListDef + func (a ListDefsByID) Len() int + func (a ListDefsByID) Less(i, j int) bool + func (a ListDefsByID) Swap(i, j int) + type ListDefsByName []ListDef + func (a ListDefsByName) Len() int + func (a ListDefsByName) Less(i, j int) bool + func (a ListDefsByName) Swap(i, j int) + type WrapperDef struct + Class string + Opts map[string]interface{}