Skip to content

Commit

Permalink
fix: get id (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
kqzh authored Aug 23, 2023
1 parent 06c3be8 commit d2e5f5f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ccore/nebula/internal/driver/v2_5/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -1148,8 +1148,8 @@ func (w spaceWrapper) GetName() string {
return string(w.Space.GetName())
}

func (w spaceWrapper) GetId() string {
return w.Space.GetId().String()
func (w spaceWrapper) GetId() int32 {
return w.Space.GetId().GetSpaceID()
}

type spacesWrap struct {
Expand Down
4 changes: 2 additions & 2 deletions ccore/nebula/internal/driver/v2_6/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -1248,8 +1248,8 @@ func (w spaceWrapper) GetName() string {
return string(w.Space.GetName())
}

func (w spaceWrapper) GetId() string {
return w.Space.GetId().String()
func (w spaceWrapper) GetId() int32 {
return w.Space.GetId().GetSpaceID()
}

type spacesWrap struct {
Expand Down
4 changes: 2 additions & 2 deletions ccore/nebula/internal/driver/v3_0/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -1213,8 +1213,8 @@ func (w spaceWrapper) GetName() string {
return string(w.Space.GetName())
}

func (w spaceWrapper) GetId() string {
return w.Space.GetId().String()
func (w spaceWrapper) GetId() int32 {
return w.Space.GetId().GetSpaceID()
}

type spacesWrap struct {
Expand Down
2 changes: 1 addition & 1 deletion ccore/nebula/types/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type (

Space interface {
GetName() string
GetId() string
GetId() int32
}

Spaces interface {
Expand Down

0 comments on commit d2e5f5f

Please sign in to comment.