MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / SetNX

Method SetNX

internal/repository/sms.go:70–72  ·  view source on GitHub ↗
(ctx context.Context, number string, value interface{}, expiration time.Duration)

Source from the content-addressed store, hash-verified

68}
69
70func (s *smsRepository) SetNX(ctx context.Context, number string, value interface{}, expiration time.Duration) (*redis.BoolCmd, error) {
71 return s.cache.SetNX(ctx, number, value, expiration)
72}
73
74func (s *smsRepository) StoreVCode(ctx context.Context, smsID, number, vCode string) error {
75 return s.cache.StoreVCode(ctx, smsID, number, vCode)

Callers

nothing calls this directly

Calls 1

SetNXMethod · 0.65

Tested by

no test coverage detected