base

package
v0.0.0-...-e4b7cd1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COUNTER_KEY = "counter"
	ZONE_KEY    = "zone"
)

This API uses 2 entry in the KV COUNTER and ZONE

Variables

This section is empty.

Functions

func NewServerImpl

func NewServerImpl(logger *slog.Logger, kvUrl string, version string) api.ServerInterface

Types

type ServerImpl

type ServerImpl struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*ServerImpl) DeleteCounter

func (s *ServerImpl) DeleteCounter(w http.ResponseWriter, r *http.Request)

func (*ServerImpl) GetCounter

func (s *ServerImpl) GetCounter(w http.ResponseWriter, r *http.Request)

func (*ServerImpl) GetVersion

func (s *ServerImpl) GetVersion(w http.ResponseWriter, r *http.Request)

func (*ServerImpl) KvDelete

func (s *ServerImpl) KvDelete(w http.ResponseWriter, r *http.Request, key string)

func (*ServerImpl) KvGet

func (s *ServerImpl) KvGet(w http.ResponseWriter, r *http.Request, key string)

func (*ServerImpl) KvList

func (s *ServerImpl) KvList(w http.ResponseWriter, r *http.Request)

func (*ServerImpl) KvPost

func (s *ServerImpl) KvPost(w http.ResponseWriter, r *http.Request, key string)

func (*ServerImpl) PostCounter

func (s *ServerImpl) PostCounter(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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