// Automatically generated by mockimpl. DO NOT EDIT!

package mock

import (
	"time"

	"github.com/fleetdm/fleet/v4/server/fleet"
)

var _ fleet.CarveStore = (*CarveStore)(nil)

type NewCarveFunc func(metadata *fleet.CarveMetadata) (*fleet.CarveMetadata, error)

type UpdateCarveFunc func(metadata *fleet.CarveMetadata) error

type CarveFunc func(carveId int64) (*fleet.CarveMetadata, error)

type CarveBySessionIdFunc func(sessionId string) (*fleet.CarveMetadata, error)

type CarveByNameFunc func(name string) (*fleet.CarveMetadata, error)

type ListCarvesFunc func(opt fleet.CarveListOptions) ([]*fleet.CarveMetadata, error)

type NewBlockFunc func(metadata *fleet.CarveMetadata, blockId int64, data []byte) error

type GetBlockFunc func(metadata *fleet.CarveMetadata, blockId int64) ([]byte, error)

type CleanupCarvesFunc func(now time.Time) (expired int, err error)

type CarveStore struct {
	NewCarveFunc        NewCarveFunc
	NewCarveFuncInvoked bool

	UpdateCarveFunc        UpdateCarveFunc
	UpdateCarveFuncInvoked bool

	CarveFunc        CarveFunc
	CarveFuncInvoked bool

	CarveBySessionIdFunc        CarveBySessionIdFunc
	CarveBySessionIdFuncInvoked bool

	CarveByNameFunc        CarveByNameFunc
	CarveByNameFuncInvoked bool

	ListCarvesFunc        ListCarvesFunc
	ListCarvesFuncInvoked bool

	NewBlockFunc        NewBlockFunc
	NewBlockFuncInvoked bool

	GetBlockFunc        GetBlockFunc
	GetBlockFuncInvoked bool

	CleanupCarvesFunc        CleanupCarvesFunc
	CleanupCarvesFuncInvoked bool
}

func (s *CarveStore) NewCarve(metadata *fleet.CarveMetadata) (*fleet.CarveMetadata, error) {
	s.NewCarveFuncInvoked = true
	return s.NewCarveFunc(metadata)
}

func (s *CarveStore) UpdateCarve(metadata *fleet.CarveMetadata) error {
	s.UpdateCarveFuncInvoked = true
	return s.UpdateCarveFunc(metadata)
}

func (s *CarveStore) Carve(carveId int64) (*fleet.CarveMetadata, error) {
	s.CarveFuncInvoked = true
	return s.CarveFunc(carveId)
}

func (s *CarveStore) CarveBySessionId(sessionId string) (*fleet.CarveMetadata, error) {
	s.CarveBySessionIdFuncInvoked = true
	return s.CarveBySessionIdFunc(sessionId)
}

func (s *CarveStore) CarveByName(name string) (*fleet.CarveMetadata, error) {
	s.CarveByNameFuncInvoked = true
	return s.CarveByNameFunc(name)
}

func (s *CarveStore) ListCarves(opt fleet.CarveListOptions) ([]*fleet.CarveMetadata, error) {
	s.ListCarvesFuncInvoked = true
	return s.ListCarvesFunc(opt)
}

func (s *CarveStore) NewBlock(metadata *fleet.CarveMetadata, blockId int64, data []byte) error {
	s.NewBlockFuncInvoked = true
	return s.NewBlockFunc(metadata, blockId, data)
}

func (s *CarveStore) GetBlock(metadata *fleet.CarveMetadata, blockId int64) ([]byte, error) {
	s.GetBlockFuncInvoked = true
	return s.GetBlockFunc(metadata, blockId)
}

func (s *CarveStore) CleanupCarves(now time.Time) (expired int, err error) {
	s.CleanupCarvesFuncInvoked = true
	return s.CleanupCarvesFunc(now)
}
