config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidRepoType added in v0.4.0

func IsValidRepoType(t RepoType) bool

Types

type Conf

type Conf struct {
	Port     int      `yaml:"port"`
	RepoType RepoType `yaml:"repo_type"`
	MySQL    MySQL    `yaml:"mysql"`
	Dummy    Dummy    `yaml:"dummy"`
}

func GetContent

func GetContent(filename string) (*Conf, error)

type Dummy added in v0.4.0

type Dummy struct{}

type MySQL

type MySQL struct {
	Host     string `yaml:"host"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	DB       string `yaml:"db"`
}

type RepoType added in v0.4.0

type RepoType string
const (
	RepoTypeMySQL RepoType = "mysql"
	RepoTypeDummy RepoType = "dummy"
)

Jump to

Keyboard shortcuts

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