utils

package
v0.0.0-...-e31252a Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeConnection

func MakeConnection(data DriverDatabase) (*gorm.DB, error)

Types

type DriverDatabase

type DriverDatabase struct {
	User     string
	Password string
	Host     string
	Port     string
	DbName   string
}

func ReadEnvDatabase

func ReadEnvDatabase() (DriverDatabase, error)

type Response

type Response struct {
	Success bool        `json:"success"`
	Message string      `json:"message"`
	Body    interface{} `json:"body"`
}

func ResponseWhenFail

func ResponseWhenFail(message string) Response

func ResponseWhenSuccess

func ResponseWhenSuccess(message string, body interface{}) Response

Jump to

Keyboard shortcuts

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