Class: DokkuClient::Plugins::Postgresql
- Inherits:
-
Base
- Object
- Base
- DokkuClient::Plugins::Postgresql
show all
- Defined in:
- lib/dokku_client/plugins/postgresql.rb
Constant Summary
Constants inherited
from Base
Base::GIT_DIR, Base::KEYS_AND_QUESTIONS
Instance Attribute Summary
Attributes inherited from Base
#options
Instance Method Summary
collapse
Methods inherited from Base
#common_description, #dokku, #git_directory_present?, #initialize, #plugin_enabled, #reconfig
Instance Method Details
#commands(opts) ⇒ Object
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/dokku_client/plugins/postgresql.rb', line 40
def commands opts
if plugin_enabled('postgresql')
opts.separator "\n Postgresql commands:"
opts.separator " postgresql:create <db> create a postgresql database"
opts.separator " postgresql:delete <db> delete specified postgresql database"
opts.separator " postgresql:info <db> display database information"
opts.separator " postgresql:link <db> link an app to a postgresql container"
opts.separator " postgresql:list <db> display list of postgresql containers"
opts.separator " postgresql:logs display last logs from postgresql container"
end
end
|
#create_postgresql(db) ⇒ Object
8
9
10
|
# File 'lib/dokku_client/plugins/postgresql.rb', line 8
def create_postgresql db
dokku "postgresql:create #{db}"
end
|
#delete_postgresql(db) ⇒ Object
16
17
18
|
# File 'lib/dokku_client/plugins/postgresql.rb', line 16
def delete_postgresql db
dokku "postgresql:delete #{db}"
end
|
#dump_postgresql(db) ⇒ Object
32
33
34
|
# File 'lib/dokku_client/plugins/postgresql.rb', line 32
def dump_postgresql db
end
|
#info_postgresql(db) ⇒ Object
12
13
14
|
# File 'lib/dokku_client/plugins/postgresql.rb', line 12
def info_postgresql db
dokku "postgresql:info #{db}"
end
|
#link_postgresql(db) ⇒ Object
28
29
30
|
# File 'lib/dokku_client/plugins/postgresql.rb', line 28
def link_postgresql db
dokku "postgresql:link #{@options["project-name"]} #{db}"
end
|
#list_postgresql ⇒ Object
20
21
22
|
# File 'lib/dokku_client/plugins/postgresql.rb', line 20
def list_postgresql
dokku "postgresql:list"
end
|
#logs_postgresql(db) ⇒ Object
24
25
26
|
# File 'lib/dokku_client/plugins/postgresql.rb', line 24
def logs_postgresql db
dokku "postgresql:logs #{db}"
end
|
#restore_postgresql(db) ⇒ Object
36
37
38
|
# File 'lib/dokku_client/plugins/postgresql.rb', line 36
def restore_postgresql db
end
|
#run ⇒ Object
5
6
|
# File 'lib/dokku_client/plugins/postgresql.rb', line 5
def run
end
|