utils

package
v0.0.0-...-342cda4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Database DBSettings
	Host     HostSettings
}

Configuration hold the all configurations in a single struct

type DBSettings

type DBSettings struct {
	Url      string
	Keyspace string
}

DBSettings hold the Cassandra DB Settings

type HostSettings

type HostSettings struct {
	Port string
}

HostSettings hold the GIN Web Server Settings

type RestErr

type RestErr struct {
	Message string `json:"message"`
	Status  int    `json:"status"`
	Error   string `json:"error"`
}

func BadRequestError

func BadRequestError(message string, err error) *RestErr

BadRequestError return RestErr with bad_request status and messages

func InternalServerError

func InternalServerError(message string, err error) *RestErr

mcustom error return RestErr with internal_server status and messages

func NotFoundRequestError

func NotFoundRequestError(message string, err error) *RestErr

NotFoundRequestError return RestErr with not_found status and messages

Jump to

Keyboard shortcuts

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