-
Notifications
You must be signed in to change notification settings - Fork 3
/
creator.go
31 lines (23 loc) · 645 Bytes
/
creator.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package simplemaria
import (
"github.com/xyproto/pinterface"
)
// For implementing pinterface.ICreator
type MariaCreator struct {
host *Host
}
func NewCreator(host *Host) *MariaCreator {
return &MariaCreator{host}
}
func (m *MariaCreator) NewList(id string) (pinterface.IList, error) {
return NewList(m.host, id)
}
func (m *MariaCreator) NewSet(id string) (pinterface.ISet, error) {
return NewSet(m.host, id)
}
func (m *MariaCreator) NewHashMap(id string) (pinterface.IHashMap, error) {
return NewHashMap(m.host, id)
}
func (m *MariaCreator) NewKeyValue(id string) (pinterface.IKeyValue, error) {
return NewKeyValue(m.host, id)
}