interfaces

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache[K comparable, V any] interface {
	Set(key K, value V) error
	Get(key K) (V, error)
	Len() int
	SetContext(ctx context.Context, key K, value V) error
	GetContext(ctx context.Context, key K) (V, error)
	LenContext(ctx context.Context) int
}

type CallLog

type CallLog interface {
	Called(f any) (int, []any)
}

type Hash

type Hash interface {
	Hash(string) *dtos.HashGetter
}

type Logger

type Logger interface {
	Info(msg string, args ...any)
	Warn(msg string, args ...any)
	Error(msg string, args ...any)
	InfoContext(ctx context.Context, msg string, args ...any)
	WarnContext(ctx context.Context, msg string, args ...any)
	ErrorContext(ctx context.Context, msg string, args ...any)
}

type URLRepo

type URLRepo interface {
	Create(ctx context.Context, param *dtos.CreateHash) error
	GetFullURL(ctx context.Context, hash string) (string, error)
	Delete(ctx context.Context, hashOrFullURL string) error
}

Jump to

Keyboard shortcuts

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