api

package
v0.0.0-...-217b4b9 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBucket

func AddBucket(ctx *fasthttp.RequestCtx)

AddBucket is the handler for the POST /api/v1/db/bucket/accesskey/file endpoint. Adds a new bucket to the open DB file.

func AddKey

func AddKey(ctx *fasthttp.RequestCtx)

func ClearDB

func ClearDB(ctx *fasthttp.RequestCtx)

ClearDB is the handler for the POST /api/v1/db/accesskey endpoint.

func CreateDB

func CreateDB(ctx *fasthttp.RequestCtx)

CreateDB is the handler for the POST /api/v1/db/create endpoint. Creates a new boltdb file.

func DeleteKey

func DeleteKey(ctx *fasthttp.RequestCtx)

DeleteKey is the handler for the POST /api/v1/db/accesskey/file/key endpoint. Removes a key from the boltdb file.

func DownloadDB

func DownloadDB(ctx *fasthttp.RequestCtx)

DownloadDB is the handler for the GET /api/v1/db/download/accesskey/file endpoint. Downloads the boltdb file to the UI.

func RemoveBucket

func RemoveBucket(ctx *fasthttp.RequestCtx)

RemoveBucket is the handler for the POST /api/v1/db/bucket/accesskey/file endpoint. Removes a bucket from the open DB file.

func Server

func Server()

func StoreDB

func StoreDB(ctx *fasthttp.RequestCtx)

StoreDB is the handler for the POST /api/v1/db/upload endpoint. Opens the boltdb file and returns the file handle.

func UpdateKey

func UpdateKey(ctx *fasthttp.RequestCtx)

UpdateKey is the handler for the POST /api/v1/db/accesskey/file/key endpoint. Updates a key in the boltdb file.

func ViewDB

func ViewDB(ctx *fasthttp.RequestCtx)

ViewDB is the handler for the POST /api/v1/db/accesskey/file endpoint. Opens the boltdb file and returns the file key-value paid for rendering in UI.

Types

type APIResponse

type APIResponse struct {
	DBKey    string      `json:"dbkey"`
	FileName string      `json:"filename"`
	DBType   string      `json:"dbtype"`
	Message  string      `json:"message"`
	Data     interface{} `json:"data"`
	Error    []Errors    `json:"error"`
}

type Errors

type Errors struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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