MCPcopy Index your code
hub / github.com/rilldata/rill / unmarshalStringTimestampPageToken

Function unmarshalStringTimestampPageToken

admin/server/page_token.go:54–68  ·  view source on GitHub ↗
(tknStr string)

Source from the content-addressed store, hash-verified

52}
53
54func unmarshalStringTimestampPageToken(tknStr string) (*adminv1.StringTimestampPageToken, error) {
55 tkn := &adminv1.StringTimestampPageToken{}
56 if tknStr != "" {
57 in, err := base64.URLEncoding.DecodeString(tknStr)
58 if err != nil {
59 return nil, status.Errorf(codes.InvalidArgument, "failed to parse request token: %s", err.Error())
60 }
61
62 if err := proto.Unmarshal(in, tkn); err != nil {
63 return nil, status.Errorf(codes.InvalidArgument, "failed to parse request token: %s", err.Error())
64 }
65 }
66
67 return tkn, nil
68}
69
70func validPageSize(pageSize uint32) int {
71 if pageSize == 0 {

Callers 1

PullVirtualRepoMethod · 0.85

Calls 2

ErrorfMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected