storagetests

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package storagetests provides common acceptance tests for storage.Store implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, newStore func() storage.Store)

Types

type BadModel

type BadModel struct {
	ID    string
	Cycle *BadModel
}

func (BadModel) PK

func (b BadModel) PK() string

type Color

type Color int
const (
	ColorRed    Color = 1
	ColorGreen  Color = 2
	ColorOrange Color = 3
	ColorYellow Color = 4
	ColorBlue   Color = 5
	ColorPurple Color = 6
)

type Fruit

type Fruit struct {
	ID    string
	Name  string
	Color Color
	Count *int // Ptr fields allow filtering on zero values.
}

func (Fruit) PK

func (f Fruit) PK() string

type Planet

type Planet struct {
	ID   string
	Name string
}

func (Planet) PK

func (p Planet) PK() string

Jump to

Keyboard shortcuts

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