serverconfig

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package serverconfig is the config loader for the server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// HTTPPort is the http port for the api
	HTTPPort uint16 `yaml:"http_port"`
	// DBPath is the address of the database
	DBPath string `yaml:"db_path"`
	// DBType is the flag signifying the type of database (mysql, sqlite, etc).
	DBType string `yaml:"db_type"`
	// SkipMigrations skips the database migrations.
	SkipMigrations bool `yaml:"skip_migrations"`
}

Config is used to configure the explorer server.

func DecodeServerConfig

func DecodeServerConfig(filePath string) (cfg Config, err error)

DecodeServerConfig parses in a config from a file.

func (*Config) IsValid

func (c *Config) IsValid() error

IsValid makes sure the config is valid.

Jump to

Keyboard shortcuts

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