(ctx context.Context, req *gstring.ExistsRequest)
| 233 | } |
| 234 | |
| 235 | func (s *str) Exists(ctx context.Context, req *gstring.ExistsRequest) (*gstring.ExistsResponse, error) { |
| 236 | exists, err := s.dbs.Exists(req.Key) |
| 237 | if err != nil { |
| 238 | return nil, err |
| 239 | } |
| 240 | |
| 241 | return &gstring.ExistsResponse{Exists: exists}, nil |
| 242 | } |
| 243 | |
| 244 | func (s *str) Expire(ctx context.Context, req *gstring.ExpireRequest) (*gstring.ExpireResponse, error) { |
| 245 | err := s.dbs.Expire(req.Key, req.Expire*1000) |