Help us shape the future of Go! Take the 2026 Go Developer Survey

common

package
v0.0.29 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClaims added in v0.0.29

func GetClaims(c *app.RequestContext) (claims passport.Claims)

Types

type Database

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

type HttpClients added in v0.0.29

type HttpClients struct {
	Feishu *resty.Client
}

type Inject added in v0.0.28

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

type Nats

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

type Values

type Values struct {
	Address           string `env:"ADDRESS" envDefault:":3000"`
	Namespace         string `env:"NAMESPACE,required"`
	Key               string `env:"KEY,required"`
	Host              string `env:"HOST,required"`
	Database          `envPrefix:"DATABASE_"`
	Nats              `envPrefix:"NATS_"`
	*kv.DynamicValues `env:"-"`
}

func (Values) Name added in v0.0.29

func (x Values) Name(v ...string) string

Jump to

Keyboard shortcuts

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