config

package
v0.0.0-...-78ae391 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: AGPL-3.0 Imports: 5 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 {
	Name                string               `json:"name"`
	Description         string               `json:"description"`
	Host                string               `json:"host"`
	DatabaseCredentials *DatabaseCredentials `toml:"database_credentials"`
	RedisCredentials    *RedisCredentials    `toml:"redis_credentials"`
}

type DatabaseCredentials

type DatabaseCredentials struct {
	Host     string `toml:"host"`
	User     string `toml:"user"`
	Password string `toml:"password"`
	DBName   string `toml:"dbname"`
	Port     uint   `toml:"port"`
	Timezone string `toml:"timezone"`
}

func (*DatabaseCredentials) Connect

func (dc *DatabaseCredentials) Connect() *gorm.DB

type RedisCredentials

type RedisCredentials struct {
	Host     string `toml:"host"`
	Password string `toml:"password"`
	Port     uint   `toml:"port"`
}

func (*RedisCredentials) Connect

func (rc *RedisCredentials) Connect() (*redis.Client, error)

Jump to

Keyboard shortcuts

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