Skip to content

Commit f649bdb

Browse files
committedApr 24, 2019
refactors utils
1 parent 3176ca2 commit f649bdb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎lib/utils.ex

+4
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
defmodule Bigtable.Utils do
22
@moduledoc false
33

4+
@spec configured_table_name() :: binary()
45
def configured_table_name do
56
instance = configured_instance_name()
67
table = Application.get_env(:bigtable, :table)
78

89
"#{instance}/tables/#{table}"
910
end
1011

12+
@spec configured_instance_name() :: binary()
1113
def configured_instance_name do
1214
project = get_project()
1315
instance = get_instance()
1416
"projects/#{project}/instances/#{instance}"
1517
end
1618

19+
@spec get_project() :: binary()
1720
defp get_project do
1821
Application.get_env(:bigtable, :project)
1922
end
2023

24+
@spec get_instance() :: binary()
2125
defp get_instance do
2226
Application.get_env(:bigtable, :instance)
2327
end

0 commit comments

Comments
 (0)
Please sign in to comment.