func (r *resource) PathParam(key string) string {
	return r.pathParams[key]
}
PathParam returns the parameter derived from the resource name for the key placeholder.
package res
import (
	"net/url"
	nats "github.com/nats-io/nats.go"
)
type Resource interface {
	Service() *Service
	ResourceName() string
	ResourceType() ResourceType
	PathParams() map[string]string
	PathParam(string) string
	Query() string
	Group() string
	ParseQuery() url.Values
	Value() (interface{}, error)
	RequireValue() interface{}
	Event(event string, payload interface{})
	ChangeEvent(props map[string]interface{})
	AddEvent(value interface{}, idx int)
	RemoveEvent(idx int)
	ReaccessEvent()
	ResetEvent()
	QueryEvent(func(QueryRequest))
	CreateEvent(value interface{})
	DeleteEvent()
}
type resource struct {
	rname      string
	pathParams map[string]string
	query      string
	group      string
	h          Handler
	listeners  []func(*Event)
	s          *Service
}
func (r *resource) Service() *Service {
	return r.s
}
func (r *resource) ResourceName() string {
	return r.rname
}
func (r *resource) ResourceType() ResourceType {
	return r.h.Type
}
func (r *resource) PathParams() map[string]string {
	return r.pathParams
}