mock

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

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

Mock is a service to read-write mocks during record and replay in unit-tests only.

func NewMockService

func NewMockService(mockFS models.MockFS, log *zap.Logger) *Mock

func (*Mock) FileExists added in v0.5.2

func (m *Mock) FileExists(ctx context.Context, path string) bool

func (*Mock) GetAll added in v0.5.0

func (m *Mock) GetAll(ctx context.Context, path string, name string) ([]models.Mock, error)

func (*Mock) Put

func (m *Mock) Put(ctx context.Context, path string, doc models.Mock, meta interface{}) error

type Service

type Service interface {
	Put(ctx context.Context, path string, doc models.Mock, meta interface{}) error
	GetAll(ctx context.Context, path string, name string) ([]models.Mock, error)
	FileExists(ctx context.Context, path string) bool
}

Jump to

Keyboard shortcuts

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