apiserver

package
v0.0.0-...-663497b Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrChecker

func ErrChecker(err error)

ErrChecker method for check error and show message

func GetDocs

func GetDocs(ctx *fiber.Ctx)

GetDocs will send the documents list

func GetEnv

func GetEnv(key, fallback string) string

GetEnv function for getting environment variables values, or return fallback

func Routes

func Routes(app *fiber.App)

Routes list of the available routes for project

func ValidateConfigPath

func ValidateConfigPath(path string) error

ValidateConfigPath just makes sure, that the path provided is a file, that can be read

Types

type APIServer

type APIServer struct {
	// contains filtered or unexported fields
}

APIServer struct

func NewServer

func NewServer(config *Config) *APIServer

NewServer method for init new server instance

func (*APIServer) Start

func (s *APIServer) Start() *fiber.App

Start method for start new server

type Config

type Config struct {
	Server   server   `yaml:"server"`
	Database database `yaml:"database"`
	Static   static   `yaml:"static"`
}

Config struct for project config

func NewConfig

func NewConfig(configPath string) (*Config, error)

NewConfig returns a new decoded Config struct

Jump to

Keyboard shortcuts

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