MCPcopy Create free account
hub / github.com/bytebase/bytebase / convertV1TessellationConfig

Function convertV1TessellationConfig

backend/api/v1/database_converter.go:814–831  ·  view source on GitHub ↗
(tessellation *v1pb.TessellationConfig)

Source from the content-addressed store, hash-verified

812}
813
814func convertV1TessellationConfig(tessellation *v1pb.TessellationConfig) *storepb.TessellationConfig {
815 if tessellation == nil {
816 return nil
817 }
818 gridLevels := make([]*storepb.GridLevel, len(tessellation.GridLevels))
819 for i, level := range tessellation.GridLevels {
820 gridLevels[i] = &storepb.GridLevel{
821 Level: level.Level,
822 Density: level.Density,
823 }
824 }
825 return &storepb.TessellationConfig{
826 Scheme: tessellation.Scheme,
827 GridLevels: gridLevels,
828 CellsPerObject: tessellation.CellsPerObject,
829 BoundingBox: convertV1BoundingBox(tessellation.BoundingBox),
830 }
831}
832
833func convertStoreBoundingBox(bbox *storepb.BoundingBox) *v1pb.BoundingBox {
834 if bbox == nil {

Callers 1

Calls 1

convertV1BoundingBoxFunction · 0.85

Tested by

no test coverage detected