env

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Overview

Package env handles Revere's static environment. This environment is configured via a JSON file provided on the command line when running Revere, and it does not change at runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	DB   *db.DB
	Port uint16
	Host string
}

Env provides runtime access to Revere's static environment.

func New

func New(conf []byte) (*Env, error)

New initializes an Env based on the configuration found in conf, which contains a serialized JSON object.

type EnvJSONModel

type EnvJSONModel struct {
	DB   db.DBJSONModel
	Port uint16
	Host string
}

EnvJSONModel is the structure for Revere's environment configuration JSON file.

Jump to

Keyboard shortcuts

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