func (c *motorcycleClient) Patch(uid runtime.UID, patch []byte) error {
	return c.storage.Patch(c.gvk, uid, patch)
}
Patch performs a strategic merge patch on the object with
the given UID, using the byte-encoded patch given
package client
import (
	"fmt"
	api "github.com/weaveworks/libgitops/cmd/sample-app/apis/sample"
	log "github.com/sirupsen/logrus"
	"github.com/weaveworks/libgitops/pkg/runtime"
	"github.com/weaveworks/libgitops/pkg/storage"
	"github.com/weaveworks/libgitops/pkg/storage/filterer"
	"k8s.io/apimachinery/pkg/runtime/schema"
)
type MotorcycleClient interface {
	New() *api.Motorcycle
	Get(runtime.UID) (*api.Motorcycle, error)
	Set(*api.Motorcycle) error
	Patch(runtime.UID, []byte) error
	Find(filter filterer.BaseFilter) (*api.Motorcycle, error)
	FindAll(filter filterer.BaseFilter) ([]*api.Motorcycle, error)
	Delete(uid runtime.UID) error
	List() ([]*api.Motorcycle, error)
}
func (c *SampleInternalClient) Motorcycles() MotorcycleClient {
	if c.motorcycleClient == nil {
		c.motorcycleClient = newMotorcycleClient(c.storage, c.gv)
	}
	return c.motorcycleClient
}
type motorcycleClient struct {
	storage  storage.Storage
	filterer *filterer.Filterer
	gvk      schema.GroupVersionKind
}
func newMotorcycleClient(s storage.Storage, gv schema.GroupVersion) MotorcycleClient {
	return &motorcycleClient{
		storage:  s,
		filterer: filterer.NewFilterer(s),
		gvk:      gv.WithKind(api.KindMotorcycle.Title()),
	}
}
func (c *motorcycleClient) New() *api.Motorcycle {
	log.Tracef("Client.New; GVK: %v", c.gvk)
	obj, err := c.storage.New(c.gvk)
	if err != nil {
		panic(fmt.Sprintf("Client.New must not return an error: %v", err))
	}
	return obj.(*api.Motorcycle)
}
func (c *motorcycleClient) Find(filter filterer.BaseFilter) (*api.Motorcycle, error) {
	log.Tracef("Client.Find; GVK: %v", c.gvk)
	object, err := c.filterer.Find(c.gvk, filter)
	if err != nil {
		return nil, err
	}
	return object.(*api.Motorcycle), nil
}
func (c *motorcycleClient) FindAll(filter filterer.BaseFilter) ([]*api.Motorcycle, error) {
	log.Tracef("Client.FindAll; GVK: %v", c.gvk)
	matches, err := c.filterer.FindAll(c.gvk, filter)
	if err != nil {
		return nil, err
	}
	results := make([]*api.Motorcycle, 0, len(matches))
	for _, item := range matches {
		results = append(results, item.(*api.Motorcycle))
	}
	return results, nil
}
func (c *motorcycleClient) Get(uid runtime.UID) (*api.Motorcycle, error) {
	log.Tracef("Client.Get; UID: %q, GVK: %v", uid, c.gvk)
	object, err := c.storage.Get(c.gvk, uid)
	if err != nil {
		return nil, err
	}
	return object.(*api.Motorcycle), nil
}
func (c *motorcycleClient) Set(motorcycle *api.Motorcycle) error {
	log.Tracef("Client.Set; UID: %q, GVK: %v", motorcycle.GetUID(), c.gvk)
	return c.storage.Set(c.gvk, motorcycle)
}