nanoapidataset

package module
v0.0.0-...-ea9e273 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 4 Imported by: 0

README

nanoapi-dataset

Simple dataset operations on top of nanoapi

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Op func(ctx context.Context, in *Req) (out *Res, err error)

Functions

func AddOps

func AddOps(fs embed.FS)

func NamedOp

func NamedOp(s string, p map[string]string) string

func Setup

func Setup()

Types

type Req

type Req struct {
	Op       string                 `json:"op"`
	Q        string                 `json:"q"`
	Params   map[string]string      `json:"params"`
	Dataset  string                 `json:"dataset"`
	Where    string                 `json:"where"`
	Id       uint                   `json:"id"`
	Data     map[string]interface{} `json:"data"`
	Page     int                    `json:"page"`
	PageSize int                    `json:"pagesize"`
	Session  *nanoapi.Session       `json:"-"`

	Association string `json:"association"`
	MID         string `json:"mid"`
	DID         string `json:"did"`
}

type Res

type Res struct {
	Id      uint                     `json:"id"`
	Dataset []map[string]interface{} `json:"dataset"`
}

Jump to

Keyboard shortcuts

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