config

package
v0.0.0-...-5d297aa Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MasterStore masterStore = "store"
View Source
const SessionKey sessionKey = "session"

Variables

This section is empty.

Functions

func ReadKeyPair

func ReadKeyPair(keyFiles *KeyPair) (keyPair *rsa.PrivateKey, errVal error)

Types

type Config

type Config struct {
	Database    DatabaseConfig `yaml:"database"`
	JwtSignKeys KeyPair        `yaml:"JWTKeys"`
}

func ReadConfig

func ReadConfig(fileName string) (cfg *Config, errVal error)

type DatabaseConfig

type DatabaseConfig struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	DbName   string `yaml:"dbName"`
}

type KeyPair

type KeyPair struct {
	PrivateKey string `yaml:"privateKey"`
	PublicKey  string `yaml:"publicKey"`
}

type UserSession

type UserSession struct {
	UserUUID   *uuid.UUID `json:"userUuid"`
	ChurchUUID *uuid.UUID `json:"churchUuid"`
	Role       string     `json:"role"`
}

Jump to

Keyboard shortcuts

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