ginproc

package module
v0.3.2 Latest Latest
Warning

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

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

README

procapi/ginproc

ginproc is a Gin bindings module for procapi

  • Project status: in active development

Documentation

Overview

Package ginproc implements a gin frontend for procapi.

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