kvserver

package
v0.0.0-...-daf4bef Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

GENERATED DO NOT EDIT GENERATOR: scripts/gencode/gencode.go ARGUMENTS: --component server --config ../../../../config/api.kv.yml --package kvserver --out-dir . --out ./kvserver.gen.go --model-package github.com/adamlouis/squirrelbyte/server/pkg/model/kvmodel

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRouter

func RegisterRouter(apiHandler APIHandler, r *mux.Router, c ErrorCoder)

Types

type APIHandler

type APIHandler interface {
	ListKVs(ctx context.Context, queryParams *kvmodel.ListKVsRequest) (*kvmodel.ListKVsResponse, error)
	GetKV(ctx context.Context, pathParams *kvmodel.GetKVPathParams) (*kvmodel.KV, error)
	PutKV(ctx context.Context, pathParams *kvmodel.PutKVPathParams, body *kvmodel.KV) (*kvmodel.KV, error)
	DeleteKV(ctx context.Context, pathParams *kvmodel.DeleteKVPathParams) error
}

func NewAPIHandler

func NewAPIHandler(db *sqlx.DB) APIHandler

type CommitFn

type CommitFn func() error

type ErrorCoder

type ErrorCoder func(e error) int

type HTTPHandler

type HTTPHandler interface {
	ListKVs(w http.ResponseWriter, req *http.Request)
	GetKV(w http.ResponseWriter, req *http.Request)
	PutKV(w http.ResponseWriter, req *http.Request)
	DeleteKV(w http.ResponseWriter, req *http.Request)
}

type RollbackFn

type RollbackFn func() error

Jump to

Keyboard shortcuts

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