LibraryPanels: adds connections (#30212)

* LibraryPanels: adds connections

* Chore: testing signing verification

* Update pkg/services/librarypanels/librarypanels_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/services/librarypanels/librarypanels_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/services/librarypanels/librarypanels_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/services/librarypanels/librarypanels_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/services/librarypanels/librarypanels_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/services/librarypanels/librarypanels_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/services/librarypanels/librarypanels_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: changes after PR comments

* Chore: changes after PR comments

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Hugo Häggmark
2021-01-12 12:57:40 +01:00
committed by GitHub
parent 4420a959f1
commit d6449c16c7
5 changed files with 285 additions and 3 deletions

View File

@@ -22,11 +22,24 @@ type LibraryPanel struct {
UpdatedBy int64
}
// libraryPanelDashboard is the model for library panel connections.
type libraryPanelDashboard struct {
ID int64 `xorm:"pk autoincr 'id'"`
LibraryPanelID int64 `xorm:"librarypanel_id"`
DashboardID int64 `xorm:"dashboard_id"`
Created time.Time
CreatedBy int64
}
var (
// errLibraryPanelAlreadyExists is an error for when the user tries to add a library panel that already exists.
errLibraryPanelAlreadyExists = errors.New("library panel with that name already exists")
// errLibraryPanelNotFound is an error for when a library panel can't be found.
errLibraryPanelNotFound = errors.New("library panel could not be found")
// errLibraryPanelDashboardNotFound is an error for when a library panel connection can't be found.
errLibraryPanelDashboardNotFound = errors.New("library panel connection could not be found")
)
// Commands