From 837a84838a0c18a49aa8e6c58be8c78f3c3fc1ec Mon Sep 17 00:00:00 2001 From: Daisuke Maki Date: Sat, 9 Sep 2023 07:01:18 +0900 Subject: [PATCH 1/2] Update option documentation --- jwk/options.yaml | 8 ++------ jwk/options_gen.go | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/jwk/options.yaml b/jwk/options.yaml index 3f7b6e2a1..fb4501056 100644 --- a/jwk/options.yaml +++ b/jwk/options.yaml @@ -1,10 +1,6 @@ package_name: jwk output: jwk/options_gen.go interfaces: - - name: CacheOption - comment: | - CacheOption is a type of Option that can be passed to the - `jwk.Cache` object. - name: AssignKeyIDOption - name: FetchOption methods: @@ -13,8 +9,8 @@ interfaces: - registerOption comment: | FetchOption is a type of Option that can be passed to `jwk.Fetch()` - FetchOption also implements the `CacheOption`, and thus can - safely be passed to `(*jwk.Cache).Configure()` + FetchOption also implements the `RegisterOption`, and thus can + safely be passed to `(*jwk.Cache).Register()` - name: ParseOption methods: - fetchOption diff --git a/jwk/options_gen.go b/jwk/options_gen.go index 644b24711..585719cd3 100644 --- a/jwk/options_gen.go +++ b/jwk/options_gen.go @@ -38,8 +38,8 @@ type cacheOption struct { func (*cacheOption) cacheOption() {} // FetchOption is a type of Option that can be passed to `jwk.Fetch()` -// FetchOption also implements the `CacheOption`, and thus can -// safely be passed to `(*jwk.Cache).Configure()` +// FetchOption also implements the `RegisterOption`, and thus can +// safely be passed to `(*jwk.Cache).Register()` type FetchOption interface { Option fetchOption() From f9102b50693830ce8e7dcb5f62e20790c840cbdf Mon Sep 17 00:00:00 2001 From: Daisuke Maki Date: Sat, 9 Sep 2023 07:09:40 +0900 Subject: [PATCH 2/2] reinstance CacheOption --- jwk/options.yaml | 4 ++++ jwk/options_gen.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jwk/options.yaml b/jwk/options.yaml index fb4501056..6dfbded42 100644 --- a/jwk/options.yaml +++ b/jwk/options.yaml @@ -1,6 +1,10 @@ package_name: jwk output: jwk/options_gen.go interfaces: + - name: CacheOption + comment: | + CacheOption is a type of Option that can be passed to the + the `jwk.NewCache()` function. - name: AssignKeyIDOption - name: FetchOption methods: diff --git a/jwk/options_gen.go b/jwk/options_gen.go index 585719cd3..2aac86fc6 100644 --- a/jwk/options_gen.go +++ b/jwk/options_gen.go @@ -25,7 +25,7 @@ type assignKeyIDOption struct { func (*assignKeyIDOption) assignKeyIDOption() {} // CacheOption is a type of Option that can be passed to the -// `jwk.Cache` object. +// the `jwk.NewCache()` function. type CacheOption interface { Option cacheOption()