bootstrap

package
v0.0.0-...-461417b Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectMongoDB

func ConnectMongoDB(env *Env) *mongo.Database

func InitS3

func InitS3(env *Env) *s3.Client

Types

type Applicaton

type Applicaton struct {
	Env           *Env
	MongoDatabase *mongo.Database
	SocketServer  *socket.Server
	S3Client      *s3.Client
}

func App

func App() Applicaton

type Env

type Env struct {
	AppEnv                 string `mapstructure:"APP_ENV"`
	ServerAddress          string `mapstructure:"SERVER_ADDRESS"`
	SteamApiKey            string `mapstructure:"STEAM_API_KEY"`
	SteamRedirectUrl       string `mapstructure:"STEAM_REDIRECT_URL"`
	RedirectLoginUrl       string `mapstructure:"REDIRECT_LOGIN_URL"`
	MongoUri               string `mapstructure:"MONGO_URI"`
	MongoDBName            string `mapstructure:"MONGO_DB_NAME"`
	AWSRegion              string `mapstructure:"AWS_REGION"`
	S3BucketName           string `mapstructure:"S3_BUCKET_NAME"`
	AWSAccessKeyID         string `mapstructure:"AWS_ACCESS_KEY_ID"`
	AWSSecretAccessKey     string `mapstructure:"AWS_SECRET_ACCESS_KEY"`
	AccessTokenExpiryHour  int    `mapstructure:"ACCESS_TOKEN_EXPIRY_HOUR"`
	RefreshTokenExpiryHour int    `mapstructure:"REFRESH_TOKEN_EXPIRY_HOUR"`
	AccessTokenSecret      string `mapstructure:"ACCESS_TOKEN_SECRET"`
	RefreshTokenSecret     string `mapstructure:"REFRESH_TOKEN_SECRET"`
}

func NewEnv

func NewEnv() *Env

Jump to

Keyboard shortcuts

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