resource

package
v0.1.50 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ErrorResourceAlreadyExists = "resource already exists"
	ErrorResourceNotFound      = "resource not found"
)

Variables

This section is empty.

Functions

func NewInMemoryAccess

func NewInMemoryAccess[K comparable, V any](shards int) *inMemoryAccess[K, V]

Types

type Access

type Access[K, V any] interface {
	Create(key K, model V) error
	Read(key K) (*V, error)
	Update(key K, model V) error
	Delete(key K) error
}

Access specifies the CRUD operations for a resource using generics.

Jump to

Keyboard shortcuts

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