mock

package
v0.0.0-...-a4359f9 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
}

Provider implements a mock image storage

func (*Provider) Get

func (p *Provider) Get(ctx context.Context, id string) (i *database.Image, err error)

Get returns the image data for an image id

func (*Provider) GetRandom

func (p *Provider) GetRandom(ctx context.Context) (i *database.Image, err error)

GetRandom returns a random image

func (*Provider) GetRandomWithSeed

func (p *Provider) GetRandomWithSeed(ctx context.Context, seed int64) (i *database.Image, err error)

GetRandomWithSeed returns a random image based on the given seed

func (*Provider) List

func (p *Provider) List(ctx context.Context, offset, limit int) ([]database.Image, error)

List returns a list of all the images with an offset/limit

func (*Provider) ListAll

func (p *Provider) ListAll(ctx context.Context) ([]database.Image, error)

ListAll returns a list of all the images

Jump to

Keyboard shortcuts

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