/
collection.go
52 lines (42 loc) · 1.42 KB
/
collection.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package space
import (
"github.com/the-anna-project/annad/object/config/space/connection"
"github.com/the-anna-project/annad/object/config/space/dimension"
"github.com/the-anna-project/annad/object/config/space/peer"
)
// NewCollection creates a new space object. It provides configuration for the
// connection space.
func NewCollection() *Collection {
return &Collection{}
}
// Collection represents the space collection.
type Collection struct {
// Settings.
connection *connection.Object
dimension *dimension.Object
peer *peer.Object
}
// Connection returns the connection space config of the space collection.
func (c *Collection) Connection() *connection.Object {
return c.connection
}
// Dimension returns the space dimension config of the space collection.
func (c *Collection) Dimension() *dimension.Object {
return c.dimension
}
// Peer returns the space peer config of the space collection.
func (c *Collection) Peer() *peer.Object {
return c.peer
}
// SetConnection sets the connection space config for the space collection.
func (c *Collection) SetConnection(connection *connection.Object) {
c.connection = connection
}
// SetDimension sets the space dimension config for the space collection.
func (c *Collection) SetDimension(dimension *dimension.Object) {
c.dimension = dimension
}
// SetPeer sets the space peer config for the space collection.
func (c *Collection) SetPeer(peer *peer.Object) {
c.peer = peer
}