github.com/blend/go-sdk@v1.20220411.3/vault/request_option.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package vault 9 10 import ( 11 "strconv" 12 13 "github.com/blend/go-sdk/webutil" 14 ) 15 16 // CallOption a thing that we can do to modify a request. 17 type CallOption = webutil.RequestOption 18 19 // OptVersion adds a version to the request. 20 func OptVersion(version int) CallOption { 21 return webutil.OptQueryValue("version", strconv.Itoa(version)) 22 } 23 24 // OptList adds a list parameter to the request. 25 func OptList() CallOption { 26 return webutil.OptQueryValue("list", "true") 27 }