func (h *Handler) Path() string {
	return fmt.Sprintf("/nodeinfo/%s", h.version)
}
Path returns the HTTP REST endpoint for the NodeInfo handler.
package nodeinfo
import (
	"encoding/json"
	"fmt"
	"net/http"
	"github.com/trustbloc/edge-core/pkg/log"
	"github.com/trustbloc/sidetree-core-go/pkg/restapi/common"
)
const internalServerErrorResponse = "Internal Server Error.\n"
type nodeInfoRetriever interface {
	GetNodeInfo(version Version) *NodeInfo
}
type Handler struct {
	version     Version
	retriever   nodeInfoRetriever
	contentType string
	marshal     func(v interface{}) ([]byte, error)
	logger      logger
}
func NewHandler(version Version, retriever nodeInfoRetriever, logger logger) *Handler {
	if logger == nil {
		logger = log.New("nodeinfo")
	}
	return &Handler{
		version:   version,
		retriever: retriever,
		contentType: fmt.Sprintf(`application/json; profile="http://nodeinfo.diaspora.software/ns/schema/%s#"`,
			version),
		marshal: json.Marshal,
		logger:  logger,
	}
}