angularpatternsstore

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVStoreService

type KVStoreService struct {
	*cachekvstore.CacheKvStore
}

KVStoreService allows to cache GCOM angular patterns into the database, as a cache.

func (*KVStoreService) Get

func (s *KVStoreService) Get(ctx context.Context) (string, bool, error)

Get returns the stored angular patterns from the underlying cachekvstore.

func (*KVStoreService) GetETag

func (s *KVStoreService) GetETag(ctx context.Context) (string, bool, error)

GetETag returns the stored etag from the underlying cachekvstore.

func (*KVStoreService) Set

func (s *KVStoreService) Set(ctx context.Context, value any) error

Set stores the given angular patterns in the underlying cachekvstore.

func (*KVStoreService) SetETag

func (s *KVStoreService) SetETag(ctx context.Context, etag string) error

SetETag stores the given etag in the underlying cachekvstore.

type Service

type Service interface {
	GetLastUpdated(ctx context.Context) (time.Time, error)

	Get(ctx context.Context) (string, bool, error)
	Set(ctx context.Context, value any) error
	SetLastUpdated(ctx context.Context) error

	GetETag(ctx context.Context) (string, bool, error)
	SetETag(ctx context.Context, etag string) error
}

func ProvideService

func ProvideService(kv kvstore.KVStore) Service

Jump to

Keyboard shortcuts

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