-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
734fb2e
commit 81a56b1
Showing
9 changed files
with
798 additions
and
406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package api | ||
|
||
import ( | ||
"context" | ||
|
||
mlsstore "github.com/xmtp/xmtp-node-go/pkg/mls/store" | ||
api "github.com/xmtp/xmtp-node-go/pkg/proto/identity/api/v1" | ||
"go.uber.org/zap" | ||
"google.golang.org/grpc/codes" | ||
"google.golang.org/grpc/status" | ||
) | ||
|
||
type Service struct { | ||
api.UnimplementedIdentityApiServer | ||
|
||
log *zap.Logger | ||
store mlsstore.MlsStore | ||
|
||
ctx context.Context | ||
ctxCancel func() | ||
} | ||
|
||
func NewService(log *zap.Logger, store mlsstore.MlsStore) (s *Service, err error) { | ||
s = &Service{ | ||
log: log.Named("identity"), | ||
store: store, | ||
} | ||
s.ctx, s.ctxCancel = context.WithCancel(context.Background()) | ||
|
||
s.log.Info("Starting identity service") | ||
return s, nil | ||
} | ||
|
||
func (s *Service) Close() { | ||
s.log.Info("closing") | ||
|
||
if s.ctxCancel != nil { | ||
s.ctxCancel() | ||
} | ||
|
||
s.log.Info("closed") | ||
} | ||
|
||
func (s *Service) PublishIdentityUpdate(ctx context.Context, req *api.PublishIdentityUpdateRequest) (*api.PublishIdentityUpdateResponse, error) { | ||
return nil, status.Errorf(codes.Unimplemented, "unimplemented") | ||
} | ||
|
||
func (s *Service) GetIdentityUpdates(ctx context.Context, req *api.GetIdentityUpdatesRequest) (*api.GetIdentityUpdatesResponse, error) { | ||
return nil, status.Errorf(codes.Unimplemented, "unimplemented") | ||
} | ||
|
||
func (s *Service) GetInboxIds(ctx context.Context, req *api.GetInboxIdsRequest) (*api.GetInboxIdsResponse, error) { | ||
return nil, status.Errorf(codes.Unimplemented, "unimplemented") | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
164 changes: 164 additions & 0 deletions
164
pkg/proto/mls/message_contents/group_mutable_metadata.pb.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
pkg/proto/openapi/mls/message_contents/group_mutable_metadata.swagger.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "mls/message_contents/group_mutable_metadata.proto", | ||
"version": "version not set" | ||
}, | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": {}, | ||
"definitions": { | ||
"protobufAny": { | ||
"type": "object", | ||
"properties": { | ||
"@type": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": {} | ||
}, | ||
"rpcStatus": { | ||
"type": "object", | ||
"properties": { | ||
"code": { | ||
"type": "integer", | ||
"format": "int32" | ||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
"details": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"$ref": "#/definitions/protobufAny" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |