api

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewValidator

func NewValidator(arg *validator.Validate) *customValidator

func Redirect

func Redirect() middleware.RedirectConfig

Types

type CustomBinder

type CustomBinder struct{}

func (*CustomBinder) Bind

func (cb *CustomBinder) Bind(i interface{}, c echo.Context) (err error)

type Server

type Server struct {
	Store  db.PostgresStore
	Redis  redis.Store
	Config util.Config

	Auth       *Util
	Router     *echo.Echo
	Oauth      oauth.OauthService
	Token      token.Maker
	FileString string

	apiutil.UtilTools
	gcp.GCPService
	// contains filtered or unexported fields
}

func Newserver

func Newserver(c util.Config, store db.PostgresStore, redisStore redis.Store, service gcp.GCPService) (*Server, error)

func (*Server) StartHTTP

func (s *Server) StartHTTP(path string) error

func (*Server) StartHTTPS

func (s *Server) StartHTTPS(path string) error

func (*Server) Testrouterhandle

func (s *Server) Testrouterhandle()

func (*Server) TimeoutPost

func (s *Server) TimeoutPost() middleware.TimeoutConfig

type Util

type Util struct {
	Middleware *CustomBinder
	Validator  *customValidator
}

func NewUtil

func NewUtil(val *validator.Validate) *Util

func (*Util) HTTPErrorHandler

func (u *Util) HTTPErrorHandler(err error, c echo.Context)

Jump to

Keyboard shortcuts

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