config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PublishFormatJSON is the JSON format.
	PubSubPublishFormatJSON = "json"
	// PublishFormatAvro is the Avro format.
	PubSubPublishFormatAvro = "avro"
)

PublishFormat is the format of the message to publish.

Variables

Set is a Wire provider set that provides configuration.

Functions

This section is empty.

Types

type Metrics added in v0.0.2

type Metrics struct {
	Addr string `env:"ADDR, default=:8080"`
}

func NewMetrics added in v0.0.2

func NewMetrics(ctx context.Context) (*Metrics, error)

type MongoDB

type MongoDB struct {
	URI        string `env:"URI, required"`
	Password   string `env:"PASSWORD, required"`
	User       string `env:"USER, required"`
	Database   string `env:"DATABASE, required"`
	Collection string `env:"COLLECTION, required"`
}

func NewMongoDB

func NewMongoDB(ctx context.Context) (*MongoDB, error)

type PubSub added in v0.0.2

type PubSub struct {
	// ProjectID is the id of the Google Cloud project to publish messages to.
	ProjectID string `env:"PROJECT_ID"`
	// TopicID is the id of the topic to publish messages to.
	TopicID string `env:"TOPIC_ID"`
	// PublishFormat is the format of the message to publish.
	// Supported format are: json, avro.
	PublishFormat string `env:"PUBLISH_FORMAT, default=json"`
}

func NewPubSub added in v0.0.2

func NewPubSub(ctx context.Context) (*PubSub, error)

Jump to

Keyboard shortcuts

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