func (mmEncrypt *mRingMockEncrypt) Inspect(f func(t1 secrets.Text)) *mRingMockEncrypt {
	if mmEncrypt.mock.inspectFuncEncrypt != nil {
		mmEncrypt.mock.t.Fatalf("Inspect function is already set for RingMock.Encrypt")
	}
	mmEncrypt.mock.inspectFuncEncrypt = f
	return mmEncrypt
}
Inspect accepts an inspector function that has same arguments as the Ring.Encrypt
package keyring
import (
	"sync"
	mm_atomic "sync/atomic"
	mm_time "time"
	"github.com/gojuno/minimock/v3"
	"gophers.dev/cmds/envy/internal/safe"
	"gophers.dev/pkgs/secrets"
)
type RingMock struct {
	t minimock.Tester
	funcDecrypt          func(e1 safe.Encrypted) (t1 secrets.Text)
	inspectFuncDecrypt   func(e1 safe.Encrypted)
	afterDecryptCounter  uint64
	beforeDecryptCounter uint64
	DecryptMock          mRingMockDecrypt
	funcEncrypt          func(t1 secrets.Text) (e1 safe.Encrypted)
	inspectFuncEncrypt   func(t1 secrets.Text)
	afterEncryptCounter  uint64
	beforeEncryptCounter uint64
	EncryptMock          mRingMockEncrypt
}
func NewRingMock(t minimock.Tester) *RingMock {
	m := &RingMock{t: t}
	if controller, ok := t.(minimock.MockController); ok {
		controller.RegisterMocker(m)
	}
	m.DecryptMock = mRingMockDecrypt{mock: m}
	m.DecryptMock.callArgs = []*RingMockDecryptParams{}
	m.EncryptMock = mRingMockEncrypt{mock: m}
	m.EncryptMock.callArgs = []*RingMockEncryptParams{}
	return m
}
type mRingMockDecrypt struct {
	mock               *RingMock
	defaultExpectation *RingMockDecryptExpectation
	expectations       []*RingMockDecryptExpectation
	callArgs []*RingMockDecryptParams
	mutex    sync.RWMutex
}
type RingMockDecryptExpectation struct {
	mock    *RingMock
	params  *RingMockDecryptParams
	results *RingMockDecryptResults
	Counter uint64
}
type RingMockDecryptParams struct {
	e1 safe.Encrypted
}
type RingMockDecryptResults struct {
	t1 secrets.Text
}
func (mmDecrypt *mRingMockDecrypt) Expect(e1 safe.Encrypted) *mRingMockDecrypt {
	if mmDecrypt.mock.funcDecrypt != nil {
		mmDecrypt.mock.t.Fatalf("RingMock.Decrypt mock is already set by Set")
	}
	if mmDecrypt.defaultExpectation == nil {
		mmDecrypt.defaultExpectation = &RingMockDecryptExpectation{}
	}
	mmDecrypt.defaultExpectation.params = &RingMockDecryptParams{e1}
	for _, e := range mmDecrypt.expectations {
		if minimock.Equal(e.params, mmDecrypt.defaultExpectation.params) {
			mmDecrypt.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmDecrypt.defaultExpectation.params)
		}
	}
	return mmDecrypt
}
func (mmDecrypt *mRingMockDecrypt) Inspect(f func(e1 safe.Encrypted)) *mRingMockDecrypt {
	if mmDecrypt.mock.inspectFuncDecrypt != nil {
		mmDecrypt.mock.t.Fatalf("Inspect function is already set for RingMock.Decrypt")
	}
	mmDecrypt.mock.inspectFuncDecrypt = f
	return mmDecrypt
}
func (mmDecrypt *mRingMockDecrypt) Return(t1 secrets.Text) *RingMock {
	if mmDecrypt.mock.funcDecrypt != nil {
		mmDecrypt.mock.t.Fatalf("RingMock.Decrypt mock is already set by Set")
	}
	if mmDecrypt.defaultExpectation == nil {
		mmDecrypt.defaultExpectation = &RingMockDecryptExpectation{mock: mmDecrypt.mock}
	}
	mmDecrypt.defaultExpectation.results = &RingMockDecryptResults{t1}
	return mmDecrypt.mock
}
func (mmDecrypt *mRingMockDecrypt) Set(f func(e1 safe.Encrypted) (t1 secrets.Text)) *RingMock {
	if mmDecrypt.defaultExpectation != nil {
		mmDecrypt.mock.t.Fatalf("Default expectation is already set for the Ring.Decrypt method")
	}
	if len(mmDecrypt.expectations) > 0 {
		mmDecrypt.mock.t.Fatalf("Some expectations are already set for the Ring.Decrypt method")
	}
	mmDecrypt.mock.funcDecrypt = f
	return mmDecrypt.mock
}
func (mmDecrypt *mRingMockDecrypt) When(e1 safe.Encrypted) *RingMockDecryptExpectation {
	if mmDecrypt.mock.funcDecrypt != nil {
		mmDecrypt.mock.t.Fatalf("RingMock.Decrypt mock is already set by Set")
	}
	expectation := &RingMockDecryptExpectation{
		mock:   mmDecrypt.mock,
		params: &RingMockDecryptParams{e1},
	}
	mmDecrypt.expectations = append(mmDecrypt.expectations, expectation)
	return expectation
}
func (e *RingMockDecryptExpectation) Then(t1 secrets.Text) *RingMock {
	e.results = &RingMockDecryptResults{t1}
	return e.mock
}
func (mmDecrypt *RingMock) Decrypt(e1 safe.Encrypted) (t1 secrets.Text) {
	mm_atomic.AddUint64(&mmDecrypt.beforeDecryptCounter, 1)
	defer mm_atomic.AddUint64(&mmDecrypt.afterDecryptCounter, 1)
	if mmDecrypt.inspectFuncDecrypt != nil {
		mmDecrypt.inspectFuncDecrypt(e1)
	}
	mm_params := &RingMockDecryptParams{e1}
	mmDecrypt.DecryptMock.mutex.Lock()
	mmDecrypt.DecryptMock.callArgs = append(mmDecrypt.DecryptMock.callArgs, mm_params)
	mmDecrypt.DecryptMock.mutex.Unlock()
	for _, e := range mmDecrypt.DecryptMock.expectations {
		if minimock.Equal(e.params, mm_params) {
			mm_atomic.AddUint64(&e.Counter, 1)
			return e.results.t1
		}
	}
	if mmDecrypt.DecryptMock.defaultExpectation != nil {
		mm_atomic.AddUint64(&mmDecrypt.DecryptMock.defaultExpectation.Counter, 1)
		mm_want := mmDecrypt.DecryptMock.defaultExpectation.params
		mm_got := RingMockDecryptParams{e1}
		if mm_want != nil && !minimock.Equal(*mm_want, mm_got) {
			mmDecrypt.t.Errorf("RingMock.Decrypt got unexpected parameters, want: %#v, got: %#v%s\n", *mm_want, mm_got, minimock.Diff(*mm_want, mm_got))
		}
		mm_results := mmDecrypt.DecryptMock.defaultExpectation.results
		if mm_results == nil {
			mmDecrypt.t.Fatal("No results are set for the RingMock.Decrypt")
		}
		return (*mm_results).t1
	}
	if mmDecrypt.funcDecrypt != nil {
		return mmDecrypt.funcDecrypt(e1)
	}
	mmDecrypt.t.Fatalf("Unexpected call to RingMock.Decrypt. %v", e1)
	return
}
func (mmDecrypt *RingMock) DecryptAfterCounter() uint64 {
	return mm_atomic.LoadUint64(&mmDecrypt.afterDecryptCounter)
}
func (mmDecrypt *RingMock) DecryptBeforeCounter() uint64 {
	return mm_atomic.LoadUint64(&mmDecrypt.beforeDecryptCounter)
}
func (mmDecrypt *mRingMockDecrypt) Calls() []*RingMockDecryptParams {
	mmDecrypt.mutex.RLock()
	argCopy := make([]*RingMockDecryptParams, len(mmDecrypt.callArgs))
	copy(argCopy, mmDecrypt.callArgs)
	mmDecrypt.mutex.RUnlock()
	return argCopy
}
func (m *RingMock) MinimockDecryptDone() bool {
	for _, e := range m.DecryptMock.expectations {
		if mm_atomic.LoadUint64(&e.Counter) < 1 {
			return false
		}
	}
	if m.DecryptMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterDecryptCounter) < 1 {
		return false
	}
	if m.funcDecrypt != nil && mm_atomic.LoadUint64(&m.afterDecryptCounter) < 1 {
		return false
	}
	return true
}
func (m *RingMock) MinimockDecryptInspect() {
	for _, e := range m.DecryptMock.expectations {
		if mm_atomic.LoadUint64(&e.Counter) < 1 {
			m.t.Errorf("Expected call to RingMock.Decrypt with params: %#v", *e.params)
		}
	}
	if m.DecryptMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterDecryptCounter) < 1 {
		if m.DecryptMock.defaultExpectation.params == nil {
			m.t.Error("Expected call to RingMock.Decrypt")
		} else {
			m.t.Errorf("Expected call to RingMock.Decrypt with params: %#v", *m.DecryptMock.defaultExpectation.params)
		}
	}
	if m.funcDecrypt != nil && mm_atomic.LoadUint64(&m.afterDecryptCounter) < 1 {
		m.t.Error("Expected call to RingMock.Decrypt")
	}
}
type mRingMockEncrypt struct {
	mock               *RingMock
	defaultExpectation *RingMockEncryptExpectation
	expectations       []*RingMockEncryptExpectation
	callArgs []*RingMockEncryptParams
	mutex    sync.RWMutex
}
type RingMockEncryptExpectation struct {
	mock    *RingMock
	params  *RingMockEncryptParams
	results *RingMockEncryptResults
	Counter uint64
}
type RingMockEncryptParams struct {
	t1 secrets.Text
}
type RingMockEncryptResults struct {
	e1 safe.Encrypted
}
func (mmEncrypt *mRingMockEncrypt) Expect(t1 secrets.Text) *mRingMockEncrypt {
	if mmEncrypt.mock.funcEncrypt != nil {
		mmEncrypt.mock.t.Fatalf("RingMock.Encrypt mock is already set by Set")
	}
	if mmEncrypt.defaultExpectation == nil {
		mmEncrypt.defaultExpectation = &RingMockEncryptExpectation{}
	}
	mmEncrypt.defaultExpectation.params = &RingMockEncryptParams{t1}
	for _, e := range mmEncrypt.expectations {
		if minimock.Equal(e.params, mmEncrypt.defaultExpectation.params) {
			mmEncrypt.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmEncrypt.defaultExpectation.params)
		}
	}
	return mmEncrypt
}