kvstore

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

README

kvstore

Protoc plugin to generate redis interaction data structures

Future Works
  • [] Support enum types
  • [] Support nested keys (not idiomatic)
  • [] Generate caching interceptors for RPCs
  • [] Bulk delete method
  • [] RPC cache invalidation signaling support

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetOption

type GetOption func(o *GetOptionContext)

func WithDel

func WithDel() GetOption

func WithGetExpireAt

func WithGetExpireAt(eat time.Time) GetOption

func WithGetTTL

func WithGetTTL(ttl time.Duration) GetOption

type GetOptionContext

type GetOptionContext struct {
	TTL  time.Duration
	ExAt time.Time
	Del  bool
}

type IncrOption

type IncrOption func(o *IncrOptionContext)

func WithIncrExpireAt

func WithIncrExpireAt(eat time.Time) IncrOption

func WithIncrTTL

func WithIncrTTL(ttl time.Duration, keepTTL bool) IncrOption

type IncrOptionContext

type IncrOptionContext struct {
	TTL     time.Duration
	ExAt    time.Time
	KeepTTL bool
}

type InitOption

type InitOption func(o *InitOptionContext)

type InitOptionContext

type InitOptionContext struct{}

type SetOption

type SetOption func(o *SetOptionContext)

func WithRetrieveDisabled

func WithRetrieveDisabled() SetOption

func WithSetExpireAt

func WithSetExpireAt(eat time.Time) SetOption

func WithSetOnlyIfAlreadyExists

func WithSetOnlyIfAlreadyExists() SetOption

func WithSetOnlyIfNotExists

func WithSetOnlyIfNotExists() SetOption

func WithSetTTL

func WithSetTTL(ttl time.Duration) SetOption

type SetOptionContext

type SetOptionContext struct {
	TTL     time.Duration
	ExAt    time.Time
	Mode    string
	Get     bool
	KeepTTL bool
}

Jump to

Keyboard shortcuts

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