(ctx context.Context, req *gstring.AppendRequest)
| 185 | } |
| 186 | |
| 187 | func (s *str) Append(ctx context.Context, req *gstring.AppendRequest) (*gstring.AppendResponse, error) { |
| 188 | err := s.dbs.Append(req.Key, req.Value, req.Expire*1000) |
| 189 | if err != nil { |
| 190 | return &gstring.AppendResponse{}, err |
| 191 | } |
| 192 | return &gstring.AppendResponse{Ok: true}, nil |
| 193 | } |
| 194 | |
| 195 | func (s *str) Incr(ctx context.Context, req *gstring.IncrRequest) (*gstring.IncrResponse, error) { |
| 196 | err := s.dbs.Incr(req.Key, req.Expire*1000) |