refactor(grafanabackuper): add grafanabackuper package with backup functionality
This commit is contained in:
parent
74cb5e0264
commit
453041b4b2
3 changed files with 263 additions and 0 deletions
20
pkg/grafanabackuper/message.go
Normal file
20
pkg/grafanabackuper/message.go
Normal file
|
@ -0,0 +1,20 @@
|
|||
package grafanabackuper
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Message struct {
|
||||
ID uint
|
||||
Path string
|
||||
Title string
|
||||
UID string
|
||||
}
|
||||
|
||||
func (m Message) String() string {
|
||||
commitMsg := fmt.Sprintf("%s: Update %s to version %d", m.Path, m.UID, m.ID)
|
||||
|
||||
if m.Title != "" {
|
||||
commitMsg += fmt.Sprintf(" => %s", m.Title)
|
||||
}
|
||||
|
||||
return commitMsg
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue