1package fixture 2 3import ( 4 "fmt" 5 6 corev2 "github.com/sensu/sensu-go/api/core/v2" 7) 8 9// Resource is a resource fixture 10type Resource struct { 11 corev2.ObjectMeta 12 Foo string 13} 14 15// GetObjectMeta ... 16func (f *Resource) GetObjectMeta() corev2.ObjectMeta { 17 return f.ObjectMeta 18} 19 20// SetNamespace ... 21func (f *Resource) SetNamespace(namespace string) { 22 f.Namespace = namespace 23} 24 25// StorePrefix ... 26func (f *Resource) StorePrefix() string { 27 return "resource" 28} 29 30// URIPath ... 31func (f *Resource) URIPath() string { 32 return fmt.Sprintf("/resource/%s", f.Name) 33} 34 35// Validate ... 36func (f *Resource) Validate() error { 37 return nil 38} 39