mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
8acf14ab43
Related to #7206, this delegates the handling of the download to the browser
45 lines
1.1 KiB
Go
45 lines
1.1 KiB
Go
// Automatically generated by mockimpl. DO NOT EDIT!
|
|
|
|
package mock
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
)
|
|
|
|
var _ fleet.InstallerStore = (*InstallerStore)(nil)
|
|
|
|
type GetFunc func(ctx context.Context, installer fleet.Installer) (io.ReadCloser, int64, error)
|
|
|
|
type PutFunc func(ctx context.Context, installer fleet.Installer) (string, error)
|
|
|
|
type ExistsFunc func(ctx context.Context, installer fleet.Installer) (bool, error)
|
|
|
|
type InstallerStore struct {
|
|
GetFunc GetFunc
|
|
GetFuncInvoked bool
|
|
|
|
PutFunc PutFunc
|
|
PutFuncInvoked bool
|
|
|
|
ExistsFunc ExistsFunc
|
|
ExistsFuncInvoked bool
|
|
}
|
|
|
|
func (s *InstallerStore) Get(ctx context.Context, installer fleet.Installer) (io.ReadCloser, int64, error) {
|
|
s.GetFuncInvoked = true
|
|
return s.GetFunc(ctx, installer)
|
|
}
|
|
|
|
func (s *InstallerStore) Put(ctx context.Context, installer fleet.Installer) (string, error) {
|
|
s.PutFuncInvoked = true
|
|
return s.PutFunc(ctx, installer)
|
|
}
|
|
|
|
func (s *InstallerStore) Exists(ctx context.Context, installer fleet.Installer) (bool, error) {
|
|
s.ExistsFuncInvoked = true
|
|
return s.ExistsFunc(ctx, installer)
|
|
}
|