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