Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // RPCPath to where the RPC server should listen on RPCPath = "/api" VisualizerPath = "/visualizer-socket" // ErrNoIDGiven is returned when the request did not contain a valid ID ErrNoIDGiven = errors.New("no ID was given with request") // ErrExists is returned when the entity which is tried to create already exists ErrExists = errors.New("entity with given ID already exists") // ErrNotExists is returned when the entity tried to manage dies not exist ErrNotExists = errors.New("entity with given ID does not exist") )
Functions ¶
This section is empty.
Types ¶
type IDBody ¶
type IDBody struct {
ID string `json:"id"`
}
IDBody is a request object only storing an ID
type Storage ¶
type Storage interface { Has(key string, kind interface{}) bool Write(key string, value interface{}) error Read(key string, value interface{}) error List(kind interface{}) []string Delete(key string, kind interface{}) error }
Storage interface for abstraction in api usage
type SuccessResponse ¶
type SuccessResponse struct {
Success bool `json:"success"`
}
SuccessResponse returns a simple bool to state weather the operation was successful
Click to show internal directories.
Click to hide internal directories.