Files
SugarDB/server/plugins/commands/set/set.go
Kelvin Clement Mwinuka 58d6664faa Added plugins folder location in config for the server.
Created get and ser plugin files.
Created server function to load plugins.
Moved Makefile inside server folder to build and run server.
2023-07-03 08:39:19 +08:00

37 lines
608 B
Go

package main
type Server interface {
GetData(key string) interface{}
SetData(key string, value interface{})
}
type plugin struct {
name string
command string
description string
}
var Plugin plugin
func (p *plugin) Name() string {
return p.name
}
func (p *plugin) Command() string {
return p.command
}
func (p *plugin) Description() string {
return p.description
}
func (p *plugin) HandleCommand(tokens []string, server interface{}) error {
return nil
}
func init() {
Plugin.name = "SetCommand"
Plugin.command = "set"
Plugin.description = "Set the value of the specified key"
}