(text []byte)
| 786 | } |
| 787 | |
| 788 | func (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 |
| 799 | type JWTAuth struct { |
nothing calls this directly
no test coverage detected