config

package
v0.0.0-...-e5a474c Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceName      string              `mapstructure:"serviceName"`
	Logger           *logging.Config     `mapstructure:"logger"`
	KafkaTopics      KafkaTopics         `mapstructure:"kafkaTopics"`
	GRPC             GRPC                `mapstructure:"grpc"`
	Postgresql       *postgres.Config    `mapstructure:"postgres"`
	Kafka            *kafkaClient.Config `mapstructure:"kafka"`
	Mongo            *mongodb.Config     `mapstructure:"mongo"`
	Redis            *redis.Config       `mapstructure:"redis"`
	MongoCollections MongoCollections    `mapstructure:"mongoCollections"`
	Probes           probes.Config       `mapstructure:"probes"`
	ServiceSettings  ServiceSettings     `mapstructure:"serviceSettings"`
	Jaeger           *tracing.Config     `mapstructure:"jaeger"`
}

func InitConfig

func InitConfig() (*Config, error)

type GRPC

type GRPC struct {
	Port        string `mapstructure:"port"`
	Development bool   `mapstructure:"development"`
}

type KafkaTopics

type KafkaTopics struct {
	UserCreated       kafkaClient.TopicConfig `mapstructure:"userCreated"`
	UserUpdated       kafkaClient.TopicConfig `mapstructure:"userUpdated"`
	UserDeleted       kafkaClient.TopicConfig `mapstructure:"userDeleted"`
	GroupCreated      kafkaClient.TopicConfig `mapstructure:"groupCreated"`
	GroupUpdated      kafkaClient.TopicConfig `mapstructure:"groupUpdated"`
	GroupDeleted      kafkaClient.TopicConfig `mapstructure:"groupDeleted"`
	MembershipCreated kafkaClient.TopicConfig `mapstructure:"membershipCreated"`
	MembershipUpdated kafkaClient.TopicConfig `mapstructure:"membershipUpdated"`
	MembershipDeleted kafkaClient.TopicConfig `mapstructure:"membershipDeleted"`
	PasswordUpdated   kafkaClient.TopicConfig `mapstructure:"passwordUpdated"`
	TokenBlacklisted  kafkaClient.TopicConfig `mapstructure:"tokenBlacklisted"`
}

type MongoCollections

type MongoCollections struct {
	Users            string `mapstructure:"users"`
	Groups           string `mapstructure:"groups"`
	Memberships      string `mapstructure:"memberships"`
	UserMemberships  string `mapstructure:"userMemberships"`
	GroupMemberships string `mapstructure:"groupMemberships"`
	Blacklist        string `mapstructure:"blacklist"`
}

type ServiceSettings

type ServiceSettings struct {
	RedisUserPrefixKey            string `mapstructure:"redisUserPrefixKey"`
	RedisGroupPrefixKey           string `mapstructure:"redisGroupPrefixKey"`
	RedisMembershipPrefixKey      string `mapstructure:"redisMembershipPrefixKey"`
	RedisUserMembershipPrefixKey  string `mapstructure:"redisUserMembershipPrefixKey"`
	RedisGroupMembershipPrefixKey string `mapstructure:"redisGroupMembershipPrefixKey"`
	RedisTokenPrefixKey           string `mapstructure:"redisTokenPrefixKey"`
	JWTSalt                       string `mapstructure:"jwtSalt"`
}

Jump to

Keyboard shortcuts

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