config

package
v0.0.0-...-835a9d8 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPath

func GetPath() string

Types

type Auth

type Auth struct {
	Server Server
}

type Blog

type Blog struct {
	Server Server
}

type Comment

type Comment struct {
	DB     DB
	Server Server
}

type Config

type Config struct {
	Blog    Blog
	User    User
	Post    Post
	Comment Comment
	Auth    Auth
	DTM     DTM
	JWT     JWT
}

func Load

func Load(path string) (*Config, error)

type DB

type DB struct {
	Host     string `json:"host" yaml:"host"`
	Port     string `json:"port" yaml:"port"`
	User     string `json:"user" yaml:"user"`
	Password string `json:"password" yaml:"password"`
	Name     string `json:"name" yaml:"name"`
}

type DTM

type DTM struct {
	Server Server
}

type GRPC

type GRPC struct {
	Port string `json:"port" yaml:"port"`
}

type HTTP

type HTTP struct {
	Port string `json:"port" yaml:"port"`
}

type JWT

type JWT struct {
	Secret  string        `json:"secret" yaml:"secret"`
	Expires time.Duration `json:"expires" yaml:"expires"`
}

type Metrics

type Metrics struct {
	Port string `json:"port" yaml:"port"`
}

type Post

type Post struct {
	DB     DB
	Server Server
}

type Server

type Server struct {
	Name    string `json:"name" yaml:"name"`
	Host    string `json:"host" yaml:"host"`
	GRPC    GRPC
	HTTP    HTTP
	Metrics Metrics
}

type User

type User struct {
	DB     DB
	Server Server
}

Jump to

Keyboard shortcuts

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