civo 1.4.1 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/civo/database.rb +17 -0
- data/app/models/civo/disk_image.rb +0 -2
- data/app/models/civo/organisation.rb +13 -0
- data/app/models/civo/permission.rb +9 -0
- data/app/models/civo/role.rb +11 -0
- data/app/models/civo/team.rb +8 -10
- data/lib/civo.rb +1 -0
- data/lib/civo/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5632088e14414d38cde78dc528acc021d075c79273c6eb3f1458e225e9ace469
|
4
|
+
data.tar.gz: a76d91db2a742a4a981e57289928d8bd432126d70317c3d126a962e5de74d0c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6410fb9cc77b5e9fd19cc0305bad9263e1fe2c63f785874ea92a7c6773a207e4455559a8c09faf80116970b0e1570c3f593b3337b0699a9908a32fd0d74d001
|
7
|
+
data.tar.gz: 7d6c809d709a21ee8d28c319879578f7c4226952c7333a66544c0353e1dc060b8869d15559204526d0b0a3a788748de60bb45ded94ebd3c9680ce108e8aabc2c
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Civo
|
2
|
+
class Database < Base
|
3
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases"
|
4
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases", requires: [:name, :size, :region]
|
5
|
+
get :find, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id"
|
6
|
+
put :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id"
|
7
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id", requires: [:id], send_delete_body: true
|
8
|
+
put :upgrade, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id/resize", requires: [:size, :id]
|
9
|
+
put :restore, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id/restore", requires: [:snapshot_id]
|
10
|
+
get :snapshots, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id/snapshots"
|
11
|
+
put :tags, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id/tags"
|
12
|
+
|
13
|
+
def to_partial_path
|
14
|
+
"civo/database"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# WARNING!
|
2
|
+
# This module is for an in-development feature of Civo and isn't intended to
|
3
|
+
# be used by the general public yet. Public accounts won't even have the
|
4
|
+
# feature flag enabled. Do not bother trying to use this class.
|
5
|
+
module Civo
|
6
|
+
class Organisation < Base
|
7
|
+
get :current, "/v#{ENV["CIVO_API_VERSION"] || "2"}/organisation"
|
8
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/organisation", requires: [:name]
|
9
|
+
put :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/organisation", requires: [:name]
|
10
|
+
get :accounts, "/v#{ENV["CIVO_API_VERSION"] || "2"}/organisation/accounts"
|
11
|
+
post :add_account, "/v#{ENV["CIVO_API_VERSION"] || "2"}/organisation/accounts", requires: [:account_id]
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# WARNING!
|
2
|
+
# This module is for an in-development feature of Civo and isn't intended to
|
3
|
+
# be used by the general public yet. Public accounts won't even have the
|
4
|
+
# feature flag enabled. Do not bother trying to use this class.
|
5
|
+
module Civo
|
6
|
+
class Permission < Base
|
7
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/permissions"
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# WARNING!
|
2
|
+
# This module is for an in-development feature of Civo and isn't intended to
|
3
|
+
# be used by the general public yet. Public accounts won't even have the
|
4
|
+
# feature flag enabled. Do not bother trying to use this class.
|
5
|
+
module Civo
|
6
|
+
class Role < Base
|
7
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/roles"
|
8
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/roles", requires: [:name, :permissions]
|
9
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/organisation/roles/:id"
|
10
|
+
end
|
11
|
+
end
|
data/app/models/civo/team.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# WARNING!
|
2
|
+
# This module is for an in-development feature of Civo and isn't intended to
|
3
|
+
# be used by the general public yet. Public accounts won't even have the
|
4
|
+
# feature flag enabled. Do not bother trying to use this class.
|
1
5
|
module Civo
|
2
6
|
class Team < Base
|
3
7
|
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams"
|
@@ -5,15 +9,9 @@ module Civo
|
|
5
9
|
put :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id", requires: %i{id}
|
6
10
|
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id", requires: %i{id}, send_delete_body: true
|
7
11
|
|
8
|
-
get :
|
9
|
-
post :
|
10
|
-
|
11
|
-
|
12
|
-
post :permissions, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/memberships", requires: %i{email_address permissions}
|
13
|
-
delete :member_remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/memberships/:user_id", requires: %i{id user_id}, send_delete_body: true
|
14
|
-
|
15
|
-
def to_partial_path
|
16
|
-
"civo/team"
|
17
|
-
end
|
12
|
+
get :members "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/members"
|
13
|
+
post :add_member "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/members", requires: [:user_id]
|
14
|
+
post :update_member "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/members/:member_id"
|
15
|
+
delete :remove_member "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/members/:member_id"
|
18
16
|
end
|
19
17
|
end
|
data/lib/civo.rb
CHANGED
@@ -14,6 +14,7 @@ require_relative "../app/models/civo/action"
|
|
14
14
|
require_relative "../app/models/civo/audit_log"
|
15
15
|
require_relative "../app/models/civo/blueprint"
|
16
16
|
require_relative "../app/models/civo/charge"
|
17
|
+
require_relative "../app/models/civo/database"
|
17
18
|
require_relative "../app/models/civo/disk_image"
|
18
19
|
require_relative "../app/models/civo/dns_domain"
|
19
20
|
require_relative "../app/models/civo/dns_record"
|
data/lib/civo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: civo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flexirest
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- app/models/civo/base.rb
|
82
82
|
- app/models/civo/blueprint.rb
|
83
83
|
- app/models/civo/charge.rb
|
84
|
+
- app/models/civo/database.rb
|
84
85
|
- app/models/civo/disk_image.rb
|
85
86
|
- app/models/civo/dns_domain.rb
|
86
87
|
- app/models/civo/dns_record.rb
|
@@ -92,8 +93,11 @@ files:
|
|
92
93
|
- app/models/civo/kubernetes.rb
|
93
94
|
- app/models/civo/load_balancer.rb
|
94
95
|
- app/models/civo/network.rb
|
96
|
+
- app/models/civo/organisation.rb
|
97
|
+
- app/models/civo/permission.rb
|
95
98
|
- app/models/civo/quota.rb
|
96
99
|
- app/models/civo/region.rb
|
100
|
+
- app/models/civo/role.rb
|
97
101
|
- app/models/civo/size.rb
|
98
102
|
- app/models/civo/snapshot.rb
|
99
103
|
- app/models/civo/ssh_key.rb
|