Jobs & Workflows https://armen.surge.sh
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
armen/internal/config/data/data.go

41 lines
1.0 KiB

/*
------------------------------------------------------------------------------------------------------------------------
####### data ####### Copyright (c) 2021 mls-361 #################################################### MIT License #######
------------------------------------------------------------------------------------------------------------------------
*/
package data
// Data AFAIRE.
type Data struct {
Logger *Logger `json:"logger"`
Server *Server `json:"server"`
}
// Default AFAIRE.
func (d *Data) Default() {
d.Logger = defaultLogger()
d.Server = defaultServer()
}
// Validate AFAIRE.
func (d *Data) Validate() error {
if d.Logger == nil {
d.Logger = defaultLogger()
} else if err := d.Logger.validate(); err != nil {
return err
}
if d.Server == nil {
d.Server = defaultServer()
} else if err := d.Server.validate(); err != nil {
return err
}
return nil
}
/*
######################################################################################################## @(°_°)@ #######
*/