config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2021 License: MIT Imports: 3 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 {
	Title string `json:"title"`
	Host  string `json:"host"`
	Port  int    `json:"port"`
	Forms []Form `json:"forms"`
}

func ParseConfig

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

func (*Config) GetForm

func (conf *Config) GetForm(prefix string) *Form

type Form

type Form struct {
	Prefix           string     `json:"prefix"`
	Storage          string     `json:"storage"`
	Title            string     `json:"title"`
	Inputs           []Input    `json:"inputs"`
	FilenameTemplate string     `json:"filenameTemplate"`
	Deadline         *time.Time `json:"deadline"`
}

type Input

type Input struct {
	Name    string `json:"name"`
	Label   string `json:"label"`
	Pattern string `json:"pattern"`
}

Jump to

Keyboard shortcuts

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