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

Function unmarshalPageToken

backend/api/v1/common.go:333–342  ·  view source on GitHub ↗
(s string, pageToken *storepb.PageToken)

Source from the content-addressed store, hash-verified

331}
332
333func unmarshalPageToken(s string, pageToken *storepb.PageToken) error {
334 b, err := base64.StdEncoding.DecodeString(s)
335 if err != nil {
336 return errors.Wrapf(err, "failed to decode page token")
337 }
338 if err := proto.Unmarshal(b, pageToken); err != nil {
339 return errors.Wrapf(err, "failed to unmarshal page token")
340 }
341 return nil
342}
343
344type pageSize struct {
345 token string

Callers 1

parseLimitAndOffsetFunction · 0.85

Calls 1

UnmarshalMethod · 0.80

Tested by

no test coverage detected