Config: Add scheme support to DBConfig
parent
4a73618a7b
commit
ad06ab9d6a
@ -0,0 +1,23 @@
|
||||
module Invidious::Config
|
||||
struct DBConfig
|
||||
include YAML::Serializable
|
||||
|
||||
property scheme : String
|
||||
property user : String
|
||||
property password : String
|
||||
property host : String
|
||||
property port : Int32
|
||||
property dbname : String
|
||||
|
||||
def to_uri
|
||||
return URI.new(
|
||||
scheme: @scheme,
|
||||
user: @user,
|
||||
password: @password,
|
||||
host: @host,
|
||||
port: @port,
|
||||
path: @dbname,
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue