api

package
v0.0.0-...-59acd12 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 7 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 {
	// Postgresql connection
	PgConn *db.PgConn

	// Gin web fremework engine
	Router *gin.Engine

	// Validator
	Validate *validator.Validate
}

func New

func New() (*API, error)

Create a new API instance.

func (*API) Close

func (api *API) Close()

Close all api dependencies. It's safe to call Close on a already closed one

func (*API) Run

func (api *API) Run(addr string) error

Start listen and server

Jump to

Keyboard shortcuts

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