chore: move entity models into entity store service (#62145)

This commit is contained in:
Kristin Laemmert
2023-01-25 12:43:22 -05:00
committed by GitHub
parent 046a9bb7c1
commit dd147a3c31
27 changed files with 227 additions and 240 deletions
@@ -3,12 +3,11 @@ package sqlstash
import (
"encoding/json"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/store/entity"
)
type summarySupport struct {
model *models.EntitySummary
model *entity.EntitySummary
name string
description *string // null or empty
slug *string // null or empty
@@ -23,7 +22,7 @@ type summarySupport struct {
isNested bool // set when this is for a nested item
}
func newSummarySupport(summary *models.EntitySummary) (*summarySupport, error) {
func newSummarySupport(summary *entity.EntitySummary) (*summarySupport, error) {
var err error
var js []byte
s := &summarySupport{
@@ -72,9 +71,9 @@ func newSummarySupport(summary *models.EntitySummary) (*summarySupport, error) {
return s, err
}
func (s summarySupport) toEntitySummary() (*models.EntitySummary, error) {
func (s summarySupport) toEntitySummary() (*entity.EntitySummary, error) {
var err error
summary := &models.EntitySummary{
summary := &entity.EntitySummary{
Name: s.name,
}
if s.description != nil {