utl

package
v0.0.0-...-9f3f5e4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractIdFromPath

func ExtractIdFromPath(r *http.Request) (int, error)

func ReadFromJSON

func ReadFromJSON(r io.Reader, data interface{}) error

func WriteToJSON

func WriteToJSON(w io.Writer, data interface{}) error

Types

type Env

type Env struct {
	DBName          string
	MongoURI        string
	Port            string
	JWTSecret       string
	HashingCost     int
	JWTExpireMinute time.Duration
}

func NewEnv

func NewEnv() *Env

type ResponseBody

type ResponseBody struct {
	IsError bool        `json:"is_error"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

type StatusCode

type StatusCode int

Jump to

Keyboard shortcuts

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