fogfish/blueprint-serverless-golang

View on GitHub
internal/core/storage.go

Summary

Maintainability
A
0 mins
Test Coverage
package core

import "context"

//
// Example definition of data access objects.
// Interfaces abstracts capabilities of the storage layer(s).
//

type Getter[K, V any] interface {
    Get(context.Context, K) (V, error)
}

type GetterSeq[K, V any] interface {
    Seq(context.Context, K, int) ([]V, error)
}

type Setter[K, V any] interface {
    Set(context.Context, K, V) error
}