mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
refactor permissions service to make creating drives testable
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
settingssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
|
||||
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/graph/pkg/identity"
|
||||
"go-micro.dev/v4/client"
|
||||
mevents "go-micro.dev/v4/events"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
@@ -62,6 +63,11 @@ type Publisher interface {
|
||||
Publish(string, interface{}, ...mevents.PublishOption) error
|
||||
}
|
||||
|
||||
type Permissions interface {
|
||||
GetPermissionByID(ctx context.Context, request *settingssvc.GetPermissionByIDRequest, opts ...client.CallOption) (*settingssvc.GetPermissionByIDResponse, error)
|
||||
ListPermissionsByResource(ctx context.Context, in *settingssvc.ListPermissionsByResourceRequest, opts ...client.CallOption) (*settingssvc.ListPermissionsByResourceResponse, error)
|
||||
}
|
||||
|
||||
// HTTPClient is the subset of the http.Client that is being used to interact with the download gateway
|
||||
type HTTPClient interface {
|
||||
Do(req *http.Request) (*http.Response, error)
|
||||
|
||||
Reference in New Issue
Block a user