Documentation ¶
Index ¶
- type Group
- type GroupBlock
- type GroupsBucket
- func (i *GroupsBucket) Contains(group string) bool
- func (i *GroupsBucket) ConvertToGroupLikeKey(key string) string
- func (i *GroupsBucket) CreateAndPersistGroupAndStore(key string, domains []string, forwarders []net.UDPAddr) (Group, store.GroupStoreData, error)
- func (i *GroupsBucket) CreateUnboundGroup(key string, domains []string, forwarders []net.UDPAddr) Group
- func (i *GroupsBucket) Delete(groupName string) bool
- func (i *GroupsBucket) GetGroupById(id string) (Group, error)
- func (i *GroupsBucket) GetGroupByName(name string) (Group, error)
- func (i *GroupsBucket) GetGroupStore(group Group) (store.GroupStoreData, error)
- func (i *GroupsBucket) GetGroupsByDomain(domain string) ([]Group, error)
- func (i *GroupsBucket) Keys() []string
- func (i *GroupsBucket) ListGroups() []Group
- func (i *GroupsBucket) Load(defaultForwarders []net.UDPAddr) error
- func (i *GroupsBucket) ReLoad() error
- func (i *GroupsBucket) SaveGroup(groupStore store.GroupStoreData, group Group) (Group, error)
- func (i *GroupsBucket) SaveGroups(groupsStore store.GroupsStoreData) error
- func (i *GroupsBucket) SaveMeta() error
- func (i *GroupsBucket) UpdateExistingGroup(group Group) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct { Name string `yaml:"name" json:"name" xml:"name"` File string `yaml:"file" json:"file" xml:"file"` NumRecs int64 `yaml:"numberOfRecords" json:"numberOfRecords" xml:"number-of-records"` Domains []string `yaml:"domains,omitempty" json:"domains,omitempty" xml:"domains,omitempty"` Forwarders []net.UDPAddr `yaml:"forwarders,omitempty" json:"forwarders,omitempty" xml:"forwarders,omitempty"` }
type GroupBlock ¶
type GroupBlock struct { Group Group Data store.GroupStoreData }
type GroupsBucket ¶
type GroupsBucket struct { sync.Mutex Folder string `yaml:"dataFolder" json:"dataFolder" xml:"data-folder"` Groups map[string]Group `yaml:"groups" json:"groups" xml:"groups"` // contains filtered or unexported fields }
func NewGroupsBucket ¶
func NewGroupsBucket(folder string, log log.Logger) GroupsBucket
func (*GroupsBucket) Contains ¶
func (i *GroupsBucket) Contains(group string) bool
func (*GroupsBucket) ConvertToGroupLikeKey ¶
func (i *GroupsBucket) ConvertToGroupLikeKey(key string) string
func (*GroupsBucket) CreateAndPersistGroupAndStore ¶
func (i *GroupsBucket) CreateAndPersistGroupAndStore(key string, domains []string, forwarders []net.UDPAddr) (Group, store.GroupStoreData, error)
func (*GroupsBucket) CreateUnboundGroup ¶
func (*GroupsBucket) Delete ¶
func (i *GroupsBucket) Delete(groupName string) bool
func (*GroupsBucket) GetGroupById ¶
func (i *GroupsBucket) GetGroupById(id string) (Group, error)
func (*GroupsBucket) GetGroupByName ¶
func (i *GroupsBucket) GetGroupByName(name string) (Group, error)
func (*GroupsBucket) GetGroupStore ¶
func (i *GroupsBucket) GetGroupStore(group Group) (store.GroupStoreData, error)
func (*GroupsBucket) GetGroupsByDomain ¶
func (i *GroupsBucket) GetGroupsByDomain(domain string) ([]Group, error)
func (*GroupsBucket) Keys ¶
func (i *GroupsBucket) Keys() []string
func (*GroupsBucket) ListGroups ¶
func (i *GroupsBucket) ListGroups() []Group
func (*GroupsBucket) ReLoad ¶
func (i *GroupsBucket) ReLoad() error
func (*GroupsBucket) SaveGroup ¶
func (i *GroupsBucket) SaveGroup(groupStore store.GroupStoreData, group Group) (Group, error)
func (*GroupsBucket) SaveGroups ¶
func (i *GroupsBucket) SaveGroups(groupsStore store.GroupsStoreData) error
func (*GroupsBucket) SaveMeta ¶
func (i *GroupsBucket) SaveMeta() error
func (*GroupsBucket) UpdateExistingGroup ¶
func (i *GroupsBucket) UpdateExistingGroup(group Group) bool
Click to show internal directories.
Click to hide internal directories.