storage

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SelectedDeviceVariable    = variablePrefix + "SELECTED_DEVICE"
	SelectedLanguageVariable  = variablePrefix + "SELECTED_LANGUAGE"
	SelectedFloatingVariable  = variablePrefix + "SELECTED_FLOATING"
	SelectedClipboardVariable = variablePrefix + "SELECTED_CLIPBOARD"
	SelectedViewModeVariable  = variablePrefix + "SELECTED_VIEW_MODE"
	TaskIDVariable            = variablePrefix + "TASK_ID"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key string

type Storage

type Storage interface {
	GetValue(ctx context.Context, key Key) (string, error)
	SetValue(ctx context.Context, key Key, value string) error
}

func NewStorage

func NewStorage(httpClient http.Client) Storage

type StorageMock

type StorageMock struct {
	GetValueMock mStorageMockGetValue

	SetValueMock mStorageMockSetValue
	// contains filtered or unexported fields
}

StorageMock implements Storage

func NewStorageMock

func NewStorageMock(t minimock.Tester) *StorageMock

NewStorageMock returns a mock for Storage

func (*StorageMock) GetValue

func (mmGetValue *StorageMock) GetValue(ctx context.Context, key Key) (s1 string, err error)

GetValue implements Storage

func (*StorageMock) GetValueAfterCounter

func (mmGetValue *StorageMock) GetValueAfterCounter() uint64

GetValueAfterCounter returns a count of finished StorageMock.GetValue invocations

func (*StorageMock) GetValueBeforeCounter

func (mmGetValue *StorageMock) GetValueBeforeCounter() uint64

GetValueBeforeCounter returns a count of StorageMock.GetValue invocations

func (*StorageMock) MinimockFinish

func (m *StorageMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*StorageMock) MinimockGetValueDone

func (m *StorageMock) MinimockGetValueDone() bool

MinimockGetValueDone returns true if the count of the GetValue invocations corresponds the number of defined expectations

func (*StorageMock) MinimockGetValueInspect

func (m *StorageMock) MinimockGetValueInspect()

MinimockGetValueInspect logs each unmet expectation

func (*StorageMock) MinimockSetValueDone

func (m *StorageMock) MinimockSetValueDone() bool

MinimockSetValueDone returns true if the count of the SetValue invocations corresponds the number of defined expectations

func (*StorageMock) MinimockSetValueInspect

func (m *StorageMock) MinimockSetValueInspect()

MinimockSetValueInspect logs each unmet expectation

func (*StorageMock) MinimockWait

func (m *StorageMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*StorageMock) SetValue

func (mmSetValue *StorageMock) SetValue(ctx context.Context, key Key, value string) (err error)

SetValue implements Storage

func (*StorageMock) SetValueAfterCounter

func (mmSetValue *StorageMock) SetValueAfterCounter() uint64

SetValueAfterCounter returns a count of finished StorageMock.SetValue invocations

func (*StorageMock) SetValueBeforeCounter

func (mmSetValue *StorageMock) SetValueBeforeCounter() uint64

SetValueBeforeCounter returns a count of StorageMock.SetValue invocations

type StorageMockGetValueExpectation

type StorageMockGetValueExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StorageMockGetValueExpectation specifies expectation struct of the Storage.GetValue

func (*StorageMockGetValueExpectation) Then

Then sets up Storage.GetValue return parameters for the expectation previously defined by the When method

type StorageMockGetValueExpectationOrigins

type StorageMockGetValueExpectationOrigins struct {
	// contains filtered or unexported fields
}

StorageMockGetValueOrigins contains origins of expectations of the Storage.GetValue

type StorageMockGetValueParamPtrs

type StorageMockGetValueParamPtrs struct {
	// contains filtered or unexported fields
}

StorageMockGetValueParamPtrs contains pointers to parameters of the Storage.GetValue

type StorageMockGetValueParams

type StorageMockGetValueParams struct {
	// contains filtered or unexported fields
}

StorageMockGetValueParams contains parameters of the Storage.GetValue

type StorageMockGetValueResults

type StorageMockGetValueResults struct {
	// contains filtered or unexported fields
}

StorageMockGetValueResults contains results of the Storage.GetValue

type StorageMockSetValueExpectation

type StorageMockSetValueExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

StorageMockSetValueExpectation specifies expectation struct of the Storage.SetValue

func (*StorageMockSetValueExpectation) Then

Then sets up Storage.SetValue return parameters for the expectation previously defined by the When method

type StorageMockSetValueExpectationOrigins

type StorageMockSetValueExpectationOrigins struct {
	// contains filtered or unexported fields
}

StorageMockSetValueOrigins contains origins of expectations of the Storage.SetValue

type StorageMockSetValueParamPtrs

type StorageMockSetValueParamPtrs struct {
	// contains filtered or unexported fields
}

StorageMockSetValueParamPtrs contains pointers to parameters of the Storage.SetValue

type StorageMockSetValueParams

type StorageMockSetValueParams struct {
	// contains filtered or unexported fields
}

StorageMockSetValueParams contains parameters of the Storage.SetValue

type StorageMockSetValueResults

type StorageMockSetValueResults struct {
	// contains filtered or unexported fields
}

StorageMockSetValueResults contains results of the Storage.SetValue

Jump to

Keyboard shortcuts

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