func WriteMethods() []*regexp.Regexp {
	return []*regexp.Regexp{
		regexp.MustCompile(baseMethod + "New"),
		regexp.MustCompile(baseMethod + "Update"),
		regexp.MustCompile(baseMethod + "Delete"),
	}
}
WriteMethods returns regexp slice of writable methods, mostly used by the acl
package product
import (
	"github.com/digota/digota/product/productpb"
	"google.golang.org/grpc"
	"regexp"
)
const baseMethod = "^(.productpb.ProductService/)"
var service Interface
type Interface interface {
	productpb.ProductServiceServer
}
func RegisterService(p Interface) {
	if service != nil {
		panic("ProductService is already registered")
	}
	service = p
}
func Service() Interface {
	if service == nil {
		panic("ProductService is not registered")
	}
	return service
}
func RegisterProductServer(server *grpc.Server) {
	productpb.RegisterProductServiceServer(server, Service())
}
func ReadMethods() []*regexp.Regexp {
	return []*regexp.Regexp{
		regexp.MustCompile(baseMethod + "Get"),
		regexp.MustCompile(baseMethod + "List"),
	}
}