ResourceTemplates provides an iterator for all resource templates available on the server, automatically fetching pages and managing cursors. The params argument can set the initial cursor. Iteration stops at the first encountered error, which will be yielded.
(ctx context.Context, params *ListResourceTemplatesParams)
| 1138 | // The params argument can set the initial cursor. |
| 1139 | // Iteration stops at the first encountered error, which will be yielded. |
| 1140 | func (cs *ClientSession) ResourceTemplates(ctx context.Context, params *ListResourceTemplatesParams) iter.Seq2[*ResourceTemplate, error] { |
| 1141 | if params == nil { |
| 1142 | params = &ListResourceTemplatesParams{} |
| 1143 | } |
| 1144 | return paginate(ctx, params, cs.ListResourceTemplates, func(res *ListResourceTemplatesResult) []*ResourceTemplate { |
| 1145 | return res.ResourceTemplates |
| 1146 | }) |
| 1147 | } |
| 1148 | |
| 1149 | // Prompts provides an iterator for all prompts available on the server, |
| 1150 | // automatically fetching pages and managing cursors. |