Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 79 additions & 80 deletions api/core/v1/record.pb.go

Large diffs are not rendered by default.

181 changes: 90 additions & 91 deletions api/routing/v1/routing_service.pb.go

Large diffs are not rendered by default.

275 changes: 137 additions & 138 deletions api/sign/v1/sign_service.pb.go

Large diffs are not rendered by default.

170 changes: 84 additions & 86 deletions api/store/v1/store_service.pb.go

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions api/store/v1/store_service_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/cmd/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func runCommand(cmd *cobra.Command, cid string) error {
}

// Delete object from store
err := c.Delete(cmd.Context(), &corev1.RecordRef{
err := c.Delete(cmd.Context(), &corev1.CID{
Cid: cid,
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/info/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func runCommand(cmd *cobra.Command, input string) error {
}

// Fetch info from store
info, err := c.Lookup(cmd.Context(), &corev1.RecordRef{
info, err := c.Lookup(cmd.Context(), &corev1.CID{
Cid: recordCID,
})
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions cli/cmd/pull/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func runCommand(cmd *cobra.Command, input string) error {
}

// Fetch record from store
record, err := c.Pull(cmd.Context(), &corev1.RecordRef{
record, err := c.Pull(cmd.Context(), &corev1.CID{
Cid: recordCID,
})
if err != nil {
Expand All @@ -115,7 +115,7 @@ func runCommand(cmd *cobra.Command, input string) error {
publicKeyType := corev1.PublicKeyReferrerType

resultCh, err := c.PullReferrer(cmd.Context(), &storev1.PullReferrerRequest{
RecordRef: &corev1.RecordRef{
RecordRef: &corev1.CID{
Cid: recordCID,
},
ReferrerType: &publicKeyType,
Expand All @@ -142,7 +142,7 @@ func runCommand(cmd *cobra.Command, input string) error {
signatureType := corev1.SignatureReferrerType

resultCh, err := c.PullReferrer(cmd.Context(), &storev1.PullReferrerRequest{
RecordRef: &corev1.RecordRef{
RecordRef: &corev1.CID{
Cid: recordCID,
},
ReferrerType: &signatureType,
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/push/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func runCommand(cmd *cobra.Command, source io.Reader) error {
return fmt.Errorf("failed to load OASF: %w", err)
}

var recordRef *corev1.RecordRef
var recordRef *corev1.CID

// Use the client's Push method to send the record
recordRef, err = c.Push(cmd.Context(), record)
Expand Down
18 changes: 9 additions & 9 deletions cli/cmd/routing/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func TestCollectRoutingStatistics_EmptyChannel(t *testing.T) {
func TestCollectRoutingStatistics_SingleRecord(t *testing.T) {
ch := make(chan *routingv1.ListResponse, 1)
ch <- &routingv1.ListResponse{
RecordRef: &corev1.RecordRef{Cid: "test-cid"},
RecordRef: &corev1.CID{Cid: "test-cid"},
Labels: []string{"/skills/AI", "/locators/docker-image"},
}

Expand All @@ -146,17 +146,17 @@ func TestCollectRoutingStatistics_SingleRecord(t *testing.T) {
func TestCollectRoutingStatistics_MultipleRecords(t *testing.T) {
ch := make(chan *routingv1.ListResponse, 3)
ch <- &routingv1.ListResponse{
RecordRef: &corev1.RecordRef{Cid: "cid1"},
RecordRef: &corev1.CID{Cid: "cid1"},
Labels: []string{"/skills/AI", "/locators/docker-image"},
}

ch <- &routingv1.ListResponse{
RecordRef: &corev1.RecordRef{Cid: "cid2"},
RecordRef: &corev1.CID{Cid: "cid2"},
Labels: []string{"/skills/AI", "/skills/ML"},
}

ch <- &routingv1.ListResponse{
RecordRef: &corev1.RecordRef{Cid: "cid3"},
RecordRef: &corev1.CID{Cid: "cid3"},
Labels: []string{"/skills/ML", "/locators/http"},
}

Expand All @@ -174,12 +174,12 @@ func TestCollectRoutingStatistics_MultipleRecords(t *testing.T) {
func TestCollectRoutingStatistics_WithOtherLabels(t *testing.T) {
ch := make(chan *routingv1.ListResponse, 2)
ch <- &routingv1.ListResponse{
RecordRef: &corev1.RecordRef{Cid: "cid1"},
RecordRef: &corev1.CID{Cid: "cid1"},
Labels: []string{"/skills/AI", "/domains/healthcare", "/custom/label"},
}

ch <- &routingv1.ListResponse{
RecordRef: &corev1.RecordRef{Cid: "cid2"},
RecordRef: &corev1.CID{Cid: "cid2"},
Labels: []string{"/domains/healthcare", "/modules/runtime"},
}

Expand All @@ -201,12 +201,12 @@ func TestCollectRoutingStatistics_WithOtherLabels(t *testing.T) {
func TestCollectRoutingStatistics_RecordWithNoLabels(t *testing.T) {
ch := make(chan *routingv1.ListResponse, 2)
ch <- &routingv1.ListResponse{
RecordRef: &corev1.RecordRef{Cid: "cid1"},
RecordRef: &corev1.CID{Cid: "cid1"},
Labels: []string{},
}

ch <- &routingv1.ListResponse{
RecordRef: &corev1.RecordRef{Cid: "cid2"},
RecordRef: &corev1.CID{Cid: "cid2"},
Labels: nil,
}

Expand Down Expand Up @@ -523,7 +523,7 @@ func TestCollectRoutingStatistics_LargeDataset(t *testing.T) {
}

ch <- &routingv1.ListResponse{
RecordRef: &corev1.RecordRef{Cid: "cid-" + string(rune(i))},
RecordRef: &corev1.CID{Cid: "cid-" + string(rune(i))},
Labels: labels,
}
}
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/routing/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func runPublishCommand(cmd *cobra.Command, cid string) error {
}

// Create RecordRef from cid
recordRef := &corev1.RecordRef{
recordRef := &corev1.CID{
Cid: cid,
}

Expand All @@ -74,7 +74,7 @@ func runPublishCommand(cmd *cobra.Command, cid string) error {
if err := c.Publish(cmd.Context(), &routingv1.PublishRequest{
Request: &routingv1.PublishRequest_RecordRefs{
RecordRefs: &routingv1.RecordRefs{
Refs: []*corev1.RecordRef{recordRef},
Refs: []*corev1.CID{recordRef},
},
},
}); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/routing/unpublish.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func runUnpublishCommand(cmd *cobra.Command, cid string) error {
}

// Create RecordRef from cid
recordRef := &corev1.RecordRef{
recordRef := &corev1.CID{
Cid: cid,
}

Expand All @@ -71,7 +71,7 @@ func runUnpublishCommand(cmd *cobra.Command, cid string) error {
if err := c.Unpublish(cmd.Context(), &routingv1.UnpublishRequest{
Request: &routingv1.UnpublishRequest_RecordRefs{
RecordRefs: &routingv1.RecordRefs{
Refs: []*corev1.RecordRef{recordRef},
Refs: []*corev1.CID{recordRef},
},
},
}); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/sign/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func Sign(ctx context.Context, c *client.Client, recordCID string) error {

// Sign the record using given provider
_, err := c.Sign(ctx, &signv1.SignRequest{
RecordRef: &corev1.RecordRef{Cid: recordCID},
RecordRef: &corev1.CID{Cid: recordCID},
Provider: provider,
})
if err != nil {
Expand Down
Loading
Loading