/* GetCountForDomain ... */ func (m *ManagerStruct) GetCountForDomain(domainID string) (interface{}, error) { var val, ok = m.domains[domainID] if ok == false { return 0, errors.New("No such domain: " + domainID) } var counter abstract.Counter counter = val.(abstract.Counter) count := counter.GetCount() return count, nil }
/* DeleteFromDomain ... */ func (m *ManagerStruct) DeleteFromDomain(domainID string, values []string) error { var val, ok = m.domains[domainID] if ok == false { return errors.New("No such domain: " + domainID) } var counter abstract.Counter counter = val.(abstract.Counter) bytes := make([][]byte, len(values), len(values)) for i, value := range values { bytes[i] = []byte(value) } ok, err := counter.RemoveMultiple(bytes) return err }