-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin_handler.go
209 lines (185 loc) · 6.03 KB
/
admin_handler.go
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/*
* Copyright 2022-2023 Thorsten A. Knieling
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
package server
import (
"context"
ht "github.com/ogen-go/ogen/http"
"github.com/tknie/clu/api"
)
// Access implements access operation.
//
// Retrieve the list of users who are allowed to access data.
//
// GET /admin/access/{role}
func (Handler) Access(ctx context.Context, params api.AccessParams) (r api.AccessRes, _ error) {
return r, ht.ErrNotImplemented
}
// AdaptPermission implements adaptPermission operation.
//
// Add RBAC role.
//
// PUT /admin/database/{table}/permission
func (Handler) AdaptPermission(ctx context.Context, params api.AdaptPermissionParams) (r api.AdaptPermissionRes, _ error) {
return r, ht.ErrNotImplemented
}
// AddAccess implements addAccess operation.
//
// Insert user in the list of users who are allowed to access data.
//
// POST /admin/access/{role}
func (Handler) AddAccess(ctx context.Context, params api.AddAccessParams) (r api.AddAccessRes, _ error) {
return r, ht.ErrNotImplemented
}
// AddRBACResource implements addRBACResource operation.
//
// Add permission role.
//
// PUT /admin/database/{table}/permission/{resource}/{name}
func (Handler) AddRBACResource(ctx context.Context, params api.AddRBACResourceParams) (r api.AddRBACResourceRes, _ error) {
return r, ht.ErrNotImplemented
}
// AddView implements addView operation.
//
// Add configuration in View repositories.
//
// POST /admin/config/views
func (Handler) AddView(ctx context.Context, params api.AddViewParams) (r api.AddViewRes, _ error) {
return r, ht.ErrNotImplemented
}
// DelAccess implements delAccess operation.
//
// Delete user in the list of users who are allowed to access data.
//
// DELETE /admin/access/{role}
func (Handler) DelAccess(ctx context.Context, params api.DelAccessParams) (r api.DelAccessRes, _ error) {
return r, ht.ErrNotImplemented
}
// DeleteRBACResource implements deleteRBACResource operation.
//
// Delete RBAC role.
//
// DELETE /admin/database/{table}/permission/{resource}/{name}
func (Handler) DeleteRBACResource(ctx context.Context, params api.DeleteRBACResourceParams) (r api.DeleteRBACResourceRes, _ error) {
return r, ht.ErrNotImplemented
}
// DeleteView implements deleteView operation.
//
// Delete entry in configuration.
//
// DELETE /admin/config/views
func (Handler) DeleteView(ctx context.Context, params api.DeleteViewParams) (r api.DeleteViewRes, _ error) {
return r, ht.ErrNotImplemented
}
// DisconnectTCP implements disconnectTCP operation.
//
// Disconnect connection in the database with the given dbid.
//
// DELETE /admin/database/{table}/connection
func (Handler) DisconnectTCP(ctx context.Context, params api.DisconnectTCPParams) (r api.DisconnectTCPRes, _ error) {
return r, ht.ErrNotImplemented
}
// GetConfig implements getConfig operation.
//
// Get configuration.
//
// GET /admin/config
func (Handler) GetConfig(ctx context.Context) (r api.GetConfigRes, _ error) {
return r, ht.ErrNotImplemented
}
// GetConnections implements getConnections operation.
//
// Retrieve the current TCP connection.
//
// GET /admin/database/{table}/connection
func (Handler) GetConnections(ctx context.Context, params api.GetConnectionsParams) (r api.GetConnectionsRes, _ error) {
return r, ht.ErrNotImplemented
}
// GetDatabases implements getDatabases operation.
//
// Retrieves a list of databases known by Interface.
//
// GET /admin/database
func (Handler) GetDatabases(ctx context.Context) (r api.GetDatabasesRes, _ error) {
return r, ht.ErrNotImplemented
}
// GetPermission implements getPermission operation.
//
// List RBAC assignments permission.
//
// GET /admin/database/{table}/permission
func (Handler) GetPermission(ctx context.Context, params api.GetPermissionParams) (r api.GetPermissionRes, _ error) {
return r, ht.ErrNotImplemented
}
// GetViews implements getViews operation.
//
// Defines the current views.
//
// GET /admin/config/views
func (Handler) GetViews(ctx context.Context) (r api.GetViewsRes, _ error) {
return r, ht.ErrNotImplemented
}
// ListRBACResource implements listRBACResource operation.
//
// Add RBAC role.
//
// GET /admin/database/{table}/permission/{resource}
func (Handler) ListRBACResource(ctx context.Context, params api.ListRBACResourceParams) (r api.ListRBACResourceRes, _ error) {
return r, ht.ErrNotImplemented
}
// PostDatabase implements postDatabase operation.
//
// Create a new database, the input need to be JSON. A structure level parameter indicate version to
// be used.
//
// POST /admin/database
func (Handler) PostDatabase(ctx context.Context, req *api.Database) (r api.PostDatabaseRes, _ error) {
return r, ht.ErrNotImplemented
}
// PutDatabaseResource implements putDatabaseResource operation.
//
// Change resource of the database.
//
// PUT /admin/database/{table_operation}
func (Handler) PutDatabaseResource(ctx context.Context, params api.PutDatabaseResourceParams) (r api.PutDatabaseResourceRes, _ error) {
return r, ht.ErrNotImplemented
}
// RemovePermission implements removePermission operation.
//
// Add RBAC role.
//
// DELETE /admin/database/{table}/permission
func (Handler) RemovePermission(ctx context.Context, params api.RemovePermissionParams) (r api.RemovePermissionRes, _ error) {
return r, ht.ErrNotImplemented
}
// SetConfig implements setConfig operation.
//
// Store configuration.
//
// PUT /admin/config
func (Handler) SetConfig(ctx context.Context, req api.SetConfigReq) (r api.SetConfigRes, _ error) {
return r, ht.ErrNotImplemented
}
// SetJobsConfig implements setJobsConfig operation.
//
// Set the ADADATADIR.
//
// PUT /admin/config/jobs
func (Handler) SetJobsConfig(ctx context.Context, req api.OptJobStore) (r api.SetJobsConfigRes, _ error) {
return r, ht.ErrNotImplemented
}
// StoreConfig implements storeConfig operation.
//
// Store configuration.
//
// POST /admin/config
func (Handler) StoreConfig(ctx context.Context) (r api.StoreConfigRes, _ error) {
return r, ht.ErrNotImplemented
}