inmemory

package
v0.0.0-...-8110901 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

package inmemory contains an inmemory store for our usecase. ONLY TO BE USED IN DEVELOPMENT!!

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryClient

type InMemoryClient struct {
	// contains filtered or unexported fields
}

InMemoryClient is an in memory client that stores objects in memory.

func NewInMemoryClient

func NewInMemoryClient() *InMemoryClient

NewInMemoryClient returns an empty InMemoryClient used for CRUD on keys.

func (*InMemoryClient) Create

func (i *InMemoryClient) Create(s string, b []byte) error

func (*InMemoryClient) Delete

func (i *InMemoryClient) Delete(s string) error

Delete removes from inmemory store. Its not the nicest but hey its only for development cases! DO NOT USE IN PRODUCTION

func (*InMemoryClient) Read

func (i *InMemoryClient) Read(s string) ([]byte, error)

Read reads from the inmemory client and returns the found key

func (*InMemoryClient) UpdateKey

func (i *InMemoryClient) UpdateKey(s string, b []byte) error

Jump to

Keyboard shortcuts

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