api

package
v0.6.13-v0.9.18 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

API layer, implements common CRUD operations TODO: Call it DAL? (data access layer)

func New

func New(logger logger.Logger, config *frames.Config) (*API, error)

New returns a new API layer struct

func (*API) Create

func (api *API) Create(request *frames.CreateRequest) error

Create will create a new table

func (*API) Delete

func (api *API) Delete(request *frames.DeleteRequest) error

Delete deletes a table or part of it

func (*API) Exec

func (api *API) Exec(request *frames.ExecRequest) (frames.Frame, error)

Exec executes a command on the backend

func (*API) Read

func (api *API) Read(request *frames.ReadRequest, out chan frames.Frame) error

Read reads from database, emitting results to wf

func (*API) Write

func (api *API) Write(request *frames.WriteRequest, in chan frames.Frame) (int, int, error)

Write write data to backend, returns num_frames, num_rows, error

Jump to

Keyboard shortcuts

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