-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
api.go
29 lines (24 loc) · 1.56 KB
/
api.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
package privilege
import (
"context"
"net/http"
"configcenter/src/apimachinery/rest"
"configcenter/src/common/metadata"
)
type PrivilegeInterface interface {
CreateUserGroup(ctx context.Context, supplierAcct string, h http.Header, dat map[string]interface{}) (resp *metadata.Response, err error)
DeleteUserGroup(ctx context.Context, supplierAcct string, groupID string, h http.Header) (resp *metadata.Response, err error)
UpdateUserGroup(ctx context.Context, supplierAcct string, groupID string, h http.Header, dat map[string]interface{}) (resp *metadata.Response, err error)
SearchUserGroup(ctx context.Context, supplierAcct string, h http.Header, dat map[string]interface{}) (resp *metadata.Response, err error)
UpdateUserGroupPrivi(ctx context.Context, supplierAcct string, groupID string, h http.Header, dat map[string]interface{}) (resp *metadata.Response, err error)
GetUserGroupPrivi(ctx context.Context, supplierAcct string, groupID string, h http.Header) (resp *metadata.Response, err error)
GetUserPrivi(ctx context.Context, supplierAcct string, userName string, h http.Header) (resp *metadata.Response, err error)
CreatePrivilege(ctx context.Context, supplierAcct string, objID string, propertyID string, h http.Header) (resp *metadata.Response, err error)
GetPrivilege(ctx context.Context, supplierAcct string, objID string, propertyID string, h http.Header) (resp *metadata.Response, err error)
}
func NewPrivilegeInterface(client rest.ClientInterface) PrivilegeInterface {
return &privilege{client: client}
}
type privilege struct {
client rest.ClientInterface
}