mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-09 09:35:03 +09:00
coordinator: change check limit sig
This commit is contained in:
parent
8f26b7dbfe
commit
89373e5247
1 changed files with 3 additions and 4 deletions
|
@ -30,7 +30,7 @@ type CoordinatorClient interface {
|
||||||
StatusCheckMany(ctx context.Context, spaceIds []string) (statuses []*coordinatorproto.SpaceStatusPayload, err error)
|
StatusCheckMany(ctx context.Context, spaceIds []string) (statuses []*coordinatorproto.SpaceStatusPayload, err error)
|
||||||
StatusCheck(ctx context.Context, spaceId string) (status *coordinatorproto.SpaceStatusPayload, err error)
|
StatusCheck(ctx context.Context, spaceId string) (status *coordinatorproto.SpaceStatusPayload, err error)
|
||||||
SpaceSign(ctx context.Context, payload SpaceSignPayload) (receipt *coordinatorproto.SpaceReceiptWithSignature, err error)
|
SpaceSign(ctx context.Context, payload SpaceSignPayload) (receipt *coordinatorproto.SpaceReceiptWithSignature, err error)
|
||||||
FileLimitCheck(ctx context.Context, spaceId string, identity []byte) (limit uint64, err error)
|
FileLimitCheck(ctx context.Context, spaceId string, identity []byte) (response *coordinatorproto.FileLimitCheckResponse, err error)
|
||||||
NetworkConfiguration(ctx context.Context, currentId string) (*coordinatorproto.NetworkConfigurationResponse, error)
|
NetworkConfiguration(ctx context.Context, currentId string) (*coordinatorproto.NetworkConfigurationResponse, error)
|
||||||
DeletionLog(ctx context.Context, lastRecordId string, limit int) (records []*coordinatorproto.DeletionLogRecord, err error)
|
DeletionLog(ctx context.Context, lastRecordId string, limit int) (records []*coordinatorproto.DeletionLogRecord, err error)
|
||||||
app.Component
|
app.Component
|
||||||
|
@ -163,16 +163,15 @@ func (c *coordinatorClient) SpaceSign(ctx context.Context, payload SpaceSignPayl
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *coordinatorClient) FileLimitCheck(ctx context.Context, spaceId string, identity []byte) (limit uint64, err error) {
|
func (c *coordinatorClient) FileLimitCheck(ctx context.Context, spaceId string, identity []byte) (resp *coordinatorproto.FileLimitCheckResponse, err error) {
|
||||||
err = c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error {
|
err = c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error {
|
||||||
resp, err := cl.FileLimitCheck(ctx, &coordinatorproto.FileLimitCheckRequest{
|
resp, err = cl.FileLimitCheck(ctx, &coordinatorproto.FileLimitCheckRequest{
|
||||||
AccountIdentity: identity,
|
AccountIdentity: identity,
|
||||||
SpaceId: spaceId,
|
SpaceId: spaceId,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return rpcerr.Unwrap(err)
|
return rpcerr.Unwrap(err)
|
||||||
}
|
}
|
||||||
limit = resp.Limit
|
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue