resources: Add resource sorting and clean tests

Resource sorting is needed for comparing resource groups.
This commit is contained in:
James Shubin
2017-06-08 00:07:23 -04:00
parent 9f5057eac7
commit dacbf9b68d
4 changed files with 177 additions and 81 deletions

View File

@@ -115,11 +115,13 @@ type ResData struct {
// The Base interface is everything that is common to all resources.
// Everything here only needs to be implemented once, in the BaseRes.
type Base interface {
fmt.Stringer // String() string
GetName() string // can't be named "Name()" because of struct field
SetName(string)
SetKind(string)
GetKind() string
String() string
Meta() *MetaParams
Events() chan *event.Event
Data() *ResData