mock

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package mock provides a store to aid testing of mserv.

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyUID = errors.New("UID cannot be empty")

ErrEmptyUID is returned when middleware UID is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct{}

Storage is a mock store for testing mserv.

func (*Storage) CreateMW

func (s *Storage) CreateMW(_ context.Context, mw *storage.MW) (string, error)

CreateMW is a test mock.

func (*Storage) DeleteMW

func (s *Storage) DeleteMW(_ context.Context, id string) error

DeleteMW is a test mock.

func (*Storage) GetAllActive

func (s *Storage) GetAllActive(_ context.Context) ([]*storage.MW, error)

GetAllActive is a test mock.

func (*Storage) GetMWByAPIID

func (s *Storage) GetMWByAPIID(_ context.Context, _ string) (*storage.MW, error)

GetMWByAPIID is a test mock.

func (*Storage) GetMWByID

func (s *Storage) GetMWByID(_ context.Context, id string) (*storage.MW, error)

GetMWByID is a test mock.

func (*Storage) InitMservStore

func (s *Storage) InitMservStore(_ context.Context, tag string) error

InitMservStore is a test mock.

func (*Storage) UpdateMW

func (s *Storage) UpdateMW(_ context.Context, mw *storage.MW) (string, error)

UpdateMW is a test mock.

Jump to

Keyboard shortcuts

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