common

package
v0.3.0-beta.7 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Mongo string `env:"MONGO,required"`
	Name  string `env:"NAME,required"`
}

type Inject

type Inject struct {
	Values    *Values
	Mongo     *mongo.Client
	Db        *mongo.Database
	Nats      *nats.Conn
	JetStream nats.JetStreamContext
}

type Nats added in v0.3.0

type Nats struct {
	Hosts []string `env:"HOSTS,required" envSeparator:","`
	Nkey  string   `env:"NKEY,required"`
}

type Storage added in v0.3.0

type Storage struct {
	Type string `env:"TYPE"`
	Url  string `env:"URL"`
	Id   string `env:"ID"`
	Key  string `env:"KEY"`
}

type Values

type Values struct {
	Address  string `env:"address" envDefault:":9000"`
	Database `envPrefix:"DATABASE_"`
	Nats     `envPrefix:"NATS_"`
	Storage  `envPrefix:"STORAGE_"`
}

Jump to

Keyboard shortcuts

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