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

Method SetNX

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

Source from the content-addressed store, hash-verified

14 GetVCode(ctx context.Context, smsID, number string) (string, error)
15 StoreVCode(ctx context.Context, smsID, number string, vCode string) error
16 SetNX(ctx context.Context, number string, value interface{}, expiration time.Duration) (*redis.BoolCmd, error)
17 Exist(ctx context.Context, number string) bool
18 Count(ctx context.Context, number string) int
19 IncrCnt(ctx context.Context, number string) error

Callers 3

acquireLockMethod · 0.65
acquireLockMethod · 0.65
SetNXMethod · 0.65

Implementers 1

smsCacheinternal/repository/cache/sms.go

Calls

no outgoing calls

Tested by

no test coverage detected