conf

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: EUPL-1.2 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Token string `yaml:"token"`
	URL   string `yaml:"url"`
}

API contains the required data to contact the CTFd API endpoints.

func (*API) Check

func (a *API) Check() error

Check if the API state seems credible.

type Award

type Award struct {
	User        int    `json:"user_id" yaml:"-"`
	Name        string `json:"name" yaml:"name"`
	Description string `json:"description,omitempty" yaml:"description"`
	Value       int    `json:"value" yaml:"value"`
	Category    string `json:"category" yaml:"category"`
	Icon        string `json:"icon,omitempty" yaml:"icon"`
}

Award contains the fields needed to inform the CTFd API of awarded points.

func (*Award) Check

func (a *Award) Check() error

Check if the award state seems credible.

type Configuration

type Configuration struct {
	API   *API
	Flags []*Flag
}

Configuration is the root object defined in the configuration file.

func (*Configuration) Check

func (c *Configuration) Check() error

Check if the configuration state seems credible.

type Flag

type Flag struct {
	Interval time.Duration
	Path     string
	Award    *Award
}

Flag contains the needed information to monitor flag files.

func (*Flag) Check

func (f *Flag) Check() error

Check if the flag state seems credible.

Jump to

Keyboard shortcuts

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