memory

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

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

func New

func New() *Memory

func (*Memory) CreateRoute

func (m *Memory) CreateRoute(ctx context.Context, mockID string, data string) error

func (*Memory) DeleteRoute

func (m *Memory) DeleteRoute(ctx context.Context, mockID string, routeID string) error

func (*Memory) Get

func (m *Memory) Get(_ context.Context, mockID, key string) (string, error)

func (*Memory) GetActiveSession

func (m *Memory) GetActiveSession(ctx context.Context, mockID string) (string, error)

func (*Memory) GetInt

func (m *Memory) GetInt(ctx context.Context, mockID, key string) (int, error)

func (*Memory) GetMock

func (m *Memory) GetMock(_ context.Context, id string) (*mock.Mock, error)

func (*Memory) GetMocks

func (m *Memory) GetMocks(_ context.Context) ([]*mock.Mock, error)

func (*Memory) Increment

func (m *Memory) Increment(_ context.Context, mockID, key string) (int, error)

func (*Memory) PatchResponse

func (m *Memory) PatchResponse(ctx context.Context, mockID, routeID, responseID, data string) error

func (*Memory) PatchRoute

func (m *Memory) PatchRoute(ctx context.Context, mockID string, routeID string, data string) error

func (*Memory) Set

func (m *Memory) Set(_ context.Context, mockID, key string, value string) error

func (*Memory) SetActiveSession

func (m *Memory) SetActiveSession(ctx context.Context, mockID string, sessionID string) error

func (*Memory) SetMock

func (m *Memory) SetMock(_ context.Context, cfg *mock.Mock) error

func (*Memory) SubscribeMockChanges

func (m *Memory) SubscribeMockChanges(subscriber func(mock mock.Mock))

Jump to

Keyboard shortcuts

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