ginpgcall

package module
v0.0.0-...-1673d0b Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 7 Imported by: 1

README

gin-pgcall

gin-pgcall is a Gin bindings for pgcall

  • Project status: in active development

Documentation

Overview

Package ginpgcall implements a gin frontend for pgcall.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeMap

func MakeMap(args ...interface{}) (map[string]interface{}, error)

MakeMap makes a map from key,value pairs

Types

type Caller

type Caller interface {
	Call(r *http.Request, method string, args map[string]interface{}) (interface{}, error)
}

Caller allows to process and mock pgcall.Caller independently

type Server

type Server struct {
	Caller //	*pgcall.Server
	// contains filtered or unexported fields
}

Server holds pgcall server

func NewServer

func NewServer(log loggers.Contextual, pgcall Caller) *Server

NewServer returns pgcall server object

func (*Server) Route

func (srv *Server) Route(prefix string, r *gin.Engine) error

Route registers supported locations in gin

func (*Server) SetProtoFuncs

func (srv *Server) SetProtoFuncs(funcs template.FuncMap)

SetProtoFuncs appends function templates and not related to request functions to funcs

func (*Server) SetRequestFuncs

func (srv *Server) SetRequestFuncs(funcs template.FuncMap, ctx *gin.Context)

SetRequestFuncs appends related to request functions to funcs

Jump to

Keyboard shortcuts

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