types

package
v0.0.0-...-9f3355a Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBEvent

type DBEvent struct {
	Payload DBEventPayload `json:"payload"`
}

type DBEventPayload

type DBEventPayload struct {
	Operation string `json:"op"`
	Before    []byte `json:"before"`
	After     []byte `json:"after"`
}

type ID

type ID = int32

type KVStore

type KVStore interface {
	// Set key to hold the string value. If key already holds a value, it is overwritten, regardless
	// of its type. Any previous time to live associated with the key is discarded on successful SET
	// operation.
	Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error

	// Get the value of key. An error is returned if the value stored at key is not a string,
	// because GET only handles string values.
	Get(ctx context.Context, key string) (string, error)

	// Removes the specified keys. A key is ignored if it does not exist.
	Del(ctx context.Context, keys ...string) error

	// Returns the specified elements of the list stored at key. The offsets start and stop are
	// zero-based indexes. These offsets can also be negative numbers indicating offsets starting at
	// the end of the list.
	LRange(ctx context.Context, key string, start, stop int64) ([]string, error)
}

type PaginationArgs

type PaginationArgs struct {
	Offset,
	PageSize uint64
}

Jump to

Keyboard shortcuts

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