1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
defmodule ExOvh.Ovh.Defaults do
@doc "Returns ovh default configuration settings"
@spec ovh() :: map
def ovh() do
%{
endpoint: "ovh-eu",
api_version: "1.0"
}
end
@doc "Returns map of ovh endpoints"
@spec endpoints() :: map
def endpoints() do
%{
"ovh-eu" => "https://api.ovh.com/",
"ovh-ca" => "https://ca.api.ovh.com/",
"kimsufi-eu" => "https://eu.api.kimsufi.com/",
"kimsufi-ca" => "https://ca.api.kimsufi.com/",
"soyoustart-eu" => "https://eu.api.soyoustart.com/",
"soyoustart-ca" => "https://ca.api.soyoustart.com/",
"runabove-ca" => "https://api.runabove.com/"
}
end
@doc "Returns the default access rules (all methods and paths)"
@spec access_rules() :: [map]
def access_rules() do
[
%{
method: "GET",
path: "/*"
},
%{
method: "POST",
path: "/*"
},
%{
method: "PUT",
path: "/*"
},
%{
method: "DELETE",
path: "/*"
}
]
end
end