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

Function convertToAPISheetMessage

backend/api/v1/sheet_service.go:151–157  ·  view source on GitHub ↗
(projectID string, sheet *store.SheetMessage)

Source from the content-addressed store, hash-verified

149}
150
151func convertToAPISheetMessage(projectID string, sheet *store.SheetMessage) *v1pb.Sheet {
152 return &v1pb.Sheet{
153 Name: common.FormatSheet(projectID, sheet.Sha256),
154 Content: []byte(sheet.Statement),
155 ContentSize: sheet.Size,
156 }
157}
158
159func convertToStoreSheetMessage(sheet *v1pb.Sheet) *store.SheetMessage {
160 sheetMessage := &store.SheetMessage{

Callers 3

CreateSheetMethod · 0.85
BatchCreateSheetsMethod · 0.85
GetSheetMethod · 0.85

Calls 1

FormatSheetFunction · 0.92

Tested by

no test coverage detected