@@ -219,10 +219,10 @@ func main() {
219219
220220 res , err := s.Keys .CreateKey (ctx, components.V2KeysCreateKeyRequestBody {
221221 APIID: " api_1234abcd" ,
222- Prefix: unkey.String (" prod" ),
223- Name: unkey.String (" Payment Service Production Key" ),
224- ByteLength: unkey.Int64 (24 ),
225- ExternalID: unkey.String (" user_1234abcd" ),
222+ Prefix: unkey.Pointer (" prod" ),
223+ Name: unkey.Pointer (" Payment Service Production Key" ),
224+ ByteLength: unkey.Pointer [ int64 ] (24 ),
225+ ExternalID: unkey.Pointer (" user_1234abcd" ),
226226 Meta: map [string ]any{
227227 " plan" : " enterprise" ,
228228 " featureFlags" : map [string ]any{
@@ -244,21 +244,21 @@ func main() {
244244 " documents.write" ,
245245 " settings.view" ,
246246 },
247- Expires: unkey.Int64 (1704067200000 ),
247+ Expires: unkey.Pointer [ int64 ] (1704067200000 ),
248248 Credits: &components.KeyCreditsData {
249- Remaining: unkey.Int64 (1000 ),
249+ Remaining: unkey.Pointer [ int64 ] (1000 ),
250250 Refill: &components.KeyCreditsRefill {
251251 Interval: components.KeyCreditsRefillIntervalDaily ,
252252 Amount: 1000 ,
253- RefillDay: unkey.Int64 (15 ),
253+ RefillDay: unkey.Pointer [ int64 ] (15 ),
254254 },
255255 },
256256 Ratelimits: []components.RatelimitRequest {
257257 components.RatelimitRequest {
258258 Name: " requests" ,
259259 Limit: 100 ,
260260 Duration: 60000 ,
261- AutoApply: unkey.Bool (true ),
261+ AutoApply: unkey.Pointer (true ),
262262 },
263263 components.RatelimitRequest {
264264 Name: " heavy_operations" ,
@@ -892,7 +892,7 @@ func main() {
892892
893893 res , err := s.Keys .UpdateCredits (ctx, components.V2KeysUpdateCreditsRequestBody {
894894 KeyID: " key_2cGKbMxRyIzhCxo1Idjz8q" ,
895- Value: unkey.Int64 (1000 ),
895+ Value: unkey.Pointer [ int64 ] (1000 ),
896896 Operation: components.OperationSet ,
897897 })
898898 if err != nil {
@@ -969,8 +969,8 @@ func main() {
969969
970970 res , err := s.Keys .UpdateKey (ctx, components.V2KeysUpdateKeyRequestBody {
971971 KeyID: " key_2cGKbMxRyIzhCxo1Idjz8q" ,
972- Name: unkey.String (" Payment Service Production Key" ),
973- ExternalID: unkey.String (" user_912a841d" ),
972+ Name: unkey.Pointer (" Payment Service Production Key" ),
973+ ExternalID: unkey.Pointer (" user_912a841d" ),
974974 Meta: map [string ]any{
975975 " plan" : " enterprise" ,
976976 " limits" : map [string ]any{
@@ -993,13 +993,13 @@ func main() {
993993 },
994994 " lastBillingDate" : " 2023-10-15" ,
995995 },
996- Expires: unkey.Int64 (1704067200000 ),
996+ Expires: unkey.Pointer [ int64 ] (1704067200000 ),
997997 Credits: &components.UpdateKeyCreditsData {
998- Remaining: unkey.Int64 (1000 ),
998+ Remaining: unkey.Pointer [ int64 ] (1000 ),
999999 Refill: &components.UpdateKeyCreditsRefill {
10001000 Interval: components.UpdateKeyCreditsRefillIntervalDaily ,
10011001 Amount: 1000 ,
1002- RefillDay: unkey.Int64 (15 ),
1002+ RefillDay: unkey.Pointer [ int64 ] (15 ),
10031003 },
10041004 },
10051005 Ratelimits: []components.RatelimitRequest {
@@ -1009,7 +1009,7 @@ func main() {
10091009 Duration: 350222 ,
10101010 },
10111011 },
1012- Enabled: unkey.Bool (true ),
1012+ Enabled: unkey.Pointer (true ),
10131013 Roles: []string {
10141014 " api_admin" ,
10151015 " billing_reader" ,
@@ -1104,16 +1104,16 @@ func main() {
11041104 " clientVersion=2.3.0" ,
11051105 " feature=premium" ,
11061106 },
1107- Permissions: unkey.String (" documents.read AND users.view" ),
1107+ Permissions: unkey.Pointer (" documents.read AND users.view" ),
11081108 Credits: &components.KeysVerifyKeyCredits {
11091109 Cost: 5 ,
11101110 },
11111111 Ratelimits: []components.KeysVerifyKeyRatelimit {
11121112 components.KeysVerifyKeyRatelimit {
11131113 Name: " tokens" ,
1114- Cost: unkey.Int64 (2 ),
1115- Limit: unkey.Int64 (50 ),
1116- Duration: unkey.Int64 (600000 ),
1114+ Cost: unkey.Pointer [ int64 ] (2 ),
1115+ Limit: unkey.Pointer [ int64 ] (50 ),
1116+ Duration: unkey.Pointer [ int64 ] (600000 ),
11171117 },
11181118 },
11191119 })
0 commit comments