File tree 4 files changed +11
-11
lines changed
4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ func ExampleNew() {
34
34
invocation .WithMeta ("env" , "development" ),
35
35
invocation .WithMeta ("tags" , meta ["tags" ]),
36
36
invocation .WithExpirationIn (time .Minute ),
37
- invocation .WithoutInvokedAt ())
37
+ invocation .WithoutIssuedAt ())
38
38
if err != nil {
39
39
fmt .Println ("failed to create invocation:" , err .Error ())
40
40
Original file line number Diff line number Diff line change @@ -66,9 +66,9 @@ type Token struct {
66
66
// WithNonce or WithEmptyNonce options to specify provide your own nonce
67
67
// or to leave the nonce empty respectively.
68
68
//
69
- // If no invokedAt is provided, the current time is used. Use the
70
- // WithInvokedAt or WithInvokedAtIn Options to specify a different time
71
- // or the WithoutInvokedAt Option to clear the Token's invokedAt field.
69
+ // If no IssuedAt is provided, the current time is used. Use the
70
+ // IssuedAt or WithIssuedAtIn Options to specify a different time
71
+ // or the WithoutIssuedAt Option to clear the Token's invokedAt field.
72
72
//
73
73
// With the exception of the WithMeta option, all others will overwrite
74
74
// the previous contents of their target field.
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ func TestSealUnsealRoundtrip(t *testing.T) {
23
23
invocation .WithMeta ("env" , "development" ),
24
24
invocation .WithMeta ("tags" , meta ["tags" ]),
25
25
invocation .WithExpirationIn (time .Minute ),
26
- invocation .WithoutInvokedAt (),
26
+ invocation .WithoutIssuedAt (),
27
27
)
28
28
require .NoError (t , err )
29
29
Original file line number Diff line number Diff line change @@ -123,12 +123,12 @@ func WithExpirationIn(after time.Duration) Option {
123
123
return WithExpiration (time .Now ().Add (after ))
124
124
}
125
125
126
- // WithInvokedAt sets the Token's invokedAt field to the provided
126
+ // WithIssuedAt sets the Token's invokedAt field to the provided
127
127
// time.Time.
128
128
//
129
129
// If this Option is not provided, the invocation Token's iat field will
130
130
// be set to the value of time.Now(). If you want to create an invocation
131
- // Token without this field being set, use the WithoutInvokedAt Option.
131
+ // Token without this field being set, use the WithoutIssuedAt Option.
132
132
func WithIssuedAt (iat time.Time ) Option {
133
133
return func (t * Token ) error {
134
134
t .issuedAt = & iat
@@ -137,13 +137,13 @@ func WithIssuedAt(iat time.Time) Option {
137
137
}
138
138
}
139
139
140
- // WithInvokedAtIn sets the Token's invokedAt field to Now() plus the
140
+ // WithIssuedAtIn sets the Token's invokedAt field to Now() plus the
141
141
// given duration.
142
- func WithInvokedAtIn (after time.Duration ) Option {
143
- return WithInvokedAt (time .Now ().Add (after ))
142
+ func WithIssuedAtIn (after time.Duration ) Option {
143
+ return WithIssuedAt (time .Now ().Add (after ))
144
144
}
145
145
146
- // WithoutInvokedAt clears the Token's invokedAt field.
146
+ // WithoutIssuedAt clears the Token's invokedAt field.
147
147
func WithoutIssuedAt () Option {
148
148
return func (t * Token ) error {
149
149
t .issuedAt = nil
You can’t perform that action at this time.
0 commit comments