2023-02-20 19:11:18 +00:00
|
|
|
package snapshot
|
|
|
|
|
|
|
|
import (
|
|
|
|
portainer "github.com/portainer/portainer/api"
|
2023-06-20 20:51:34 +00:00
|
|
|
"github.com/portainer/portainer/api/dataservices"
|
2023-02-20 19:11:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type ServiceTx struct {
|
2023-06-22 21:28:07 +00:00
|
|
|
dataservices.BaseDataServiceTx[portainer.Snapshot, portainer.EndpointID]
|
2023-02-20 19:11:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (service ServiceTx) Create(snapshot *portainer.Snapshot) error {
|
2023-06-22 21:28:07 +00:00
|
|
|
return service.Tx.CreateObjectWithId(BucketName, int(snapshot.EndpointID), snapshot)
|
2023-02-20 19:11:18 +00:00
|
|
|
}
|