common

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inject

type Inject struct {
	Values    *Values
	Log       *zap.Logger
	Db        *mongo.Database
	JetStream nats.JetStreamContext
	KeyValue  nats.KeyValue
}

type Nats

type Nats struct {
	// Nats 连接地址
	Hosts []string `env:"HOSTS,required" envSeparator:","`

	// Nats Nkey 认证
	Nkey string `env:"NKEY,required"`
}

type Values

type Values struct {
	// 命名空间
	Namespace string `env:"NAMESPACE,required"`

	// MongoDB 连接 Uri
	Database string `env:"DATABASE,required"`

	// NATS 配置
	Nats `envPrefix:"NATS_"`
}

Jump to

Keyboard shortcuts

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