Skip to content

Commit

Permalink
feat(data): defining linked data
Browse files Browse the repository at this point in the history
  • Loading branch information
deepanshutr committed Aug 15, 2023
1 parent 371a9be commit 347a919
Show file tree
Hide file tree
Showing 14 changed files with 845 additions and 79 deletions.
5 changes: 5 additions & 0 deletions go/data/base/any_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ func (x *AnyData_StringData) get() data.Data {
func (x *AnyData_ListData) get() data.Data {
return x.ListData
}
func (x *AnyData_LinkedData) get() data.Data {
return x.LinkedData
}

var _ data.AnyData = (*AnyData)(nil)

Expand Down Expand Up @@ -70,6 +73,8 @@ func (x *AnyData) FromString(dataString string) (data.Data, error) {
Data, err = PrototypeHeightData().FromString(dataValueString)
case PrototypeListData().GetTypeID().AsString():
Data, err = PrototypeListData().FromString(dataValueString)
case PrototypeLinkedData().GetTypeID().AsString():
Data, err = PrototypeLinkedData().FromString(dataValueString)
case PrototypeNumberData().GetTypeID().AsString():
Data, err = PrototypeNumberData().FromString(dataValueString)
case PrototypeStringData().GetTypeID().AsString():
Expand Down
158 changes: 120 additions & 38 deletions go/data/base/any_data.pb.go

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

3 changes: 3 additions & 0 deletions go/data/base/any_listable_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ func (x *AnyListableData_NumberData) get() data.ListableData {
func (x *AnyListableData_StringData) get() data.ListableData {
return x.StringData
}
func (x *AnyListableData_LinkedData) get() data.ListableData {
return x.LinkedData
}

var _ data.AnyListableData = (*AnyListableData)(nil)

Expand Down
Loading

0 comments on commit 347a919

Please sign in to comment.