restapi

package
v0.0.0-...-8021ee1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(registry *core.PluginRegistry, address string) (err error)

Types

type ContextsHandler

type ContextsHandler struct {
	*StorageHandler[fsdb.Context]
	// contains filtered or unexported fields
}

ContextsHandler defines the handler for contexts-related operations

func NewContextsHandler

func NewContextsHandler(r *gin.Engine, contexts *fsdb.ContextsEntity) (ret *ContextsHandler)

NewContextsHandler creates a new ContextsHandler

type PatternsHandler

type PatternsHandler struct {
	*StorageHandler[fsdb.Pattern]
	// contains filtered or unexported fields
}

PatternsHandler defines the handler for patterns-related operations

func NewPatternsHandler

func NewPatternsHandler(r *gin.Engine, patterns *fsdb.PatternsEntity) (ret *PatternsHandler)

NewPatternsHandler creates a new PatternsHandler

func (*PatternsHandler) Get

func (h *PatternsHandler) Get(c *gin.Context)

Get handles the GET /patterns/:name route

type SessionsHandler

type SessionsHandler struct {
	*StorageHandler[fsdb.Session]
	// contains filtered or unexported fields
}

SessionsHandler defines the handler for sessions-related operations

func NewSessionsHandler

func NewSessionsHandler(r *gin.Engine, sessions *fsdb.SessionsEntity) (ret *SessionsHandler)

NewSessionsHandler creates a new SessionsHandler

type StorageHandler

type StorageHandler[T any] struct {
	// contains filtered or unexported fields
}

StorageHandler defines the handler for storage-related operations

func NewStorageHandler

func NewStorageHandler[T any](r *gin.Engine, entityType string, storage db.Storage[T]) (ret *StorageHandler[T])

NewStorageHandler creates a new StorageHandler

func (*StorageHandler[T]) Delete

func (h *StorageHandler[T]) Delete(c *gin.Context)

Delete handles the DELETE /storage/:name route

func (*StorageHandler[T]) Exists

func (h *StorageHandler[T]) Exists(c *gin.Context)

Exists handles the GET /storage/exists/:name route

func (*StorageHandler[T]) Get

func (h *StorageHandler[T]) Get(c *gin.Context)

Get handles the GET /storage/:name route

func (*StorageHandler[T]) GetNames

func (h *StorageHandler[T]) GetNames(c *gin.Context)

GetNames handles the GET /storage/names route

func (*StorageHandler[T]) Rename

func (h *StorageHandler[T]) Rename(c *gin.Context)

Rename handles the PUT /storage/rename/:oldName/:newName route

func (*StorageHandler[T]) Save

func (h *StorageHandler[T]) Save(c *gin.Context)

Save handles the POST /storage/save/:name route

Jump to

Keyboard shortcuts

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