MCPcopy Index your code
hub / github.com/coder/coder / CanSign

Method CanSign

coderd/database/modelmethods.go:856–859  ·  view source on GitHub ↗
(now time.Time)

Source from the content-addressed store, hash-verified

854}
855
856func (k CryptoKey) CanSign(now time.Time) bool {
857 isAfterStart := !k.StartsAt.IsZero() && !now.Before(k.StartsAt)
858 return isAfterStart && k.CanVerify(now)
859}
860
861func (k CryptoKey) CanVerify(now time.Time) bool {
862 hasSecret := k.Secret.Valid

Callers 3

keyMethod · 0.45
checkKeyFunction · 0.45
toKeyMapFunction · 0.45

Calls 2

CanVerifyMethod · 0.95
IsZeroMethod · 0.45

Tested by

no test coverage detected