bulk-barrage/src/config.cr

28 lines
463 B
Crystal
Raw Permalink Normal View History

require "yaml"
2023-12-19 15:06:14 +00:00
# Classe pour la gestion de la configuration
class Authentication
2023-12-19 15:06:14 +00:00
include YAML::Serializable
@[YAML::Field(key: "username")]
property username : String
2023-12-19 15:06:14 +00:00
@[YAML::Field(key: "password")]
property password : String
2023-12-19 15:06:14 +00:00
def initialize(@username, @password)
2023-12-19 15:06:14 +00:00
end
end
class Config
include YAML::Serializable
2023-12-19 15:06:14 +00:00
@[YAML::Field(key: "authentication")]
property authentication : Authentication
def initialize(@authentication)
end
2023-12-19 15:06:14 +00:00
end