mocks

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: Unlicense Imports: 6 Imported by: 0

Documentation

Overview

go:build mocks

go:build mocks

go:build mocks

go:build mocks

go:build mocks

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestCache

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

func NewTestCache

func NewTestCache(item map[string]string, withErr error) *TestCache

func (TestCache) Called

func (c TestCache) Called(f any) (int, []any)

func (*TestCache) Get

func (c *TestCache) Get(key string) (string, error)

func (*TestCache) GetContext

func (c *TestCache) GetContext(ctx context.Context, key string) (string, error)

func (*TestCache) Len

func (c *TestCache) Len() int

func (*TestCache) LenContext

func (c *TestCache) LenContext(ctx context.Context) int

func (*TestCache) Set

func (c *TestCache) Set(key string, value string) error

func (*TestCache) SetContext

func (c *TestCache) SetContext(ctx context.Context, key string, value string) error

type TestLogger

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

func NewTestLogger

func NewTestLogger() *TestLogger

func (TestLogger) Called

func (c TestLogger) Called(f any) (int, []any)

func (*TestLogger) Error

func (l *TestLogger) Error(msg string, args ...any)

func (*TestLogger) ErrorContext

func (l *TestLogger) ErrorContext(ctx context.Context, msg string, args ...any)

func (*TestLogger) Info

func (l *TestLogger) Info(msg string, args ...any)

func (*TestLogger) InfoContext

func (l *TestLogger) InfoContext(ctx context.Context, msg string, args ...any)

func (*TestLogger) Warn

func (l *TestLogger) Warn(msg string, args ...any)

func (*TestLogger) WarnContext

func (l *TestLogger) WarnContext(ctx context.Context, msg string, args ...any)

type URLTestHash

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

func NewURLTestHash

func NewURLTestHash(result string) *URLTestHash

func (URLTestHash) Called

func (c URLTestHash) Called(f any) (int, []any)

func (*URLTestHash) Hash

func (h *URLTestHash) Hash(val string) *dtos.HashGetter

type URLTestRepo

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

func NewUrlTestRepo

func NewUrlTestRepo(
	item map[string]string, withError error,
) *URLTestRepo

func (URLTestRepo) Called

func (c URLTestRepo) Called(f any) (int, []any)

func (*URLTestRepo) Create

func (r *URLTestRepo) Create(ctx context.Context, param *dtos.CreateHash) error

func (*URLTestRepo) Delete

func (r *URLTestRepo) Delete(ctx context.Context, hashOrFullURL string) error

func (*URLTestRepo) GetFullURL

func (r *URLTestRepo) GetFullURL(ctx context.Context, hash string) (string, error)

func (*URLTestRepo) GetHash

func (r *URLTestRepo) GetHash(ctx context.Context, fullURL string) (string, error)

Jump to

Keyboard shortcuts

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