code: func decodeInvCursor(cursor string, cur *internal.InvocationsCursor) error {
  	if cursor == "" {
  		*cur = internal.InvocationsCursor{}
  		return nil
  	}
  
  	blob, err := base64.RawURLEncoding.DecodeString(cursor)
  	if err != nil {
  		return errors.Annotate(err, "failed to base64 decode the cursor").Err()
  	}
  
  	if err = proto.Unmarshal(blob, cur); err != nil {
  		return errors.Annotate(err, "failed to unmarshal the cursor").Err()
  	}
  
  	return nil
  }
docs: ////////////////////////////////////////////////////////////////////////////////
  // Cursor helpers.
  // decodeInvCursor deserializes a base64-encoded cursor.