httpcache

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: LGPL-3.0 Imports: 5 Imported by: 0

README

httpcache

An easy to use httpcache module that can cache a key value pair.

Example usage

package main

import (
    "github.com/egomobile/httpcache"
)

func main() {
	httpcache.Server()
}

API

curl --location --request PUT 'http://localhost/datasets' \
--header 'Content-Type: application/json' \
--data-raw '{
    "key": "foo3",
    "value": "bar3"
}'
curl --location --request GET 'http://localhost/datasets'

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DATASETS = map[string]Dataset{}

Functions

func Server

func Server(port string, name string)

Types

type Dataset

type Dataset struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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