api

package
v0.0.0-...-7fca2f4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Make

func Make(c *config.Server, l *log.Logger, mys *mystery.Mystery, masterPass string, backend backend.Backend) error

Make provides starting of the server

func Post

func Post(url string, data interface{}) error

Post provides sending of the post request

Types

type API

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

API defines configuration for restfuil api

func New

func New(m *mystery.Mystery) *API

New provides initialization of API

func (*API) Get

func (a *API) Get(w http.ResponseWriter, r *http.Request)

Get provides getting of getting data

func (*API) Put

func (a *API) Put(w http.ResponseWriter, r *http.Request)

type PutRequest

type PutRequest struct {
	Namespace string `json:"namespace"`
	Value     string `json:"value"`
}

type PutResponse

type PutResponse struct {
}

Jump to

Keyboard shortcuts

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