GetSheetTruncated gets a sheet by SHA256 hash with truncated statement (max 2MB). Statement field will be truncated to MaxSheetSize (2MB). Results are cached by SHA256 hex string.
(ctx context.Context, sha256Hex string)
| 26 | // Statement field will be truncated to MaxSheetSize (2MB). |
| 27 | // Results are cached by SHA256 hex string. |
| 28 | func (s *Store) GetSheetTruncated(ctx context.Context, sha256Hex string) (*SheetMessage, error) { |
| 29 | sheet, err := s.getSheet(ctx, sha256Hex, false) |
| 30 | if err != nil { |
| 31 | return nil, err |
| 32 | } |
| 33 | if sheet == nil { |
| 34 | return nil, nil |
| 35 | } |
| 36 | return sheet, nil |
| 37 | } |
| 38 | |
| 39 | // GetSheetFull gets a sheet by SHA256 hash with the complete statement. |
| 40 | // Statement field contains the complete content regardless of size. |