MCPcopy Create free account
hub / github.com/cloudbase/garm / UnmarshalText

Method UnmarshalText

config/config.go:788–796  ·  view source on GitHub ↗
(text []byte)

Source from the content-addressed store, hash-verified

786}
787
788func (d *timeToLive) UnmarshalText(text []byte) error {
789 _, err := time.ParseDuration(string(text))
790 if err != nil {
791 return fmt.Errorf("invalid duration: %w", err)
792 }
793
794 *d = timeToLive(text)
795 return nil
796}
797
798// JWTAuth holds settings used to generate JWT tokens
799type JWTAuth struct {

Callers

nothing calls this directly

Calls 2

timeToLiveTypeAlias · 0.85
ParseDurationMethod · 0.45

Tested by

no test coverage detected