ginpgfc

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

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

Go to latest
Published: Nov 13, 2018 License: MIT Imports: 9 Imported by: 0

README

gin-pgfc

pgfc postgresql functions calling middleware for Gin

GoCard GitHub Release GitHub code size in bytes GitHub license

English | Pусский

  • Project status: in active development

Documentation

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 Config

type Config struct {
	pgfc.Config
}

Config holds package config vars

type Server

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

Server holds pgfc server

func NewServer

func NewServer(cfg Config, log loggers.Contextual, uri string, dbh *pgx.ConnPool) (*Server, error)

NewServer returns pgfc server object

func (*Server) Route

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

Route registers supported locations in gin

func (*Server) SetFuncBlank

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

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

func (*Server) SetFuncRequest

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

SetFuncRequest 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