testautomation

package
v0.1.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	DeleteUserFiles blinkfile.UserID
	TimeOffset      longduration.LongDuration
	DeleteAllUsers  bool
}

type Automator

type Automator struct {
	Log app.Log
	Clock
	FileRepo
	UserRepo       UserRepo
	CredentialRepo CredentialRepo
}

func (*Automator) TestAutomation

func (a *Automator) TestAutomation(ctx context.Context, args Args) error

type Clock

type Clock interface {
	Now() time.Time
	SetTimeOffset(time.Duration)
}

type CredentialRepo added in v0.1.22

type CredentialRepo interface {
	Remove(context.Context, blinkfile.UserID) error
}

type FileRepo

type FileRepo interface {
	ListByUser(context.Context, blinkfile.UserID) ([]blinkfile.FileHeader, error)
	Delete(context.Context, blinkfile.UserID, []blinkfile.FileID) error
}

type TestClock

type TestClock struct {
	Offset time.Duration
}

func (*TestClock) Now

func (c *TestClock) Now() time.Time

func (*TestClock) SetTimeOffset

func (c *TestClock) SetTimeOffset(d time.Duration)

func (*TestClock) TimeOffset

func (c *TestClock) TimeOffset() time.Duration

type UserRepo added in v0.1.17

type UserRepo interface {
	ListAll(context.Context) ([]blinkfile.User, error)
	Delete(context.Context, blinkfile.UserID) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL