config

package
v0.0.0-...-f1bdcb5 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: MIT Imports: 8 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 {
	Version  int      `json:"version"`
	Name     string   `json:"name"`
	Groups   []Group  `json:"groups"`
	Frontend Frontend `json:"frontend"`
}

func NewConfig

func NewConfig(content []byte) (*Config, error)

type Frontend

type Frontend struct {
	Script FrontendPart `json:"script"`
	Style  FrontendPart `json:"style"`
}

type FrontendPart

type FrontendPart struct {
	Content string   `json:"content"`
	Files   []string `json:"files"`
}

type Group

type Group struct {
	Name     string `json:"name"`
	Validate []Step `json:"validate"`
}

type Step

type Step struct {
	Name string        `json:"name"`
	Type string        `json:"type"`
	Vars Variables     `json:"variables"`
	Args []interface{} `json:"args"`
}

func (*Step) UnmarshalJSON

func (s *Step) UnmarshalJSON(data []byte) (err error)

type Variable

type Variable struct {
	Name   string      `json:"name"`
	Value  interface{} `json:"value"`
	Masked bool        `json:"masked"`
}

type Variables

type Variables []*Variable

func (Variables) Masked

func (v Variables) Masked() []string

Jump to

Keyboard shortcuts

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