inMemory

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: GPL-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 AddRecordResponse

type AddRecordResponse struct {
	Route  string `json:"route"`
	Method string `json:"method"`
	Error  string `json:"error, omitempty"`
}

AddRecordResponse

type Handler

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

Handler is a in-memory store handler

func NewHandler

func NewHandler(data *map[string]fileWalkers.IndexedData) *Handler

NewHandler is a constructor for the struct inMemory.Handler

func (*Handler) AddRecord

func (h *Handler) AddRecord(w http.ResponseWriter, r *http.Request)

AddRecord is a handler to create a new record or update existed one for in-memory store data

func (*Handler) List

func (h *Handler) List(w http.ResponseWriter, r *http.Request)

type Request

type Request struct {
	Path           string `json:"path"`
	ScenarioNumber int    `json:"scenarioNumber"`
	Method         string `json:"method"`
}

Request is used to parse request to insert new record to in-memory store

Jump to

Keyboard shortcuts

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