From 81308b46835f20818b3befe6b87dde3c9f532822 Mon Sep 17 00:00:00 2001 From: niharikabhavaraju Date: Thu, 21 Nov 2024 20:08:11 +0000 Subject: [PATCH 01/11] Implemented Exists, Expire and TTL commands Signed-off-by: Niharika Bhavaraju --- go/api/base_client.go | 138 ++++++ go/api/command_options.go | 35 ++ go/api/generic_commands.go | 296 ++++++++++++ go/integTest/shared_commands_test.go | 652 +++++++++++++++++++++++++++ 4 files changed, 1121 insertions(+) diff --git a/go/api/base_client.go b/go/api/base_client.go index 26b0a5262b..f965863031 100644 --- a/go/api/base_client.go +++ b/go/api/base_client.go @@ -948,3 +948,141 @@ func (client *baseClient) Del(keys []string) (Result[int64], error) { return handleLongResponse(result) } + +func (client *baseClient) Exists(keys []string) (Result[int64], error) { + result, err := client.executeCommand(C.Exists, keys) + if err != nil { + return CreateNilInt64Result(), err + } + + return handleLongResponse(result) +} + +func (client *baseClient) Expire(key string, seconds int64) (Result[bool], error) { + secondsStr := strconv.FormatInt(seconds, 10) + result, err := client.executeCommand(C.Expire, []string{key, secondsStr}) + if err != nil { + return CreateNilBoolResult(), err + } + + return handleBooleanResponse(result) +} + +func (client *baseClient) ExpireWithOptions(key string, seconds int64, options *ExpireOptions) (Result[bool], error) { + secondsStr := strconv.FormatInt(seconds, 10) + optionArgs, err := options.toArgs() + if err != nil { + return CreateNilBoolResult(), err + } + result, err := client.executeCommand(C.Expire, append([]string{key, secondsStr}, optionArgs...)) + if err != nil { + return CreateNilBoolResult(), err + } + return handleBooleanResponse(result) +} + +func (client *baseClient) ExpireAt(key string, unixTimestampInSeconds int64) (Result[bool], error) { + timestampStr := strconv.FormatInt(unixTimestampInSeconds, 10) + result, err := client.executeCommand(C.ExpireAt, []string{key, timestampStr}) + if err != nil { + return CreateNilBoolResult(), err + } + + return handleBooleanResponse(result) +} + +func (client *baseClient) ExpireAtWithOptions(key string, unixTimestampInSeconds int64, options *ExpireOptions) (Result[bool], error) { + timestampStr := strconv.FormatInt(unixTimestampInSeconds, 10) + optionArgs, err := options.toArgs() + if err != nil { + return CreateNilBoolResult(), err + } + result, err := client.executeCommand(C.ExpireAt, append([]string{key, timestampStr}, optionArgs...)) + if err != nil { + return CreateNilBoolResult(), err + } + return handleBooleanResponse(result) +} + +func (client *baseClient) PExpire(key string, milliseconds int64) (Result[bool], error) { + + milliSecondsStr := strconv.FormatInt(milliseconds, 10) + result, err := client.executeCommand(C.PExpire, []string{key, milliSecondsStr}) + if err != nil { + return CreateNilBoolResult(), err + } + return handleBooleanResponse(result) +} + +func (client *baseClient) PExpireWithOptions(key string, milliseconds int64, options *ExpireOptions) (Result[bool], error) { + + milliSecondsStr := strconv.FormatInt(milliseconds, 10) + optionArgs, err := options.toArgs() + if err != nil { + return CreateNilBoolResult(), err + } + result, err := client.executeCommand(C.PExpire, append([]string{key, milliSecondsStr}, optionArgs...)) + if err != nil { + return CreateNilBoolResult(), err + } + return handleBooleanResponse(result) +} + +func (client *baseClient) PExpireAt(key string, unixTimestampInMilliSeconds int64) (Result[bool], error) { + + timestampStr := strconv.FormatInt(unixTimestampInMilliSeconds, 10) + result, err := client.executeCommand(C.PExpireAt, []string{key, timestampStr}) + if err != nil { + return CreateNilBoolResult(), err + } + return handleBooleanResponse(result) +} + +func (client *baseClient) PExpireAtWithOptions(key string, unixTimestampInMilliSeconds int64, options *ExpireOptions) (Result[bool], error) { + timestampStr := strconv.FormatInt(unixTimestampInMilliSeconds, 10) + optionArgs, err := options.toArgs() + if err != nil { + return CreateNilBoolResult(), err + } + result, err := client.executeCommand(C.PExpireAt, append([]string{key, timestampStr}, optionArgs...)) + if err != nil { + return CreateNilBoolResult(), err + } + return handleBooleanResponse(result) +} + +func (client *baseClient) ExpireTime(key string) (Result[int64], error) { + result, err := client.executeCommand(C.ExpireTime, []string{key}) + if err != nil { + return CreateNilInt64Result(), err + } + + return handleLongResponse(result) +} + +func (client *baseClient) PExpireTime(key string) (Result[int64], error) { + result, err := client.executeCommand(C.PExpireTime, []string{key}) + if err != nil { + return CreateNilInt64Result(), err + } + + return handleLongResponse(result) +} + +func (client *baseClient) TTL(key string) (Result[int64], error) { + result, err := client.executeCommand(C.TTL, []string{key}) + if err != nil { + return CreateNilInt64Result(), err + } + + return handleLongResponse(result) +} + +func (client *baseClient) PTTL(key string) (Result[int64], error) { + result, err := client.executeCommand(C.PTTL, []string{key}) + if err != nil { + return CreateNilInt64Result(), err + } + + return handleLongResponse(result) +} diff --git a/go/api/command_options.go b/go/api/command_options.go index 34326e14b8..f09a84e5ef 100644 --- a/go/api/command_options.go +++ b/go/api/command_options.go @@ -70,6 +70,28 @@ func (opts *SetOptions) toArgs() ([]string, error) { return args, err } +type ExpireOptions struct { + ExpireConditionalSet ExpireConditionalSet +} + +func NewExpireOptionsBuilder() *ExpireOptions { + return &ExpireOptions{} +} + +func (expireOptions *ExpireOptions) SetExpireConditionalSet(expireConditionalSet ExpireConditionalSet) *ExpireOptions { + expireOptions.ExpireConditionalSet = expireConditionalSet + return expireOptions +} + +func (opts *ExpireOptions) toArgs() ([]string, error) { + args := []string{} + var err error + if opts.ExpireConditionalSet != "" { + args = append(args, string(opts.ExpireConditionalSet)) + } + return args, err +} + // GetExOptions represents optional arguments for the [api.StringCommands.GetExWithOptions] command. // // See [valkey.io] @@ -120,6 +142,19 @@ const ( OnlyIfDoesNotExist ConditionalSet = "NX" ) +type ExpireConditionalSet string + +const ( + // HasExistingExpiry only sets the key if it already exists. Equivalent to "XX" in the valkey API. + HasExistingExpiry ExpireConditionalSet = "XX" + // HasNoExpiry only sets the key if it does not already exist. Equivalent to "NX" in the valkey API. + HasNoExpiry ExpireConditionalSet = "NX" + // NewExpiryGreaterThanCurrent only sets the key if its greater than current. Equivalent to "GT" in the valkey API. + NewExpiryGreaterThanCurrent ExpireConditionalSet = "GT" + // NewExpiryLessThanCurrent only sets the key if its lesser than current. Equivalent to "LT" in the valkey API. + NewExpiryLessThanCurrent ExpireConditionalSet = "LT" +) + // Expiry is used to configure the lifetime of a value. type Expiry struct { Type ExpiryType diff --git a/go/api/generic_commands.go b/go/api/generic_commands.go index 82620610a2..2e01543ed7 100644 --- a/go/api/generic_commands.go +++ b/go/api/generic_commands.go @@ -30,4 +30,300 @@ type GenericBaseCommands interface { // // [valkey.io]: https://valkey.io/commands/del/ Del(keys []string) (Result[int64], error) + + // Exists returns the number of keys that exist in the database + // + // Note: + //When in cluster mode, the command may route to multiple nodes when keys map to different hash slots. + // + // Parameters: + // keys - One or more keys to delete. + // + // Return value: + // Returns the number of existing keys. + // + // Example: + // result, err := client.Exists([]string{"key1", "key2", "key3"}) + // if err != nil { + // // handle error + // } + // fmt.Println(result) // Output: 2 + // + // [valkey.io]: https://valkey.io/commands/exists/ + Exists(keys []string) (Result[int64], error) + + // Expire sets a timeout on key. After the timeout has expired, the key will automatically be deleted + // + // If key already has an existing expire set, the time to live is updated to the new value. + // If seconds is a non-positive number, the key will be deleted rather than expired. + // The timeout will only be cleared by commands that delete or overwrite the contents of key + // + // Parameters: + // key - The key to expire. + // seconds - Time in seconds for the key to expire + // + // Return value: + // A Result[bool] containing true is expiry is set. + // + // Example: + // result, err := client.Expire("key", 1) + // if err != nil { + // // handle error + // } + // fmt.Println(result) // Output: true + // + // [valkey.io]: https://valkey.io/commands/expire/ + Expire(key string, seconds int64) (Result[bool], error) + + // Expire sets a timeout on key. After the timeout has expired, the key will automatically be deleted + // + // If key already has an existing expire set, the time to live is updated to the new value. + // If seconds is a non-positive number, the key will be deleted rather than expired. + // The timeout will only be cleared by commands that delete or overwrite the contents of key + // + // Parameters: + // key - The key to expire. + // seconds - Time in seconds for the key to expire + // option - The option to set expiry - NX, XX, GT, LT + // + // Return value: + // A Result[bool] containing true is expiry is set. + // + // Example: + // result, err := client.Expire("key", 1, api.OnlyIfDoesNotExist) + // if err != nil { + // // handle error + // } + // fmt.Println(result) // Output: true + // + // [valkey.io]: https://valkey.io/commands/expire/ + ExpireWithOptions(key string, seconds int64, options *ExpireOptions) (Result[bool], error) + + // ExpireAt sets a timeout on key. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of specifying the number of seconds. + // A timestamp in the past will delete the key immediately. After the timeout has expired, the key will automatically be deleted. + // If key already has an existing expire set, the time to live is updated to the new value. + // The timeout will only be cleared by commands that delete or overwrite the contents of key + // If key already has an existing expire set, the time to live is updated to the new value. + // If seconds is a non-positive number, the key will be deleted rather than expired. + // The timeout will only be cleared by commands that delete or overwrite the contents of key + // + // Parameters: + // key - The key to expire. + // unixTimestampInSeconds - Absolute Unix timestamp + // + // Return value: + // A Result[bool] containing true is expiry is set. + // + // Example: + // result, err := client.ExpireAt("key", time.Now().Unix()) + // if err != nil { + // // handle error + // } + // fmt.Println(result) // Output: true + // + // [valkey.io]: https://valkey.io/commands/expireat/ + ExpireAt(key string, unixTimestampInSeconds int64) (Result[bool], error) + + // ExpireAt sets a timeout on key. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of specifying the number of seconds. + // A timestamp in the past will delete the key immediately. After the timeout has expired, the key will automatically be deleted. + // If key already has an existing expire set, the time to live is updated to the new value. + // The timeout will only be cleared by commands that delete or overwrite the contents of key + // If key already has an existing expire set, the time to live is updated to the new value. + // If seconds is a non-positive number, the key will be deleted rather than expired. + // The timeout will only be cleared by commands that delete or overwrite the contents of key + // + // Parameters: + // key - The key to expire. + // unixTimestampInSeconds - Absolute Unix timestamp + // option - The option to set expiry - NX, XX, GT, LT + // + // Return value: + // A Result[bool] containing true is expiry is set. + // + // Example: + // result, err := client.ExpireAt("key", time.Now().Unix(), api.OnlyIfDoesNotExist) + // if err != nil { + // // handle error + // } + // fmt.Println(result) // Output: true + // + // [valkey.io]: https://valkey.io/commands/expireat/ + ExpireAtWithOptions(key string, unixTimestampInSeconds int64, options *ExpireOptions) (Result[bool], error) + + // Sets a timeout on key in milliseconds. After the timeout has expired, the key will automatically be deleted. + // If key already has an existing expire set, the time to live is updated to the new value. + // If milliseconds is a non-positive number, the key will be deleted rather than expired + // The timeout will only be cleared by commands that delete or overwrite the contents of key. + + // Parameters: + // key - The key to set timeout on it. + // milliseconds - The timeout in milliseconds. + // + // Return value: + // A Result[bool] containing true is expiry is set. + // + // Example: + // result, err := client.PExpire("key", int64(5 * 1000)) + // if err != nil { + // // handle error + // } + // fmt.Println(result) // Output: true + // + // [valkey.io]: https://valkey.io/commands/pexpire/ + PExpire(key string, milliseconds int64) (Result[bool], error) + + // Sets a timeout on key in milliseconds. After the timeout has expired, the key will automatically be deleted. + // If key already has an existing expire set, the time to live is updated to the new value. + // If milliseconds is a non-positive number, the key will be deleted rather than expired + // The timeout will only be cleared by commands that delete or overwrite the contents of key. + // + // Parameters: + // key - The key to set timeout on it. + // milliseconds - The timeout in milliseconds. + // option - The option to set expiry - NX, XX, GT, LT + // + // Return value: + // A Result[bool] containing true is expiry is set. + // + // Example: + // result, err := client.PExpire("key", int64(5 * 1000), api.OnlyIfDoesNotExist) + // if err != nil { + // // handle error + // } + // fmt.Println(result) // Output: true + // + // [valkey.io]: https://valkey.io/commands/pexpire/ + PExpireWithOptions(key string, milliseconds int64, options *ExpireOptions) (Result[bool], error) + + // Sets a timeout on key. It takes an absolute Unix timestamp (milliseconds since + // January 1, 1970) instead of specifying the number of milliseconds. + // A timestamp in the past will delete the key immediately. After the timeout has + // expired, the key will automatically be deleted + // If key already has an existing expire set, the time to live is + // updated to the new value/ + // The timeout will only be cleared by commands that delete or overwrite the contents of key + // + // Parameters: + // key - The key to set timeout on it. + // unixMilliseconds - The timeout in an absolute Unix timestamp. + // + // Return value: + // A Result[bool] containing true is expiry is set. + // + // Example: + // result, err := client.PExpire("key", time.Now().Unix()*1000) + // if err != nil { + // // handle error + // } + // fmt.Println(result) // Output: true + // [valkey.io]: https://valkey.io/commands/pexpireat/ + PExpireAt(key string, unixTimestampInMilliSeconds int64) (Result[bool], error) + + // Sets a timeout on key. It takes an absolute Unix timestamp (milliseconds since + // January 1, 1970) instead of specifying the number of milliseconds. + // A timestamp in the past will delete the key immediately. After the timeout has + // expired, the key will automatically be deleted + // If key already has an existing expire set, the time to live is + // updated to the new value/ + // The timeout will only be cleared by commands that delete or overwrite the contents of key + // + // Parameters: + // key - The key to set timeout on it. + // unixMilliseconds - The timeout in an absolute Unix timestamp. + // option - The option to set expiry - NX, XX, GT, LT + // + // Return value: + // A Result[bool] containing true is expiry is set. + // + // Example: + // result, err := client.PExpire("key", time.Now().Unix()*1000, api.OnlyIfDoesNotExist) + // if err != nil { + // // handle error + // } + // fmt.Println(result) // Output: true + // + // [valkey.io]: https://valkey.io/commands/pexpireat/ + PExpireAtWithOptions(key string, unixTimestampInMilliSeconds int64, options *ExpireOptions) (Result[bool], error) + + // Expire Time returns the absolute Unix timestamp (since January 1, 1970) at which the given key + // will expire, in seconds. + // + // Parameters: + // key - The key to determine the expiration value of. + // + // Return value: + // The expiration Unix timestamp in seconds. + // -2 if key does not exist or -1 is key exists but has no associated expiration. + // + // Example: + // + // result, err := client.ExpireTime("key") + // if err != nil { + // // handle error + // } + // fmt.Println(result) // Output: 1732118030 + // + // [valkey.io]: https://valkey.io/commands/expiretime/ + ExpireTime(key string) (Result[int64], error) + + // PExpire Time returns the absolute Unix timestamp (since January 1, 1970) at which the given key + // will expire, in milliseconds. + // + // Parameters: + // key - The key to determine the expiration value of. + // + // Return value: + // The expiration Unix timestamp in milliseconds. + // -2 if key does not exist or -1 is key exists but has no associated expiration. + // + // Example: + // + // result, err := client.PExpireTime("key") + // if err != nil { + // // handle error + // } + // fmt.Println(result) // Output: 33177117420000 + // + // [valkey.io]: https://valkey.io/commands/pexpiretime/ + PExpireTime(key string) (Result[int64], error) + + // TTL returns the remaining time to live of key that has a timeout, in seconds. + // + // Parameters: + // key - The key to return its timeout. + // + // Return value: + // Returns TTL in seconds, + // -2 if key does not exist, or -1 if key exists but has no associated expiration. + // + // Example: + // + // result, err := client.TTL("key") + // if err != nil { + // // handle error + // } + // fmt.Println(result) // Output: 3 + // + // [valkey.io]: https://valkey.io/commands/ttl/ + TTL(key string) (Result[int64], error) + + // PTTL returns the remaining time to live of key that has a timeout, in milliseconds. + // + // Parameters: + // key - The key to return its timeout. + // + // Return value: + // Returns TTL in milliseconds, + // -2 if key does not exist, or -1 if key exists but has no associated expiration. + // + // Example: + // + // result, err := client.PTTL("key") + // if err != nil { + // // handle error + // } + // fmt.Println(result) // Output: 1000 + // + // [valkey.io]: https://valkey.io/commands/pttl/ + PTTL(key string) (Result[int64], error) } diff --git a/go/integTest/shared_commands_test.go b/go/integTest/shared_commands_test.go index 11f14d5c93..dd822807e6 100644 --- a/go/integTest/shared_commands_test.go +++ b/go/integTest/shared_commands_test.go @@ -2503,3 +2503,655 @@ func (suite *GlideTestSuite) TestDel_MultipleKeys() { assert.True(suite.T(), result3.IsNil()) }) } + +func (suite *GlideTestSuite) TestExists() { + suite.runWithDefaultClients(func(client api.BaseClient) { + // Test 1: Check if an existing key returns 1 + suite.verifyOK(client.Set(keyName, initialValue)) + result, err := client.Exists([]string{keyName}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(1), result.Value(), "The key should exist") + + // Test 2: Check if a non-existent key returns 0 + result, err = client.Exists([]string{"nonExistentKey"}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(0), result.Value(), "The non-existent key should not exist") + + // Test 3: Multiple keys, some exist, some do not + suite.verifyOK(client.Set("existingKey", initialValue)) + suite.verifyOK(client.Set("testKey", initialValue)) + result, err = client.Exists([]string{"testKey", "existingKey", "anotherNonExistentKey"}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(2), result.Value(), "Two keys should exist") + }) +} + +func (suite *GlideTestSuite) TestExpire() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "TestExpire" + + suite.verifyOK(client.Set(key, initialValue)) + + result, err := client.Expire(key, 1) + assert.Nil(suite.T(), err, "Expected no error from Expire command") + assert.True(suite.T(), result.Value(), "Expire command should return true when expiry is set") + + time.Sleep(1500 * time.Millisecond) + + resultGet, err := client.Get(key) + assert.Nil(suite.T(), err, "Expected no error from Get command after expiry") + assert.Equal(suite.T(), "", resultGet.Value(), "Key should be expired and return empty value") + }) +} + +func (suite *GlideTestSuite) TestExpire_KeyDoesNotExist() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "TestExpire_KeyDoesNotExist" + // Trying to set an expiry on a non-existent key + result, err := client.Expire(key, 1) + assert.Nil(suite.T(), err) + assert.False(suite.T(), result.Value()) + }) +} + +func (suite *GlideTestSuite) TestExpireWithOptions_HasNoExpiry() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "TestExpireWithOptions_HasNoExpiry" + + suite.verifyOK(client.Set(key, initialValue)) + + opts := api.NewExpireOptionsBuilder().SetExpireConditionalSet(api.HasNoExpiry) + result, err := client.ExpireWithOptions(key, 2, opts) + assert.Nil(suite.T(), err) + assert.True(suite.T(), result.Value()) + + time.Sleep(2500 * time.Millisecond) + + resultGet, err := client.Get(key) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), "", resultGet.Value()) + + opts = api.NewExpireOptionsBuilder().SetExpireConditionalSet(api.HasNoExpiry) + result, err = client.ExpireWithOptions(key, 1, opts) + assert.Nil(suite.T(), err) + assert.False(suite.T(), result.Value()) + }) +} + +func (suite *GlideTestSuite) TestExpireWithOptions_HasExistingExpiry() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "test_key" + + suite.verifyOK(client.Set(key, initialValue)) + + eOptions := &api.ExpireOptions{ + ExpireConditionalSet: api.HasNoExpiry, + } + resexp, err := client.ExpireWithOptions(key, 20, eOptions) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resexp.Value()) + + expireOptions := &api.ExpireOptions{ + ExpireConditionalSet: api.HasExistingExpiry, + } + resultExpire, err := client.ExpireWithOptions(key, 1, expireOptions) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpire.Value()) + + time.Sleep(2 * time.Second) + + resultExpireTest, err := client.Exists([]string{key}) + assert.Nil(suite.T(), err) + + assert.Equal(suite.T(), int64(0), resultExpireTest.Value()) + }) +} + +func (suite *GlideTestSuite) TestExpireWithOptions_NewExpiryGreaterThanCurrent() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "key_new_expiry_gt" + suite.verifyOK(client.Set(key, initialValue)) + + opts := &api.ExpireOptions{ + ExpireConditionalSet: api.HasNoExpiry, + } + resultExpire, err := client.ExpireWithOptions(key, 2, opts) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpire.Value()) + + expireOptions := &api.ExpireOptions{ + ExpireConditionalSet: api.NewExpiryGreaterThanCurrent, + } + resultExpire, err = client.ExpireWithOptions(key, 5, expireOptions) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpire.Value()) + time.Sleep(6 * time.Second) + resultExpireTest, err := client.Exists([]string{key}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(0), resultExpireTest.Value()) + }) +} + +func (suite *GlideTestSuite) TestExpireWithOptions_NewExpiryLessThanCurrent() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "key_new_expiry_lt" + + suite.verifyOK(client.Set(key, initialValue)) + + initialExpireOptions := &api.ExpireOptions{ + ExpireConditionalSet: api.HasNoExpiry, + } + resultExpire, err := client.ExpireWithOptions(key, 10, initialExpireOptions) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpire.Value()) + + expireOptions := &api.ExpireOptions{ + ExpireConditionalSet: api.NewExpiryLessThanCurrent, + } + resultExpire, err = client.ExpireWithOptions(key, 5, expireOptions) + assert.Nil(suite.T(), err) + + assert.True(suite.T(), resultExpire.Value()) + + expireOptions = &api.ExpireOptions{ + ExpireConditionalSet: api.NewExpiryGreaterThanCurrent, + } + resultExpire, err = client.ExpireWithOptions(key, 15, expireOptions) + assert.Nil(suite.T(), err) + + assert.True(suite.T(), resultExpire.Value()) + + time.Sleep(16 * time.Second) + resultExpireTest, err := client.Exists([]string{key}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(0), resultExpireTest.Value()) + }) +} + +func (suite *GlideTestSuite) TestExpireAtWithOptions_HasNoExpiry() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "expire_at_with_no_expiry_test_key" + resultSet, err := client.Set(key, "value") + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultSet.Value() != "") + + options := &api.ExpireOptions{ + ExpireConditionalSet: api.HasNoExpiry, + } + + futureTimestamp := time.Now().Add(10 * time.Second).Unix() + + resultExpire, err := client.ExpireAtWithOptions(key, futureTimestamp, options) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpire.Value()) + resultExpireAt, err := client.ExpireAt(key, futureTimestamp) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpireAt.Value()) + resultExpireWithOptions, err := client.ExpireAtWithOptions(key, futureTimestamp+10, options) + assert.Nil(suite.T(), err) + assert.False(suite.T(), resultExpireWithOptions.Value()) + }) +} + +func (suite *GlideTestSuite) TestExpireAtWithOptions_HasExistingExpiry() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "expire_at_with_existing_expiry_test_key" + resultSet, err := client.Set(key, "value") + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultSet.Value() != "") + + futureTimestamp := time.Now().Add(10 * time.Second).Unix() + resultExpireAt, err := client.ExpireAt(key, futureTimestamp) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpireAt.Value()) + + options := &api.ExpireOptions{ + ExpireConditionalSet: api.HasExistingExpiry, + } + + resultExpireWithOptions, err := client.ExpireAtWithOptions(key, futureTimestamp+10, options) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpireWithOptions.Value()) + }) +} +func (suite *GlideTestSuite) TestExpireAtWithOptions_NewExpiryGreaterThanCurrent() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "expire_at_with_new_expiry_greater_test_key" + + resultSet, err := client.Set(key, "value") + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultSet.Value() != "") + + futureTimestamp := time.Now().Add(10 * time.Second).Unix() + resultExpireAt, err := client.ExpireAt(key, futureTimestamp) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpireAt.Value()) + + options := &api.ExpireOptions{ + ExpireConditionalSet: api.NewExpiryGreaterThanCurrent, + } + newFutureTimestamp := time.Now().Add(20 * time.Second).Unix() + resultExpireWithOptions, err := client.ExpireAtWithOptions(key, newFutureTimestamp, options) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpireWithOptions.Value()) + }) +} + +func (suite *GlideTestSuite) TestExpireAtWithOptions_NewExpiryLessThanCurrent() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "expire_at_with_new_expiry_lesser_test_key" + + resultSet, err := client.Set(key, "value") + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultSet.Value() != "") + + futureTimestamp := time.Now().Add(10 * time.Second).Unix() + resultExpireAt, err := client.ExpireAt(key, futureTimestamp) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpireAt.Value()) + + options := &api.ExpireOptions{ + ExpireConditionalSet: api.NewExpiryLessThanCurrent, + } + + newFutureTimestamp := time.Now().Add(5 * time.Second).Unix() + resultExpireWithOptions, err := client.ExpireAtWithOptions(key, newFutureTimestamp, options) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpireWithOptions.Value()) + + time.Sleep(5 * time.Second) + resultExpireAtTest, err := client.Exists([]string{key}) + assert.Nil(suite.T(), err) + + assert.Equal(suite.T(), int64(0), resultExpireAtTest.Value()) + }) +} + +func (suite *GlideTestSuite) TestPExpire() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "test_key_with_pexpire" + + resultSet, err := client.Set(key, "value") + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultSet.Value() != "") + + resultExpire, err := client.PExpire(key, 500) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpire.Value()) + + time.Sleep(600 * time.Millisecond) + resultExpireCheck, err := client.Exists([]string{key}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(0), resultExpireCheck.Value()) + }) +} + +func (suite *GlideTestSuite) TestPExpireWithOptions_HasExistingExpiry() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "test_key_with_has_existing_expiry" + + resultSet, err := client.Set(key, "value") + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultSet.Value() != "") + + initialExpire := 500 + resultExpire, err := client.PExpire(key, int64(initialExpire)) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpire.Value()) + + options := &api.ExpireOptions{ + ExpireConditionalSet: api.HasExistingExpiry, + } + newExpire := 1000 + + resultExpireWithOptions, err := client.PExpireWithOptions(key, int64(newExpire), options) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpireWithOptions.Value()) + + time.Sleep(1100 * time.Millisecond) + resultExist, err := client.Exists([]string{key}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(0), resultExist.Value()) + }) +} + +func (suite *GlideTestSuite) TestPExpireWithOptions_HasNoExpiry() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "test_key_with_no_expiry" + + resultSet, err := client.Set(key, "value") + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultSet.Value() != "") + + options := &api.ExpireOptions{ + ExpireConditionalSet: api.HasNoExpiry, + } + newExpire := 500 + + resultExpireWithOptions, err := client.PExpireWithOptions(key, int64(newExpire), options) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpireWithOptions.Value()) + + time.Sleep(600 * time.Millisecond) + resultExist, err := client.Exists([]string{key}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(0), resultExist.Value()) + }) +} + +func (suite *GlideTestSuite) TestPExpireWithOptions_NewExpiryGreaterThanCurrent() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "test_key_with_new_expiry_greater_than_current" + + resultSet, err := client.Set(key, "value") + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultSet.Value() != "") + + initialExpire := 500 + resultExpire, err := client.PExpire(key, int64(initialExpire)) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpire.Value()) + + options := &api.ExpireOptions{ + ExpireConditionalSet: api.NewExpiryGreaterThanCurrent, + } + newExpire := 1000 + + resultExpireWithOptions, err := client.PExpireWithOptions(key, int64(newExpire), options) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpireWithOptions.Value()) + + time.Sleep(1100 * time.Millisecond) + resultExist, err := client.Exists([]string{key}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(0), resultExist.Value()) + }) +} + +func (suite *GlideTestSuite) TestPExpireWithOptions_NewExpiryLessThanCurrent() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "test_key_with_new_expiry_less_than_current" + + resultSet, err := client.Set(key, "value") + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultSet.Value() != "") + + initialExpire := 500 + resultExpire, err := client.PExpire(key, int64(initialExpire)) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpire.Value()) + + options := &api.ExpireOptions{ + ExpireConditionalSet: api.NewExpiryLessThanCurrent, + } + newExpire := 200 + + resultExpireWithOptions, err := client.PExpireWithOptions(key, int64(newExpire), options) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpireWithOptions.Value()) + + time.Sleep(600 * time.Millisecond) + resultExist, err := client.Exists([]string{key}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(0), resultExist.Value()) + }) +} + +func (suite *GlideTestSuite) TestPExpireAt() { + suite.runWithDefaultClients(func(client api.BaseClient) { + resultSet, err := client.Set("key", "value") + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultSet.Value() != "") + + expireAfterMilliseconds := time.Now().Unix() * 1000 + resultPExpireAt, err := client.PExpireAt("key", expireAfterMilliseconds) + assert.Nil(suite.T(), err) + + assert.True(suite.T(), resultPExpireAt.Value()) + + time.Sleep(6 * time.Second) + + resultpExists, err := client.Exists([]string{"key"}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(0), resultpExists.Value()) + }) +} + +func (suite *GlideTestSuite) TestPExpireAtWithOptions_HasNoExpiry() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "test_key_no_expiry" + + suite.verifyOK(client.Set(key, "value")) + + timestamp := time.Now().Unix() * 1000 + options := &api.ExpireOptions{ + ExpireConditionalSet: api.HasNoExpiry, + } + result, err := client.PExpireAtWithOptions(key, timestamp, options) + + assert.Nil(suite.T(), err) + assert.True(suite.T(), result.Value()) + + time.Sleep(2 * time.Second) + resultExist, err := client.Exists([]string{key}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(0), resultExist.Value()) + }) +} + +func (suite *GlideTestSuite) TestPExpireAtWithOptions_HasExistingExpiry() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "test_key_with_existing_expiry" + + suite.verifyOK(client.Set(key, "value")) + initialExpire := 500 + resultExpire, err := client.PExpire(key, int64(initialExpire)) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpire.Value()) + options := &api.ExpireOptions{ + ExpireConditionalSet: api.HasExistingExpiry, + } + newExpire := time.Now().Unix()*1000 + 1000 + + resultExpireWithOptions, err := client.PExpireAtWithOptions(key, newExpire, options) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpireWithOptions.Value()) + + time.Sleep(1100 * time.Millisecond) + resultExist, err := client.Exists([]string{key}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(0), resultExist.Value()) + }) +} + +func (suite *GlideTestSuite) TestPExpireAtWithOptions_NewExpiryGreaterThanCurrent() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "test_key_with_new_expiry_greater_than_current" + + suite.verifyOK(client.Set(key, "value")) + + initialExpire := 500 + resultExpire, err := client.PExpire(key, int64(initialExpire)) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpire.Value()) + + newExpire := time.Now().Unix()*1000 + 1000 + options := &api.ExpireOptions{ + ExpireConditionalSet: api.NewExpiryGreaterThanCurrent, + } + + resultExpireWithOptions, err := client.PExpireAtWithOptions(key, newExpire, options) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpireWithOptions.Value()) + + time.Sleep(1100 * time.Millisecond) + resultExist, err := client.Exists([]string{key}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(0), resultExist.Value()) + }) +} + +func (suite *GlideTestSuite) TestPExpireAtWithOptions_NewExpiryLessThanCurrent() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "test_key_with_new_expiry_less_than_current" + + suite.verifyOK(client.Set(key, "value")) + + initialExpire := 1000 + resultExpire, err := client.PExpire(key, int64(initialExpire)) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpire.Value()) + + newExpire := time.Now().Unix()*1000 + 500 + options := &api.ExpireOptions{ + ExpireConditionalSet: api.NewExpiryLessThanCurrent, + } + + resultExpireWithOptions, err := client.PExpireAtWithOptions(key, newExpire, options) + assert.Nil(suite.T(), err) + + assert.True(suite.T(), resultExpireWithOptions.Value()) + + time.Sleep(1100 * time.Millisecond) + resultExist, err := client.Exists([]string{key}) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(0), resultExist.Value()) + }) +} + +func (suite *GlideTestSuite) TestExpireTime() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "TestExpireTimeKey" + value := "TestValue" + + suite.verifyOK(client.Set(key, value)) + + result, err := client.Get(key) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), value, result.Value()) + + expireTime := time.Now().Unix() + 3 + resultExpAt, err := client.ExpireAt(key, expireTime) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpAt.Value()) + + resexptime, err := client.ExpireTime(key) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), expireTime, resexptime.Value()) + + time.Sleep(4 * time.Second) + + resultAfterExpiry, err := client.Get(key) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), "", resultAfterExpiry.Value()) + }) +} + +func (suite *GlideTestSuite) TestExpireTime_KeyDoesNotExist() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "NonExistentKey" + + // Call ExpireTime on a key that doesn't exist + expiryResult, err := client.ExpireTime(key) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(-2), expiryResult.Value()) + }) +} + +func (suite *GlideTestSuite) TestPExpireTime() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "TestPExpireTimeKey" + value := "TestValue" + + suite.verifyOK(client.Set(key, value)) + + result, err := client.Get(key) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), value, result.Value()) + + pexpireTime := time.Now().UnixMilli() + 3000 + resultExpAt, err := client.PExpireAt(key, pexpireTime) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resultExpAt.Value()) + + respexptime, err := client.PExpireTime(key) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), pexpireTime, respexptime.Value()) + + time.Sleep(4 * time.Second) + + resultAfterExpiry, err := client.Get(key) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), "", resultAfterExpiry.Value()) + }) +} + +func (suite *GlideTestSuite) TestPExpireTime_KeyDoesNotExist() { + suite.runWithDefaultClients(func(client api.BaseClient) { + key := "NonExistentKey" + + // Call ExpireTime on a key that doesn't exist + expiryResult, err := client.PExpireTime(key) + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(-2), expiryResult.Value()) + }) +} + +func (suite *GlideTestSuite) TestTTL_WithValidKey() { + suite.runWithDefaultClients(func(client api.BaseClient) { + suite.verifyOK(client.Set("key", "value")) + + resExpire, err := client.Expire("key", 1) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resExpire.Value()) + resTTL, err := client.TTL("key") + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), resTTL.Value(), int64(1)) + }) +} + +func (suite *GlideTestSuite) TestTTL_WithExpiredKey() { + suite.runWithDefaultClients(func(client api.BaseClient) { + suite.verifyOK(client.Set("key", "value")) + + resExpire, err := client.Expire("key", 1) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resExpire.Value()) + + time.Sleep(2 * time.Second) + + resTTL, err := client.TTL("key") + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(-2), resTTL.Value()) + }) +} + +func (suite *GlideTestSuite) TestPTTL_WithValidKey() { + suite.runWithDefaultClients(func(client api.BaseClient) { + suite.verifyOK(client.Set("key", "value")) + + resExpire, err := client.Expire("key", 1) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resExpire.Value()) + + resPTTL, err := client.PTTL("key") + assert.Nil(suite.T(), err) + assert.Greater(suite.T(), resPTTL.Value(), int64(900)) + }) +} + +func (suite *GlideTestSuite) TestPTTL_WithExpiredKey() { + suite.runWithDefaultClients(func(client api.BaseClient) { + suite.verifyOK(client.Set("key", "value")) + + resExpire, err := client.Expire("key", 1) + assert.Nil(suite.T(), err) + assert.True(suite.T(), resExpire.Value()) + + time.Sleep(2 * time.Second) + + resPTTL, err := client.PTTL("key") + assert.Nil(suite.T(), err) + assert.Equal(suite.T(), int64(-2), resPTTL.Value()) + }) +} From d60cc31ba05a2b349e2276384a76baae6d32bff5 Mon Sep 17 00:00:00 2001 From: niharikabhavaraju Date: Tue, 26 Nov 2024 04:07:18 +0000 Subject: [PATCH 02/11] Fixed review commments Signed-off-by: Niharika Bhavaraju --- go/api/base_client.go | 43 ++--- go/api/command_options.go | 37 ++-- go/api/generic_commands.go | 87 ++++------ go/integTest/shared_commands_test.go | 251 ++++++++++++--------------- 4 files changed, 171 insertions(+), 247 deletions(-) diff --git a/go/api/base_client.go b/go/api/base_client.go index f965863031..5d2b94106f 100644 --- a/go/api/base_client.go +++ b/go/api/base_client.go @@ -959,8 +959,7 @@ func (client *baseClient) Exists(keys []string) (Result[int64], error) { } func (client *baseClient) Expire(key string, seconds int64) (Result[bool], error) { - secondsStr := strconv.FormatInt(seconds, 10) - result, err := client.executeCommand(C.Expire, []string{key, secondsStr}) + result, err := client.executeCommand(C.Expire, []string{key, utils.IntToString(seconds)}) if err != nil { return CreateNilBoolResult(), err } @@ -968,13 +967,12 @@ func (client *baseClient) Expire(key string, seconds int64) (Result[bool], error return handleBooleanResponse(result) } -func (client *baseClient) ExpireWithOptions(key string, seconds int64, options *ExpireOptions) (Result[bool], error) { - secondsStr := strconv.FormatInt(seconds, 10) - optionArgs, err := options.toArgs() +func (client *baseClient) ExpireWithOptions(key string, seconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) { + expireConditionalSetStr, err := expireConditionalSet.toString() if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.Expire, append([]string{key, secondsStr}, optionArgs...)) + result, err := client.executeCommand(C.Expire, append([]string{key, utils.IntToString(seconds), expireConditionalSetStr})) if err != nil { return CreateNilBoolResult(), err } @@ -982,8 +980,7 @@ func (client *baseClient) ExpireWithOptions(key string, seconds int64, options * } func (client *baseClient) ExpireAt(key string, unixTimestampInSeconds int64) (Result[bool], error) { - timestampStr := strconv.FormatInt(unixTimestampInSeconds, 10) - result, err := client.executeCommand(C.ExpireAt, []string{key, timestampStr}) + result, err := client.executeCommand(C.ExpireAt, []string{key, utils.IntToString(unixTimestampInSeconds)}) if err != nil { return CreateNilBoolResult(), err } @@ -991,13 +988,12 @@ func (client *baseClient) ExpireAt(key string, unixTimestampInSeconds int64) (Re return handleBooleanResponse(result) } -func (client *baseClient) ExpireAtWithOptions(key string, unixTimestampInSeconds int64, options *ExpireOptions) (Result[bool], error) { - timestampStr := strconv.FormatInt(unixTimestampInSeconds, 10) - optionArgs, err := options.toArgs() +func (client *baseClient) ExpireAtWithOptions(key string, unixTimestampInSeconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) { + expireConditionalSetStr, err := expireConditionalSet.toString() if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.ExpireAt, append([]string{key, timestampStr}, optionArgs...)) + result, err := client.executeCommand(C.ExpireAt, append([]string{key, utils.IntToString(unixTimestampInSeconds), expireConditionalSetStr})) if err != nil { return CreateNilBoolResult(), err } @@ -1005,23 +1001,19 @@ func (client *baseClient) ExpireAtWithOptions(key string, unixTimestampInSeconds } func (client *baseClient) PExpire(key string, milliseconds int64) (Result[bool], error) { - - milliSecondsStr := strconv.FormatInt(milliseconds, 10) - result, err := client.executeCommand(C.PExpire, []string{key, milliSecondsStr}) + result, err := client.executeCommand(C.PExpire, []string{key, utils.IntToString(milliseconds)}) if err != nil { return CreateNilBoolResult(), err } return handleBooleanResponse(result) } -func (client *baseClient) PExpireWithOptions(key string, milliseconds int64, options *ExpireOptions) (Result[bool], error) { - - milliSecondsStr := strconv.FormatInt(milliseconds, 10) - optionArgs, err := options.toArgs() +func (client *baseClient) PExpireWithOptions(key string, milliseconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) { + expireConditionalSetStr, err := expireConditionalSet.toString() if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.PExpire, append([]string{key, milliSecondsStr}, optionArgs...)) + result, err := client.executeCommand(C.PExpire, append([]string{key, utils.IntToString(milliseconds), expireConditionalSetStr})) if err != nil { return CreateNilBoolResult(), err } @@ -1029,22 +1021,19 @@ func (client *baseClient) PExpireWithOptions(key string, milliseconds int64, opt } func (client *baseClient) PExpireAt(key string, unixTimestampInMilliSeconds int64) (Result[bool], error) { - - timestampStr := strconv.FormatInt(unixTimestampInMilliSeconds, 10) - result, err := client.executeCommand(C.PExpireAt, []string{key, timestampStr}) + result, err := client.executeCommand(C.PExpireAt, []string{key, utils.IntToString(unixTimestampInMilliSeconds)}) if err != nil { return CreateNilBoolResult(), err } return handleBooleanResponse(result) } -func (client *baseClient) PExpireAtWithOptions(key string, unixTimestampInMilliSeconds int64, options *ExpireOptions) (Result[bool], error) { - timestampStr := strconv.FormatInt(unixTimestampInMilliSeconds, 10) - optionArgs, err := options.toArgs() +func (client *baseClient) PExpireAtWithOptions(key string, unixTimestampInMilliSeconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) { + expireConditionalSetStr, err := expireConditionalSet.toString() if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.PExpireAt, append([]string{key, timestampStr}, optionArgs...)) + result, err := client.executeCommand(C.PExpireAt, append([]string{key, utils.IntToString(unixTimestampInMilliSeconds), expireConditionalSetStr})) if err != nil { return CreateNilBoolResult(), err } diff --git a/go/api/command_options.go b/go/api/command_options.go index f09a84e5ef..4f950a253e 100644 --- a/go/api/command_options.go +++ b/go/api/command_options.go @@ -70,28 +70,6 @@ func (opts *SetOptions) toArgs() ([]string, error) { return args, err } -type ExpireOptions struct { - ExpireConditionalSet ExpireConditionalSet -} - -func NewExpireOptionsBuilder() *ExpireOptions { - return &ExpireOptions{} -} - -func (expireOptions *ExpireOptions) SetExpireConditionalSet(expireConditionalSet ExpireConditionalSet) *ExpireOptions { - expireOptions.ExpireConditionalSet = expireConditionalSet - return expireOptions -} - -func (opts *ExpireOptions) toArgs() ([]string, error) { - args := []string{} - var err error - if opts.ExpireConditionalSet != "" { - args = append(args, string(opts.ExpireConditionalSet)) - } - return args, err -} - // GetExOptions represents optional arguments for the [api.StringCommands.GetExWithOptions] command. // // See [valkey.io] @@ -155,6 +133,21 @@ const ( NewExpiryLessThanCurrent ExpireConditionalSet = "LT" ) +func (expireConditionalSet ExpireConditionalSet) toString() (string, error) { + switch expireConditionalSet { + case HasExistingExpiry: + return string(HasExistingExpiry), nil + case HasNoExpiry: + return string(HasNoExpiry), nil + case NewExpiryGreaterThanCurrent: + return string(NewExpiryGreaterThanCurrent), nil + case NewExpiryLessThanCurrent: + return string(NewExpiryLessThanCurrent), nil + default: + return "", &RequestError{"Invalid expire condition"} + } +} + // Expiry is used to configure the lifetime of a value. type Expiry struct { Type ExpiryType diff --git a/go/api/generic_commands.go b/go/api/generic_commands.go index 2e01543ed7..36fefab62a 100644 --- a/go/api/generic_commands.go +++ b/go/api/generic_commands.go @@ -44,10 +44,8 @@ type GenericBaseCommands interface { // // Example: // result, err := client.Exists([]string{"key1", "key2", "key3"}) - // if err != nil { - // // handle error - // } - // fmt.Println(result) // Output: 2 + // result.Value(): 2 + // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/exists/ Exists(keys []string) (Result[int64], error) @@ -67,10 +65,8 @@ type GenericBaseCommands interface { // // Example: // result, err := client.Expire("key", 1) - // if err != nil { - // // handle error - // } - // fmt.Println(result) // Output: true + // result.Value(): true + // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/expire/ Expire(key string, seconds int64) (Result[bool], error) @@ -91,13 +87,11 @@ type GenericBaseCommands interface { // // Example: // result, err := client.Expire("key", 1, api.OnlyIfDoesNotExist) - // if err != nil { - // // handle error - // } - // fmt.Println(result) // Output: true + // result.Value(): true + // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/expire/ - ExpireWithOptions(key string, seconds int64, options *ExpireOptions) (Result[bool], error) + ExpireWithOptions(key string, seconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) // ExpireAt sets a timeout on key. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of specifying the number of seconds. // A timestamp in the past will delete the key immediately. After the timeout has expired, the key will automatically be deleted. @@ -116,10 +110,8 @@ type GenericBaseCommands interface { // // Example: // result, err := client.ExpireAt("key", time.Now().Unix()) - // if err != nil { - // // handle error - // } - // fmt.Println(result) // Output: true + // result.Value(): true + // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/expireat/ ExpireAt(key string, unixTimestampInSeconds int64) (Result[bool], error) @@ -142,13 +134,11 @@ type GenericBaseCommands interface { // // Example: // result, err := client.ExpireAt("key", time.Now().Unix(), api.OnlyIfDoesNotExist) - // if err != nil { - // // handle error - // } - // fmt.Println(result) // Output: true + // result.Value(): true + // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/expireat/ - ExpireAtWithOptions(key string, unixTimestampInSeconds int64, options *ExpireOptions) (Result[bool], error) + ExpireAtWithOptions(key string, unixTimestampInSeconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) // Sets a timeout on key in milliseconds. After the timeout has expired, the key will automatically be deleted. // If key already has an existing expire set, the time to live is updated to the new value. @@ -164,10 +154,8 @@ type GenericBaseCommands interface { // // Example: // result, err := client.PExpire("key", int64(5 * 1000)) - // if err != nil { - // // handle error - // } - // fmt.Println(result) // Output: true + // result.Value(): true + // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/pexpire/ PExpire(key string, milliseconds int64) (Result[bool], error) @@ -187,13 +175,11 @@ type GenericBaseCommands interface { // // Example: // result, err := client.PExpire("key", int64(5 * 1000), api.OnlyIfDoesNotExist) - // if err != nil { - // // handle error - // } - // fmt.Println(result) // Output: true + // result.Value(): true + // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/pexpire/ - PExpireWithOptions(key string, milliseconds int64, options *ExpireOptions) (Result[bool], error) + PExpireWithOptions(key string, milliseconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) // Sets a timeout on key. It takes an absolute Unix timestamp (milliseconds since // January 1, 1970) instead of specifying the number of milliseconds. @@ -212,10 +198,9 @@ type GenericBaseCommands interface { // // Example: // result, err := client.PExpire("key", time.Now().Unix()*1000) - // if err != nil { - // // handle error - // } - // fmt.Println(result) // Output: true + // result.Value(): true + // result.IsNil(): false + // // [valkey.io]: https://valkey.io/commands/pexpireat/ PExpireAt(key string, unixTimestampInMilliSeconds int64) (Result[bool], error) @@ -237,13 +222,11 @@ type GenericBaseCommands interface { // // Example: // result, err := client.PExpire("key", time.Now().Unix()*1000, api.OnlyIfDoesNotExist) - // if err != nil { - // // handle error - // } - // fmt.Println(result) // Output: true + // result.Value(): true + // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/pexpireat/ - PExpireAtWithOptions(key string, unixTimestampInMilliSeconds int64, options *ExpireOptions) (Result[bool], error) + PExpireAtWithOptions(key string, unixTimestampInMilliSeconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) // Expire Time returns the absolute Unix timestamp (since January 1, 1970) at which the given key // will expire, in seconds. @@ -258,10 +241,8 @@ type GenericBaseCommands interface { // Example: // // result, err := client.ExpireTime("key") - // if err != nil { - // // handle error - // } - // fmt.Println(result) // Output: 1732118030 + // result.Value(): 1732118030 + // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/expiretime/ ExpireTime(key string) (Result[int64], error) @@ -279,10 +260,8 @@ type GenericBaseCommands interface { // Example: // // result, err := client.PExpireTime("key") - // if err != nil { - // // handle error - // } - // fmt.Println(result) // Output: 33177117420000 + // result.Value(): 33177117420000 + // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/pexpiretime/ PExpireTime(key string) (Result[int64], error) @@ -299,10 +278,8 @@ type GenericBaseCommands interface { // Example: // // result, err := client.TTL("key") - // if err != nil { - // // handle error - // } - // fmt.Println(result) // Output: 3 + // result.Value(): 3 + // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/ttl/ TTL(key string) (Result[int64], error) @@ -319,10 +296,8 @@ type GenericBaseCommands interface { // Example: // // result, err := client.PTTL("key") - // if err != nil { - // // handle error - // } - // fmt.Println(result) // Output: 1000 + // result.Value(): 1000 + // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/pttl/ PTTL(key string) (Result[int64], error) diff --git a/go/integTest/shared_commands_test.go b/go/integTest/shared_commands_test.go index dd822807e6..74bde8ad82 100644 --- a/go/integTest/shared_commands_test.go +++ b/go/integTest/shared_commands_test.go @@ -2528,9 +2528,10 @@ func (suite *GlideTestSuite) TestExists() { func (suite *GlideTestSuite) TestExpire() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "TestExpire" + key := uuid.New().String() + value := uuid.New().String() - suite.verifyOK(client.Set(key, initialValue)) + suite.verifyOK(client.Set(key, value)) result, err := client.Expire(key, 1) assert.Nil(suite.T(), err, "Expected no error from Expire command") @@ -2546,7 +2547,7 @@ func (suite *GlideTestSuite) TestExpire() { func (suite *GlideTestSuite) TestExpire_KeyDoesNotExist() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "TestExpire_KeyDoesNotExist" + key := uuid.New().String() // Trying to set an expiry on a non-existent key result, err := client.Expire(key, 1) assert.Nil(suite.T(), err) @@ -2556,12 +2557,12 @@ func (suite *GlideTestSuite) TestExpire_KeyDoesNotExist() { func (suite *GlideTestSuite) TestExpireWithOptions_HasNoExpiry() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "TestExpireWithOptions_HasNoExpiry" + key := uuid.New().String() + value := uuid.New().String() - suite.verifyOK(client.Set(key, initialValue)) + suite.verifyOK(client.Set(key, value)) - opts := api.NewExpireOptionsBuilder().SetExpireConditionalSet(api.HasNoExpiry) - result, err := client.ExpireWithOptions(key, 2, opts) + result, err := client.ExpireWithOptions(key, 2, api.HasNoExpiry) assert.Nil(suite.T(), err) assert.True(suite.T(), result.Value()) @@ -2571,8 +2572,7 @@ func (suite *GlideTestSuite) TestExpireWithOptions_HasNoExpiry() { assert.Nil(suite.T(), err) assert.Equal(suite.T(), "", resultGet.Value()) - opts = api.NewExpireOptionsBuilder().SetExpireConditionalSet(api.HasNoExpiry) - result, err = client.ExpireWithOptions(key, 1, opts) + result, err = client.ExpireWithOptions(key, 1, api.HasNoExpiry) assert.Nil(suite.T(), err) assert.False(suite.T(), result.Value()) }) @@ -2580,21 +2580,16 @@ func (suite *GlideTestSuite) TestExpireWithOptions_HasNoExpiry() { func (suite *GlideTestSuite) TestExpireWithOptions_HasExistingExpiry() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "test_key" + key := uuid.New().String() + value := uuid.New().String() - suite.verifyOK(client.Set(key, initialValue)) + suite.verifyOK(client.Set(key, value)) - eOptions := &api.ExpireOptions{ - ExpireConditionalSet: api.HasNoExpiry, - } - resexp, err := client.ExpireWithOptions(key, 20, eOptions) + resexp, err := client.ExpireWithOptions(key, 20, api.HasNoExpiry) assert.Nil(suite.T(), err) assert.True(suite.T(), resexp.Value()) - expireOptions := &api.ExpireOptions{ - ExpireConditionalSet: api.HasExistingExpiry, - } - resultExpire, err := client.ExpireWithOptions(key, 1, expireOptions) + resultExpire, err := client.ExpireWithOptions(key, 1, api.HasExistingExpiry) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpire.Value()) @@ -2609,20 +2604,15 @@ func (suite *GlideTestSuite) TestExpireWithOptions_HasExistingExpiry() { func (suite *GlideTestSuite) TestExpireWithOptions_NewExpiryGreaterThanCurrent() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "key_new_expiry_gt" - suite.verifyOK(client.Set(key, initialValue)) + key := uuid.New().String() + value := uuid.New().String() + suite.verifyOK(client.Set(key, value)) - opts := &api.ExpireOptions{ - ExpireConditionalSet: api.HasNoExpiry, - } - resultExpire, err := client.ExpireWithOptions(key, 2, opts) + resultExpire, err := client.ExpireWithOptions(key, 2, api.HasNoExpiry) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpire.Value()) - expireOptions := &api.ExpireOptions{ - ExpireConditionalSet: api.NewExpiryGreaterThanCurrent, - } - resultExpire, err = client.ExpireWithOptions(key, 5, expireOptions) + resultExpire, err = client.ExpireWithOptions(key, 5, api.NewExpiryGreaterThanCurrent) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpire.Value()) time.Sleep(6 * time.Second) @@ -2634,29 +2624,21 @@ func (suite *GlideTestSuite) TestExpireWithOptions_NewExpiryGreaterThanCurrent() func (suite *GlideTestSuite) TestExpireWithOptions_NewExpiryLessThanCurrent() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "key_new_expiry_lt" + key := uuid.New().String() + value := uuid.New().String() - suite.verifyOK(client.Set(key, initialValue)) + suite.verifyOK(client.Set(key, value)) - initialExpireOptions := &api.ExpireOptions{ - ExpireConditionalSet: api.HasNoExpiry, - } - resultExpire, err := client.ExpireWithOptions(key, 10, initialExpireOptions) + resultExpire, err := client.ExpireWithOptions(key, 10, api.HasNoExpiry) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpire.Value()) - expireOptions := &api.ExpireOptions{ - ExpireConditionalSet: api.NewExpiryLessThanCurrent, - } - resultExpire, err = client.ExpireWithOptions(key, 5, expireOptions) + resultExpire, err = client.ExpireWithOptions(key, 5, api.NewExpiryLessThanCurrent) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpire.Value()) - expireOptions = &api.ExpireOptions{ - ExpireConditionalSet: api.NewExpiryGreaterThanCurrent, - } - resultExpire, err = client.ExpireWithOptions(key, 15, expireOptions) + resultExpire, err = client.ExpireWithOptions(key, 15, api.NewExpiryGreaterThanCurrent) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpire.Value()) @@ -2670,24 +2652,21 @@ func (suite *GlideTestSuite) TestExpireWithOptions_NewExpiryLessThanCurrent() { func (suite *GlideTestSuite) TestExpireAtWithOptions_HasNoExpiry() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "expire_at_with_no_expiry_test_key" - resultSet, err := client.Set(key, "value") + key := uuid.New().String() + value := uuid.New().String() + resultSet, err := client.Set(key, value) assert.Nil(suite.T(), err) assert.True(suite.T(), resultSet.Value() != "") - options := &api.ExpireOptions{ - ExpireConditionalSet: api.HasNoExpiry, - } - futureTimestamp := time.Now().Add(10 * time.Second).Unix() - resultExpire, err := client.ExpireAtWithOptions(key, futureTimestamp, options) + resultExpire, err := client.ExpireAtWithOptions(key, futureTimestamp, api.HasNoExpiry) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpire.Value()) resultExpireAt, err := client.ExpireAt(key, futureTimestamp) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireAt.Value()) - resultExpireWithOptions, err := client.ExpireAtWithOptions(key, futureTimestamp+10, options) + resultExpireWithOptions, err := client.ExpireAtWithOptions(key, futureTimestamp+10, api.HasNoExpiry) assert.Nil(suite.T(), err) assert.False(suite.T(), resultExpireWithOptions.Value()) }) @@ -2695,8 +2674,9 @@ func (suite *GlideTestSuite) TestExpireAtWithOptions_HasNoExpiry() { func (suite *GlideTestSuite) TestExpireAtWithOptions_HasExistingExpiry() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "expire_at_with_existing_expiry_test_key" - resultSet, err := client.Set(key, "value") + key := uuid.New().String() + value := uuid.New().String() + resultSet, err := client.Set(key, value) assert.Nil(suite.T(), err) assert.True(suite.T(), resultSet.Value() != "") @@ -2705,20 +2685,17 @@ func (suite *GlideTestSuite) TestExpireAtWithOptions_HasExistingExpiry() { assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireAt.Value()) - options := &api.ExpireOptions{ - ExpireConditionalSet: api.HasExistingExpiry, - } - - resultExpireWithOptions, err := client.ExpireAtWithOptions(key, futureTimestamp+10, options) + resultExpireWithOptions, err := client.ExpireAtWithOptions(key, futureTimestamp+10, api.HasExistingExpiry) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireWithOptions.Value()) }) } func (suite *GlideTestSuite) TestExpireAtWithOptions_NewExpiryGreaterThanCurrent() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "expire_at_with_new_expiry_greater_test_key" + key := uuid.New().String() + value := uuid.New().String() - resultSet, err := client.Set(key, "value") + resultSet, err := client.Set(key, value) assert.Nil(suite.T(), err) assert.True(suite.T(), resultSet.Value() != "") @@ -2727,11 +2704,8 @@ func (suite *GlideTestSuite) TestExpireAtWithOptions_NewExpiryGreaterThanCurrent assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireAt.Value()) - options := &api.ExpireOptions{ - ExpireConditionalSet: api.NewExpiryGreaterThanCurrent, - } newFutureTimestamp := time.Now().Add(20 * time.Second).Unix() - resultExpireWithOptions, err := client.ExpireAtWithOptions(key, newFutureTimestamp, options) + resultExpireWithOptions, err := client.ExpireAtWithOptions(key, newFutureTimestamp, api.NewExpiryGreaterThanCurrent) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireWithOptions.Value()) }) @@ -2739,9 +2713,10 @@ func (suite *GlideTestSuite) TestExpireAtWithOptions_NewExpiryGreaterThanCurrent func (suite *GlideTestSuite) TestExpireAtWithOptions_NewExpiryLessThanCurrent() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "expire_at_with_new_expiry_lesser_test_key" + key := uuid.New().String() + value := uuid.New().String() - resultSet, err := client.Set(key, "value") + resultSet, err := client.Set(key, value) assert.Nil(suite.T(), err) assert.True(suite.T(), resultSet.Value() != "") @@ -2750,12 +2725,8 @@ func (suite *GlideTestSuite) TestExpireAtWithOptions_NewExpiryLessThanCurrent() assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireAt.Value()) - options := &api.ExpireOptions{ - ExpireConditionalSet: api.NewExpiryLessThanCurrent, - } - newFutureTimestamp := time.Now().Add(5 * time.Second).Unix() - resultExpireWithOptions, err := client.ExpireAtWithOptions(key, newFutureTimestamp, options) + resultExpireWithOptions, err := client.ExpireAtWithOptions(key, newFutureTimestamp, api.NewExpiryLessThanCurrent) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireWithOptions.Value()) @@ -2769,9 +2740,10 @@ func (suite *GlideTestSuite) TestExpireAtWithOptions_NewExpiryLessThanCurrent() func (suite *GlideTestSuite) TestPExpire() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "test_key_with_pexpire" + key := uuid.New().String() + value := uuid.New().String() - resultSet, err := client.Set(key, "value") + resultSet, err := client.Set(key, value) assert.Nil(suite.T(), err) assert.True(suite.T(), resultSet.Value() != "") @@ -2788,9 +2760,10 @@ func (suite *GlideTestSuite) TestPExpire() { func (suite *GlideTestSuite) TestPExpireWithOptions_HasExistingExpiry() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "test_key_with_has_existing_expiry" + key := uuid.New().String() + value := uuid.New().String() - resultSet, err := client.Set(key, "value") + resultSet, err := client.Set(key, value) assert.Nil(suite.T(), err) assert.True(suite.T(), resultSet.Value() != "") @@ -2799,12 +2772,9 @@ func (suite *GlideTestSuite) TestPExpireWithOptions_HasExistingExpiry() { assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpire.Value()) - options := &api.ExpireOptions{ - ExpireConditionalSet: api.HasExistingExpiry, - } newExpire := 1000 - resultExpireWithOptions, err := client.PExpireWithOptions(key, int64(newExpire), options) + resultExpireWithOptions, err := client.PExpireWithOptions(key, int64(newExpire), api.HasExistingExpiry) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireWithOptions.Value()) @@ -2817,18 +2787,16 @@ func (suite *GlideTestSuite) TestPExpireWithOptions_HasExistingExpiry() { func (suite *GlideTestSuite) TestPExpireWithOptions_HasNoExpiry() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "test_key_with_no_expiry" + key := uuid.New().String() + value := uuid.New().String() - resultSet, err := client.Set(key, "value") + resultSet, err := client.Set(key, value) assert.Nil(suite.T(), err) assert.True(suite.T(), resultSet.Value() != "") - options := &api.ExpireOptions{ - ExpireConditionalSet: api.HasNoExpiry, - } newExpire := 500 - resultExpireWithOptions, err := client.PExpireWithOptions(key, int64(newExpire), options) + resultExpireWithOptions, err := client.PExpireWithOptions(key, int64(newExpire), api.HasNoExpiry) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireWithOptions.Value()) @@ -2841,9 +2809,10 @@ func (suite *GlideTestSuite) TestPExpireWithOptions_HasNoExpiry() { func (suite *GlideTestSuite) TestPExpireWithOptions_NewExpiryGreaterThanCurrent() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "test_key_with_new_expiry_greater_than_current" + key := uuid.New().String() + value := uuid.New().String() - resultSet, err := client.Set(key, "value") + resultSet, err := client.Set(key, value) assert.Nil(suite.T(), err) assert.True(suite.T(), resultSet.Value() != "") @@ -2852,12 +2821,9 @@ func (suite *GlideTestSuite) TestPExpireWithOptions_NewExpiryGreaterThanCurrent( assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpire.Value()) - options := &api.ExpireOptions{ - ExpireConditionalSet: api.NewExpiryGreaterThanCurrent, - } newExpire := 1000 - resultExpireWithOptions, err := client.PExpireWithOptions(key, int64(newExpire), options) + resultExpireWithOptions, err := client.PExpireWithOptions(key, int64(newExpire), api.NewExpiryGreaterThanCurrent) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireWithOptions.Value()) @@ -2870,9 +2836,10 @@ func (suite *GlideTestSuite) TestPExpireWithOptions_NewExpiryGreaterThanCurrent( func (suite *GlideTestSuite) TestPExpireWithOptions_NewExpiryLessThanCurrent() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "test_key_with_new_expiry_less_than_current" + key := uuid.New().String() + value := uuid.New().String() - resultSet, err := client.Set(key, "value") + resultSet, err := client.Set(key, value) assert.Nil(suite.T(), err) assert.True(suite.T(), resultSet.Value() != "") @@ -2881,12 +2848,9 @@ func (suite *GlideTestSuite) TestPExpireWithOptions_NewExpiryLessThanCurrent() { assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpire.Value()) - options := &api.ExpireOptions{ - ExpireConditionalSet: api.NewExpiryLessThanCurrent, - } newExpire := 200 - resultExpireWithOptions, err := client.PExpireWithOptions(key, int64(newExpire), options) + resultExpireWithOptions, err := client.PExpireWithOptions(key, int64(newExpire), api.NewExpiryLessThanCurrent) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireWithOptions.Value()) @@ -2899,19 +2863,21 @@ func (suite *GlideTestSuite) TestPExpireWithOptions_NewExpiryLessThanCurrent() { func (suite *GlideTestSuite) TestPExpireAt() { suite.runWithDefaultClients(func(client api.BaseClient) { - resultSet, err := client.Set("key", "value") + key := uuid.New().String() + value := uuid.New().String() + resultSet, err := client.Set(key, value) assert.Nil(suite.T(), err) assert.True(suite.T(), resultSet.Value() != "") expireAfterMilliseconds := time.Now().Unix() * 1000 - resultPExpireAt, err := client.PExpireAt("key", expireAfterMilliseconds) + resultPExpireAt, err := client.PExpireAt(key, expireAfterMilliseconds) assert.Nil(suite.T(), err) assert.True(suite.T(), resultPExpireAt.Value()) time.Sleep(6 * time.Second) - resultpExists, err := client.Exists([]string{"key"}) + resultpExists, err := client.Exists([]string{key}) assert.Nil(suite.T(), err) assert.Equal(suite.T(), int64(0), resultpExists.Value()) }) @@ -2919,15 +2885,13 @@ func (suite *GlideTestSuite) TestPExpireAt() { func (suite *GlideTestSuite) TestPExpireAtWithOptions_HasNoExpiry() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "test_key_no_expiry" + key := uuid.New().String() + value := uuid.New().String() - suite.verifyOK(client.Set(key, "value")) + suite.verifyOK(client.Set(key, value)) timestamp := time.Now().Unix() * 1000 - options := &api.ExpireOptions{ - ExpireConditionalSet: api.HasNoExpiry, - } - result, err := client.PExpireAtWithOptions(key, timestamp, options) + result, err := client.PExpireAtWithOptions(key, timestamp, api.HasNoExpiry) assert.Nil(suite.T(), err) assert.True(suite.T(), result.Value()) @@ -2941,19 +2905,17 @@ func (suite *GlideTestSuite) TestPExpireAtWithOptions_HasNoExpiry() { func (suite *GlideTestSuite) TestPExpireAtWithOptions_HasExistingExpiry() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "test_key_with_existing_expiry" + key := uuid.New().String() + value := uuid.New().String() - suite.verifyOK(client.Set(key, "value")) + suite.verifyOK(client.Set(key, value)) initialExpire := 500 resultExpire, err := client.PExpire(key, int64(initialExpire)) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpire.Value()) - options := &api.ExpireOptions{ - ExpireConditionalSet: api.HasExistingExpiry, - } newExpire := time.Now().Unix()*1000 + 1000 - resultExpireWithOptions, err := client.PExpireAtWithOptions(key, newExpire, options) + resultExpireWithOptions, err := client.PExpireAtWithOptions(key, newExpire, api.HasExistingExpiry) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireWithOptions.Value()) @@ -2966,9 +2928,10 @@ func (suite *GlideTestSuite) TestPExpireAtWithOptions_HasExistingExpiry() { func (suite *GlideTestSuite) TestPExpireAtWithOptions_NewExpiryGreaterThanCurrent() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "test_key_with_new_expiry_greater_than_current" + key := uuid.New().String() + value := uuid.New().String() - suite.verifyOK(client.Set(key, "value")) + suite.verifyOK(client.Set(key, value)) initialExpire := 500 resultExpire, err := client.PExpire(key, int64(initialExpire)) @@ -2976,11 +2939,8 @@ func (suite *GlideTestSuite) TestPExpireAtWithOptions_NewExpiryGreaterThanCurren assert.True(suite.T(), resultExpire.Value()) newExpire := time.Now().Unix()*1000 + 1000 - options := &api.ExpireOptions{ - ExpireConditionalSet: api.NewExpiryGreaterThanCurrent, - } - resultExpireWithOptions, err := client.PExpireAtWithOptions(key, newExpire, options) + resultExpireWithOptions, err := client.PExpireAtWithOptions(key, newExpire, api.NewExpiryGreaterThanCurrent) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireWithOptions.Value()) @@ -2993,9 +2953,10 @@ func (suite *GlideTestSuite) TestPExpireAtWithOptions_NewExpiryGreaterThanCurren func (suite *GlideTestSuite) TestPExpireAtWithOptions_NewExpiryLessThanCurrent() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "test_key_with_new_expiry_less_than_current" + key := uuid.New().String() + value := uuid.New().String() - suite.verifyOK(client.Set(key, "value")) + suite.verifyOK(client.Set(key, value)) initialExpire := 1000 resultExpire, err := client.PExpire(key, int64(initialExpire)) @@ -3003,11 +2964,8 @@ func (suite *GlideTestSuite) TestPExpireAtWithOptions_NewExpiryLessThanCurrent() assert.True(suite.T(), resultExpire.Value()) newExpire := time.Now().Unix()*1000 + 500 - options := &api.ExpireOptions{ - ExpireConditionalSet: api.NewExpiryLessThanCurrent, - } - resultExpireWithOptions, err := client.PExpireAtWithOptions(key, newExpire, options) + resultExpireWithOptions, err := client.PExpireAtWithOptions(key, newExpire, api.NewExpiryLessThanCurrent) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireWithOptions.Value()) @@ -3021,8 +2979,8 @@ func (suite *GlideTestSuite) TestPExpireAtWithOptions_NewExpiryLessThanCurrent() func (suite *GlideTestSuite) TestExpireTime() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "TestExpireTimeKey" - value := "TestValue" + key := uuid.New().String() + value := uuid.New().String() suite.verifyOK(client.Set(key, value)) @@ -3049,7 +3007,8 @@ func (suite *GlideTestSuite) TestExpireTime() { func (suite *GlideTestSuite) TestExpireTime_KeyDoesNotExist() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "NonExistentKey" + + key := uuid.New().String() // Call ExpireTime on a key that doesn't exist expiryResult, err := client.ExpireTime(key) @@ -3060,8 +3019,8 @@ func (suite *GlideTestSuite) TestExpireTime_KeyDoesNotExist() { func (suite *GlideTestSuite) TestPExpireTime() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "TestPExpireTimeKey" - value := "TestValue" + key := uuid.New().String() + value := uuid.New().String() suite.verifyOK(client.Set(key, value)) @@ -3088,7 +3047,7 @@ func (suite *GlideTestSuite) TestPExpireTime() { func (suite *GlideTestSuite) TestPExpireTime_KeyDoesNotExist() { suite.runWithDefaultClients(func(client api.BaseClient) { - key := "NonExistentKey" + key := uuid.New().String() // Call ExpireTime on a key that doesn't exist expiryResult, err := client.PExpireTime(key) @@ -3099,12 +3058,14 @@ func (suite *GlideTestSuite) TestPExpireTime_KeyDoesNotExist() { func (suite *GlideTestSuite) TestTTL_WithValidKey() { suite.runWithDefaultClients(func(client api.BaseClient) { - suite.verifyOK(client.Set("key", "value")) + key := uuid.New().String() + value := uuid.New().String() + suite.verifyOK(client.Set(key, value)) - resExpire, err := client.Expire("key", 1) + resExpire, err := client.Expire(key, 1) assert.Nil(suite.T(), err) assert.True(suite.T(), resExpire.Value()) - resTTL, err := client.TTL("key") + resTTL, err := client.TTL(key) assert.Nil(suite.T(), err) assert.Equal(suite.T(), resTTL.Value(), int64(1)) }) @@ -3112,15 +3073,17 @@ func (suite *GlideTestSuite) TestTTL_WithValidKey() { func (suite *GlideTestSuite) TestTTL_WithExpiredKey() { suite.runWithDefaultClients(func(client api.BaseClient) { - suite.verifyOK(client.Set("key", "value")) + key := uuid.New().String() + value := uuid.New().String() + suite.verifyOK(client.Set(key, value)) - resExpire, err := client.Expire("key", 1) + resExpire, err := client.Expire(key, 1) assert.Nil(suite.T(), err) assert.True(suite.T(), resExpire.Value()) time.Sleep(2 * time.Second) - resTTL, err := client.TTL("key") + resTTL, err := client.TTL(key) assert.Nil(suite.T(), err) assert.Equal(suite.T(), int64(-2), resTTL.Value()) }) @@ -3128,13 +3091,15 @@ func (suite *GlideTestSuite) TestTTL_WithExpiredKey() { func (suite *GlideTestSuite) TestPTTL_WithValidKey() { suite.runWithDefaultClients(func(client api.BaseClient) { - suite.verifyOK(client.Set("key", "value")) + key := uuid.New().String() + value := uuid.New().String() + suite.verifyOK(client.Set(key, value)) - resExpire, err := client.Expire("key", 1) + resExpire, err := client.Expire(key, 1) assert.Nil(suite.T(), err) assert.True(suite.T(), resExpire.Value()) - resPTTL, err := client.PTTL("key") + resPTTL, err := client.PTTL(key) assert.Nil(suite.T(), err) assert.Greater(suite.T(), resPTTL.Value(), int64(900)) }) @@ -3142,15 +3107,17 @@ func (suite *GlideTestSuite) TestPTTL_WithValidKey() { func (suite *GlideTestSuite) TestPTTL_WithExpiredKey() { suite.runWithDefaultClients(func(client api.BaseClient) { - suite.verifyOK(client.Set("key", "value")) + key := uuid.New().String() + value := uuid.New().String() + suite.verifyOK(client.Set(key, value)) - resExpire, err := client.Expire("key", 1) + resExpire, err := client.Expire(key, 1) assert.Nil(suite.T(), err) assert.True(suite.T(), resExpire.Value()) time.Sleep(2 * time.Second) - resPTTL, err := client.PTTL("key") + resPTTL, err := client.PTTL(key) assert.Nil(suite.T(), err) assert.Equal(suite.T(), int64(-2), resPTTL.Value()) }) From 71f4e99e13f439edce98fcfb310c2fbcab7aa76d Mon Sep 17 00:00:00 2001 From: Niharika Bhavaraju Date: Tue, 26 Nov 2024 11:08:39 +0000 Subject: [PATCH 03/11] Fixed review comments Signed-off-by: Niharika Bhavaraju --- go/api/base_client.go | 24 ++++++++++++------------ go/api/command_options.go | 14 +++++++------- go/api/generic_commands.go | 8 ++++---- go/integTest/shared_commands_test.go | 14 +++++++++----- 4 files changed, 32 insertions(+), 28 deletions(-) diff --git a/go/api/base_client.go b/go/api/base_client.go index 5d2b94106f..12eff44a12 100644 --- a/go/api/base_client.go +++ b/go/api/base_client.go @@ -967,12 +967,12 @@ func (client *baseClient) Expire(key string, seconds int64) (Result[bool], error return handleBooleanResponse(result) } -func (client *baseClient) ExpireWithOptions(key string, seconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) { - expireConditionalSetStr, err := expireConditionalSet.toString() +func (client *baseClient) ExpireWithOptions(key string, seconds int64, expireCondition ExpireCondition) (Result[bool], error) { + expireConditionStr, err := expireCondition.toString() if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.Expire, append([]string{key, utils.IntToString(seconds), expireConditionalSetStr})) + result, err := client.executeCommand(C.Expire, append([]string{key, utils.IntToString(seconds), expireConditionStr})) if err != nil { return CreateNilBoolResult(), err } @@ -988,12 +988,12 @@ func (client *baseClient) ExpireAt(key string, unixTimestampInSeconds int64) (Re return handleBooleanResponse(result) } -func (client *baseClient) ExpireAtWithOptions(key string, unixTimestampInSeconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) { - expireConditionalSetStr, err := expireConditionalSet.toString() +func (client *baseClient) ExpireAtWithOptions(key string, unixTimestampInSeconds int64, expireCondition ExpireCondition) (Result[bool], error) { + expireConditionStr, err := expireCondition.toString() if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.ExpireAt, append([]string{key, utils.IntToString(unixTimestampInSeconds), expireConditionalSetStr})) + result, err := client.executeCommand(C.ExpireAt, append([]string{key, utils.IntToString(unixTimestampInSeconds), expireConditionStr})) if err != nil { return CreateNilBoolResult(), err } @@ -1008,12 +1008,12 @@ func (client *baseClient) PExpire(key string, milliseconds int64) (Result[bool], return handleBooleanResponse(result) } -func (client *baseClient) PExpireWithOptions(key string, milliseconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) { - expireConditionalSetStr, err := expireConditionalSet.toString() +func (client *baseClient) PExpireWithOptions(key string, milliseconds int64, expireCondition ExpireCondition) (Result[bool], error) { + expireConditionStr, err := expireCondition.toString() if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.PExpire, append([]string{key, utils.IntToString(milliseconds), expireConditionalSetStr})) + result, err := client.executeCommand(C.PExpire, append([]string{key, utils.IntToString(milliseconds), expireConditionStr})) if err != nil { return CreateNilBoolResult(), err } @@ -1028,12 +1028,12 @@ func (client *baseClient) PExpireAt(key string, unixTimestampInMilliSeconds int6 return handleBooleanResponse(result) } -func (client *baseClient) PExpireAtWithOptions(key string, unixTimestampInMilliSeconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) { - expireConditionalSetStr, err := expireConditionalSet.toString() +func (client *baseClient) PExpireAtWithOptions(key string, unixTimestampInMilliSeconds int64, expireCondition ExpireCondition) (Result[bool], error) { + expireConditionStr, err := expireCondition.toString() if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.PExpireAt, append([]string{key, utils.IntToString(unixTimestampInMilliSeconds), expireConditionalSetStr})) + result, err := client.executeCommand(C.PExpireAt, append([]string{key, utils.IntToString(unixTimestampInMilliSeconds), expireConditionStr})) if err != nil { return CreateNilBoolResult(), err } diff --git a/go/api/command_options.go b/go/api/command_options.go index 4f950a253e..c63d01a7a3 100644 --- a/go/api/command_options.go +++ b/go/api/command_options.go @@ -120,21 +120,21 @@ const ( OnlyIfDoesNotExist ConditionalSet = "NX" ) -type ExpireConditionalSet string +type ExpireCondition string const ( // HasExistingExpiry only sets the key if it already exists. Equivalent to "XX" in the valkey API. - HasExistingExpiry ExpireConditionalSet = "XX" + HasExistingExpiry ExpireCondition = "XX" // HasNoExpiry only sets the key if it does not already exist. Equivalent to "NX" in the valkey API. - HasNoExpiry ExpireConditionalSet = "NX" + HasNoExpiry ExpireCondition = "NX" // NewExpiryGreaterThanCurrent only sets the key if its greater than current. Equivalent to "GT" in the valkey API. - NewExpiryGreaterThanCurrent ExpireConditionalSet = "GT" + NewExpiryGreaterThanCurrent ExpireCondition = "GT" // NewExpiryLessThanCurrent only sets the key if its lesser than current. Equivalent to "LT" in the valkey API. - NewExpiryLessThanCurrent ExpireConditionalSet = "LT" + NewExpiryLessThanCurrent ExpireCondition = "LT" ) -func (expireConditionalSet ExpireConditionalSet) toString() (string, error) { - switch expireConditionalSet { +func (expireCondition ExpireCondition) toString() (string, error) { + switch expireCondition { case HasExistingExpiry: return string(HasExistingExpiry), nil case HasNoExpiry: diff --git a/go/api/generic_commands.go b/go/api/generic_commands.go index 36fefab62a..ddd3b57c4d 100644 --- a/go/api/generic_commands.go +++ b/go/api/generic_commands.go @@ -91,7 +91,7 @@ type GenericBaseCommands interface { // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/expire/ - ExpireWithOptions(key string, seconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) + ExpireWithOptions(key string, seconds int64, expireCondition ExpireCondition) (Result[bool], error) // ExpireAt sets a timeout on key. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of specifying the number of seconds. // A timestamp in the past will delete the key immediately. After the timeout has expired, the key will automatically be deleted. @@ -138,7 +138,7 @@ type GenericBaseCommands interface { // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/expireat/ - ExpireAtWithOptions(key string, unixTimestampInSeconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) + ExpireAtWithOptions(key string, unixTimestampInSeconds int64, expireCondition ExpireCondition) (Result[bool], error) // Sets a timeout on key in milliseconds. After the timeout has expired, the key will automatically be deleted. // If key already has an existing expire set, the time to live is updated to the new value. @@ -179,7 +179,7 @@ type GenericBaseCommands interface { // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/pexpire/ - PExpireWithOptions(key string, milliseconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) + PExpireWithOptions(key string, milliseconds int64, expireCondition ExpireCondition) (Result[bool], error) // Sets a timeout on key. It takes an absolute Unix timestamp (milliseconds since // January 1, 1970) instead of specifying the number of milliseconds. @@ -226,7 +226,7 @@ type GenericBaseCommands interface { // result.IsNil(): false // // [valkey.io]: https://valkey.io/commands/pexpireat/ - PExpireAtWithOptions(key string, unixTimestampInMilliSeconds int64, expireConditionalSet ExpireConditionalSet) (Result[bool], error) + PExpireAtWithOptions(key string, unixTimestampInMilliSeconds int64, expireCondition ExpireCondition) (Result[bool], error) // Expire Time returns the absolute Unix timestamp (since January 1, 1970) at which the given key // will expire, in seconds. diff --git a/go/integTest/shared_commands_test.go b/go/integTest/shared_commands_test.go index 74bde8ad82..b12314c3cf 100644 --- a/go/integTest/shared_commands_test.go +++ b/go/integTest/shared_commands_test.go @@ -2506,9 +2506,11 @@ func (suite *GlideTestSuite) TestDel_MultipleKeys() { func (suite *GlideTestSuite) TestExists() { suite.runWithDefaultClients(func(client api.BaseClient) { + key := uuid.New().String() + value := uuid.New().String() // Test 1: Check if an existing key returns 1 - suite.verifyOK(client.Set(keyName, initialValue)) - result, err := client.Exists([]string{keyName}) + suite.verifyOK(client.Set(key, initialValue)) + result, err := client.Exists([]string{key}) assert.Nil(suite.T(), err) assert.Equal(suite.T(), int64(1), result.Value(), "The key should exist") @@ -2518,9 +2520,11 @@ func (suite *GlideTestSuite) TestExists() { assert.Equal(suite.T(), int64(0), result.Value(), "The non-existent key should not exist") // Test 3: Multiple keys, some exist, some do not - suite.verifyOK(client.Set("existingKey", initialValue)) - suite.verifyOK(client.Set("testKey", initialValue)) - result, err = client.Exists([]string{"testKey", "existingKey", "anotherNonExistentKey"}) + existingKey := uuid.New().String() + testKey := uuid.New().String() + suite.verifyOK(client.Set(existingKey, value)) + suite.verifyOK(client.Set(testKey, value)) + result, err = client.Exists([]string{testKey, existingKey, "anotherNonExistentKey"}) assert.Nil(suite.T(), err) assert.Equal(suite.T(), int64(2), result.Value(), "Two keys should exist") }) From b018f0bce035df0c5b4b59eb9a1a3195f25be78f Mon Sep 17 00:00:00 2001 From: Niharika Bhavaraju Date: Wed, 27 Nov 2024 08:59:13 +0000 Subject: [PATCH 04/11] Formatted comments to commands(multi-slot routing Signed-off-by: Niharika Bhavaraju --- go/api/commands.go | 36 ++++++++++++++++++++++++------------ go/api/generic_commands.go | 14 ++++++++++++-- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/go/api/commands.go b/go/api/commands.go index 1d00ff8270..a22db30836 100644 --- a/go/api/commands.go +++ b/go/api/commands.go @@ -132,9 +132,12 @@ type StringCommands interface { // Sets multiple keys to multiple values in a single operation. // // Note: - // When in cluster mode, the command may route to multiple nodes when keys in keyValueMap map to different hash slots. - // - // See [valkey.io] for details. + // In cluster mode, if keys in `keyValueMap` map to different hash slots, the command + // will be split across these slots and executed separately for each. This means the command + // is atomic only at the slot level. If one or more slot-specific requests fail, the entire + // call will return the first encountered error, even though some requests may have succeeded + // while others did not. If this behavior impacts your application logic, consider splitting + // the request into sub-requests per slot to ensure atomicity. // // Parameters: // keyValueMap - A key-value map consisting of keys and their respective values to set. @@ -153,9 +156,12 @@ type StringCommands interface { // Retrieves the values of multiple keys. // // Note: - // When in cluster mode, the command may route to multiple nodes when keys map to different hash slots. - // - // See [valkey.io] for details. + // In cluster mode, if keys in `keyValueMap` map to different hash slots, the command + // will be split across these slots and executed separately for each. This means the command + // is atomic only at the slot level. If one or more slot-specific requests fail, the entire + // call will return the first encountered error, even though some requests may have succeeded + // while others did not. If this behavior impacts your application logic, consider splitting + // the request into sub-requests per slot to ensure atomicity. // // Parameters: // keys - A list of keys to retrieve values for. @@ -180,9 +186,12 @@ type StringCommands interface { // the entire operation fails. // // Note: - // When in cluster mode, all keys in keyValueMap must map to the same hash slot. - // - // See [valkey.io] for details. + // In cluster mode, if keys in `keyValueMap` map to different hash slots, the command + // will be split across these slots and executed separately for each. This means the command + // is atomic only at the slot level. If one or more slot-specific requests fail, the entire + // call will return the first encountered error, even though some requests may have succeeded + // while others did not. If this behavior impacts your application logic, consider splitting + // the request into sub-requests per slot to ensure atomicity. // // Parameters: // keyValueMap - A key-value map consisting of keys and their respective values to set. @@ -408,9 +417,12 @@ type StringCommands interface { // Valkey 7.0 and above. // // Note: - // When in cluster mode, key1 and key2 must map to the same hash slot. - // - // See [valkey.io] for details. + // In cluster mode, if keys in `keyValueMap` map to different hash slots, the command + // will be split across these slots and executed separately for each. This means the command + // is atomic only at the slot level. If one or more slot-specific requests fail, the entire + // call will return the first encountered error, even though some requests may have succeeded + // while others did not. If this behavior impacts your application logic, consider splitting + // the request into sub-requests per slot to ensure atomicity. // // Parameters: // key1 - The key that stores the first string. diff --git a/go/api/generic_commands.go b/go/api/generic_commands.go index ddd3b57c4d..b416f38e6d 100644 --- a/go/api/generic_commands.go +++ b/go/api/generic_commands.go @@ -13,7 +13,12 @@ type GenericBaseCommands interface { // Del removes the specified keys from the database. A key is ignored if it does not exist. // // Note: - //When in cluster mode, the command may route to multiple nodes when `keys` map to different hash slots. + // In cluster mode, if keys in `keyValueMap` map to different hash slots, the command + // will be split across these slots and executed separately for each. This means the command + // is atomic only at the slot level. If one or more slot-specific requests fail, the entire + // call will return the first encountered error, even though some requests may have succeeded + // while others did not. If this behavior impacts your application logic, consider splitting + // the request into sub-requests per slot to ensure atomicity. // // Parameters: // keys - One or more keys to delete. @@ -34,7 +39,12 @@ type GenericBaseCommands interface { // Exists returns the number of keys that exist in the database // // Note: - //When in cluster mode, the command may route to multiple nodes when keys map to different hash slots. + // In cluster mode, if keys in `keyValueMap` map to different hash slots, the command + // will be split across these slots and executed separately for each. This means the command + // is atomic only at the slot level. If one or more slot-specific requests fail, the entire + // call will return the first encountered error, even though some requests may have succeeded + // while others did not. If this behavior impacts your application logic, consider splitting + // the request into sub-requests per slot to ensure atomicity. // // Parameters: // keys - One or more keys to delete. From be8273df0e75d8af38b760dbcc33f1aa566f03d8 Mon Sep 17 00:00:00 2001 From: ort-bot Date: Tue, 26 Nov 2024 00:26:22 +0000 Subject: [PATCH 05/11] Updated attribution files Signed-off-by: ort-bot --- glide-core/THIRD_PARTY_LICENSES_RUST | 551 ++------------------------ java/THIRD_PARTY_LICENSES_JAVA | 551 ++------------------------ node/THIRD_PARTY_LICENSES_NODE | 555 ++------------------------- python/THIRD_PARTY_LICENSES_PYTHON | 553 ++------------------------ 4 files changed, 135 insertions(+), 2075 deletions(-) diff --git a/glide-core/THIRD_PARTY_LICENSES_RUST b/glide-core/THIRD_PARTY_LICENSES_RUST index d3389740db..37261a03ed 100644 --- a/glide-core/THIRD_PARTY_LICENSES_RUST +++ b/glide-core/THIRD_PARTY_LICENSES_RUST @@ -5435,7 +5435,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: dispose:0.5.0 +Package: dispose:0.5.2 The following copyrights and licenses were found in the source code of this package: @@ -5664,7 +5664,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: dispose-derive:0.4.0 +Package: dispose-derive:0.4.2 The following copyrights and licenses were found in the source code of this package: @@ -11012,7 +11012,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: itoa:1.0.11 +Package: itoa:1.0.14 The following copyrights and licenses were found in the source code of this package: @@ -11699,7 +11699,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: libc:0.2.162 +Package: libc:0.2.165 The following copyrights and licenses were found in the source code of this package: @@ -16913,465 +16913,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: proc-macro-error:1.0.4 - -The following copyrights and licenses were found in the source code of this package: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -- - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ----- - -Package: proc-macro-error-attr:1.0.4 - -The following copyrights and licenses were found in the source code of this package: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -- - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ----- - -Package: proc-macro2:1.0.89 +Package: proc-macro2:1.0.92 The following copyrights and licenses were found in the source code of this package: @@ -20315,7 +19857,7 @@ DEALINGS IN THE SOFTWARE. ---- -Package: schannel:0.1.26 +Package: schannel:0.1.27 The following copyrights and licenses were found in the source code of this package: @@ -22359,7 +21901,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: syn:2.0.87 +Package: syn:2.0.89 The following copyrights and licenses were found in the source code of this package: @@ -24864,7 +24406,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: tracing-core:0.1.32 +Package: tracing-core:0.1.33 The following copyrights and licenses were found in the source code of this package: @@ -25168,7 +24710,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: unicode-ident:1.0.13 +Package: unicode-ident:1.0.14 The following copyrights and licenses were found in the source code of this package: @@ -25397,63 +24939,36 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE - -Unicode Data Files include all data files under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, -http://www.unicode.org/cldr/data/, http://source.icu- -project.org/repos/icu/, and -http://www.unicode.org/utility/trac/browser/. - -Unicode Data Files do not include PDF online code charts under the -directory http://www.unicode.org/Public/. - -Software includes any source code published in the Unicode Standard or -under the directories http://www.unicode.org/Public/, -http://www.unicode.org/reports/, http://www.unicode.org/cldr/data/, -http://source.icu-project.org/repos/icu/, and -http://www.unicode.org/utility/trac/browser/. - -NOTICE TO USER: Carefully read the following legal agreement. BY -DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA -FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY -ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF -THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, -DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. +UNICODE LICENSE V3 COPYRIGHT AND PERMISSION NOTICE -Copyright © 1991-2016 Unicode, Inc. All rights reserved. Distributed -under the Terms of Use in http://www.unicode.org/copyright.html. - Permission is hereby granted, free of charge, to any person obtaining a -copy of the Unicode data files and any associated documentation (the -"Data Files") or Unicode software and any associated documentation (the -"Software") to deal in the Data Files or Software without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, and/or sell copies of the Data Files or Software, -and to permit persons to whom the Data Files or Software are furnished -to do so, provided that either - -(a) this copyright and permission notice appear with all copies of the -Data Files or Software, or - -(b) this copyright and permission notice appear in associated -Documentation. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR -ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. +copy of data files and any associated documentation (the "Data Files") or +software and any associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, and/or sell +copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that either (a) +this copyright and permission notice appear with all copies of the Data +Files or Software, or (b) this copyright and permission notice appear in +associated Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE +BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA +FILES OR SOFTWARE. Except as contained in this notice, the name of a copyright holder shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in these Data Files or Software without prior written +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written authorization of the copyright holder. ---- diff --git a/java/THIRD_PARTY_LICENSES_JAVA b/java/THIRD_PARTY_LICENSES_JAVA index c666e393ba..15f247cce4 100644 --- a/java/THIRD_PARTY_LICENSES_JAVA +++ b/java/THIRD_PARTY_LICENSES_JAVA @@ -5664,7 +5664,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: dispose:0.5.0 +Package: dispose:0.5.2 The following copyrights and licenses were found in the source code of this package: @@ -5893,7 +5893,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: dispose-derive:0.4.0 +Package: dispose-derive:0.4.2 The following copyrights and licenses were found in the source code of this package: @@ -11449,7 +11449,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: itoa:1.0.11 +Package: itoa:1.0.14 The following copyrights and licenses were found in the source code of this package: @@ -12594,7 +12594,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: libc:0.2.162 +Package: libc:0.2.165 The following copyrights and licenses were found in the source code of this package: @@ -17808,465 +17808,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: proc-macro-error:1.0.4 - -The following copyrights and licenses were found in the source code of this package: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -- - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ----- - -Package: proc-macro-error-attr:1.0.4 - -The following copyrights and licenses were found in the source code of this package: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -- - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ----- - -Package: proc-macro2:1.0.89 +Package: proc-macro2:1.0.92 The following copyrights and licenses were found in the source code of this package: @@ -21210,7 +20752,7 @@ DEALINGS IN THE SOFTWARE. ---- -Package: schannel:0.1.26 +Package: schannel:0.1.27 The following copyrights and licenses were found in the source code of this package: @@ -23254,7 +22796,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: syn:2.0.87 +Package: syn:2.0.89 The following copyrights and licenses were found in the source code of this package: @@ -25759,7 +25301,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: tracing-core:0.1.32 +Package: tracing-core:0.1.33 The following copyrights and licenses were found in the source code of this package: @@ -26063,7 +25605,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: unicode-ident:1.0.13 +Package: unicode-ident:1.0.14 The following copyrights and licenses were found in the source code of this package: @@ -26292,63 +25834,36 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE - -Unicode Data Files include all data files under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, -http://www.unicode.org/cldr/data/, http://source.icu- -project.org/repos/icu/, and -http://www.unicode.org/utility/trac/browser/. - -Unicode Data Files do not include PDF online code charts under the -directory http://www.unicode.org/Public/. - -Software includes any source code published in the Unicode Standard or -under the directories http://www.unicode.org/Public/, -http://www.unicode.org/reports/, http://www.unicode.org/cldr/data/, -http://source.icu-project.org/repos/icu/, and -http://www.unicode.org/utility/trac/browser/. - -NOTICE TO USER: Carefully read the following legal agreement. BY -DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA -FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY -ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF -THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, -DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. +UNICODE LICENSE V3 COPYRIGHT AND PERMISSION NOTICE -Copyright © 1991-2016 Unicode, Inc. All rights reserved. Distributed -under the Terms of Use in http://www.unicode.org/copyright.html. - Permission is hereby granted, free of charge, to any person obtaining a -copy of the Unicode data files and any associated documentation (the -"Data Files") or Unicode software and any associated documentation (the -"Software") to deal in the Data Files or Software without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, and/or sell copies of the Data Files or Software, -and to permit persons to whom the Data Files or Software are furnished -to do so, provided that either - -(a) this copyright and permission notice appear with all copies of the -Data Files or Software, or - -(b) this copyright and permission notice appear in associated -Documentation. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR -ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. +copy of data files and any associated documentation (the "Data Files") or +software and any associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, and/or sell +copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that either (a) +this copyright and permission notice appear with all copies of the Data +Files or Software, or (b) this copyright and permission notice appear in +associated Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE +BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA +FILES OR SOFTWARE. Except as contained in this notice, the name of a copyright holder shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in these Data Files or Software without prior written +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written authorization of the copyright holder. ---- diff --git a/node/THIRD_PARTY_LICENSES_NODE b/node/THIRD_PARTY_LICENSES_NODE index 85fa9c1801..ee3a5ad883 100644 --- a/node/THIRD_PARTY_LICENSES_NODE +++ b/node/THIRD_PARTY_LICENSES_NODE @@ -4571,7 +4571,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: ctor:0.2.8 +Package: ctor:0.2.9 The following copyrights and licenses were found in the source code of this package: @@ -5741,7 +5741,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: dispose:0.5.0 +Package: dispose:0.5.2 The following copyrights and licenses were found in the source code of this package: @@ -5970,7 +5970,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: dispose-derive:0.4.0 +Package: dispose-derive:0.4.2 The following copyrights and licenses were found in the source code of this package: @@ -11526,7 +11526,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: itoa:1.0.11 +Package: itoa:1.0.14 The following copyrights and licenses were found in the source code of this package: @@ -12213,7 +12213,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: libc:0.2.162 +Package: libc:0.2.165 The following copyrights and licenses were found in the source code of this package: @@ -17570,465 +17570,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: proc-macro-error:1.0.4 - -The following copyrights and licenses were found in the source code of this package: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -- - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ----- - -Package: proc-macro-error-attr:1.0.4 - -The following copyrights and licenses were found in the source code of this package: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -- - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ----- - -Package: proc-macro2:1.0.89 +Package: proc-macro2:1.0.92 The following copyrights and licenses were found in the source code of this package: @@ -21659,7 +21201,7 @@ DEALINGS IN THE SOFTWARE. ---- -Package: schannel:0.1.26 +Package: schannel:0.1.27 The following copyrights and licenses were found in the source code of this package: @@ -23932,7 +23474,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: syn:2.0.87 +Package: syn:2.0.89 The following copyrights and licenses were found in the source code of this package: @@ -26895,7 +26437,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: tracing-core:0.1.32 +Package: tracing-core:0.1.33 The following copyrights and licenses were found in the source code of this package: @@ -27199,7 +26741,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: unicode-ident:1.0.13 +Package: unicode-ident:1.0.14 The following copyrights and licenses were found in the source code of this package: @@ -27428,63 +26970,36 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE - -Unicode Data Files include all data files under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, -http://www.unicode.org/cldr/data/, http://source.icu- -project.org/repos/icu/, and -http://www.unicode.org/utility/trac/browser/. - -Unicode Data Files do not include PDF online code charts under the -directory http://www.unicode.org/Public/. - -Software includes any source code published in the Unicode Standard or -under the directories http://www.unicode.org/Public/, -http://www.unicode.org/reports/, http://www.unicode.org/cldr/data/, -http://source.icu-project.org/repos/icu/, and -http://www.unicode.org/utility/trac/browser/. - -NOTICE TO USER: Carefully read the following legal agreement. BY -DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA -FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY -ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF -THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, -DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. +UNICODE LICENSE V3 COPYRIGHT AND PERMISSION NOTICE -Copyright © 1991-2016 Unicode, Inc. All rights reserved. Distributed -under the Terms of Use in http://www.unicode.org/copyright.html. - Permission is hereby granted, free of charge, to any person obtaining a -copy of the Unicode data files and any associated documentation (the -"Data Files") or Unicode software and any associated documentation (the -"Software") to deal in the Data Files or Software without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, and/or sell copies of the Data Files or Software, -and to permit persons to whom the Data Files or Software are furnished -to do so, provided that either - -(a) this copyright and permission notice appear with all copies of the -Data Files or Software, or - -(b) this copyright and permission notice appear in associated -Documentation. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR -ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. +copy of data files and any associated documentation (the "Data Files") or +software and any associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, and/or sell +copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that either (a) +this copyright and permission notice appear with all copies of the Data +Files or Software, or (b) this copyright and permission notice appear in +associated Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE +BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA +FILES OR SOFTWARE. Except as contained in this notice, the name of a copyright holder shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in these Data Files or Software without prior written +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written authorization of the copyright holder. ---- @@ -35371,7 +34886,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- -Package: @types:node:22.9.0 +Package: @types:node:22.9.4 The following copyrights and licenses were found in the source code of this package: diff --git a/python/THIRD_PARTY_LICENSES_PYTHON b/python/THIRD_PARTY_LICENSES_PYTHON index cfc625b8bb..932648a8f3 100644 --- a/python/THIRD_PARTY_LICENSES_PYTHON +++ b/python/THIRD_PARTY_LICENSES_PYTHON @@ -5435,7 +5435,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: dispose:0.5.0 +Package: dispose:0.5.2 The following copyrights and licenses were found in the source code of this package: @@ -5664,7 +5664,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: dispose-derive:0.4.0 +Package: dispose-derive:0.4.2 The following copyrights and licenses were found in the source code of this package: @@ -11449,7 +11449,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: itoa:1.0.11 +Package: itoa:1.0.14 The following copyrights and licenses were found in the source code of this package: @@ -12136,7 +12136,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: libc:0.2.162 +Package: libc:0.2.165 The following copyrights and licenses were found in the source code of this package: @@ -16917,7 +16917,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: portable-atomic:1.9.0 +Package: portable-atomic:1.10.0 The following copyrights and licenses were found in the source code of this package: @@ -17604,465 +17604,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: proc-macro-error:1.0.4 - -The following copyrights and licenses were found in the source code of this package: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -- - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ----- - -Package: proc-macro-error-attr:1.0.4 - -The following copyrights and licenses were found in the source code of this package: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -- - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ----- - -Package: proc-macro2:1.0.89 +Package: proc-macro2:1.0.92 The following copyrights and licenses were found in the source code of this package: @@ -22151,7 +21693,7 @@ DEALINGS IN THE SOFTWARE. ---- -Package: schannel:0.1.26 +Package: schannel:0.1.27 The following copyrights and licenses were found in the source code of this package: @@ -24195,7 +23737,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: syn:2.0.87 +Package: syn:2.0.89 The following copyrights and licenses were found in the source code of this package: @@ -26924,7 +26466,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: tracing-core:0.1.32 +Package: tracing-core:0.1.33 The following copyrights and licenses were found in the source code of this package: @@ -27228,7 +26770,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: unicode-ident:1.0.13 +Package: unicode-ident:1.0.14 The following copyrights and licenses were found in the source code of this package: @@ -27457,63 +26999,36 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE - -Unicode Data Files include all data files under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, -http://www.unicode.org/cldr/data/, http://source.icu- -project.org/repos/icu/, and -http://www.unicode.org/utility/trac/browser/. - -Unicode Data Files do not include PDF online code charts under the -directory http://www.unicode.org/Public/. - -Software includes any source code published in the Unicode Standard or -under the directories http://www.unicode.org/Public/, -http://www.unicode.org/reports/, http://www.unicode.org/cldr/data/, -http://source.icu-project.org/repos/icu/, and -http://www.unicode.org/utility/trac/browser/. - -NOTICE TO USER: Carefully read the following legal agreement. BY -DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA -FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY -ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF -THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, -DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. +UNICODE LICENSE V3 COPYRIGHT AND PERMISSION NOTICE -Copyright © 1991-2016 Unicode, Inc. All rights reserved. Distributed -under the Terms of Use in http://www.unicode.org/copyright.html. - Permission is hereby granted, free of charge, to any person obtaining a -copy of the Unicode data files and any associated documentation (the -"Data Files") or Unicode software and any associated documentation (the -"Software") to deal in the Data Files or Software without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, and/or sell copies of the Data Files or Software, -and to permit persons to whom the Data Files or Software are furnished -to do so, provided that either - -(a) this copyright and permission notice appear with all copies of the -Data Files or Software, or - -(b) this copyright and permission notice appear in associated -Documentation. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR -ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. +copy of data files and any associated documentation (the "Data Files") or +software and any associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, and/or sell +copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that either (a) +this copyright and permission notice appear with all copies of the Data +Files or Software, or (b) this copyright and permission notice appear in +associated Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE +BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA +FILES OR SOFTWARE. Except as contained in this notice, the name of a copyright holder shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in these Data Files or Software without prior written +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written authorization of the copyright holder. ---- From e987bbc4e3047cfd9417b998fb8441d1810c6be7 Mon Sep 17 00:00:00 2001 From: ort-bot Date: Tue, 26 Nov 2024 14:37:13 +0000 Subject: [PATCH 06/11] Updated attribution files Signed-off-by: ort-bot --- node/THIRD_PARTY_LICENSES_NODE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/THIRD_PARTY_LICENSES_NODE b/node/THIRD_PARTY_LICENSES_NODE index ee3a5ad883..a14c4e4298 100644 --- a/node/THIRD_PARTY_LICENSES_NODE +++ b/node/THIRD_PARTY_LICENSES_NODE @@ -34551,7 +34551,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- -Package: undici-types:6.19.8 +Package: undici-types:6.20.0 The following copyrights and licenses were found in the source code of this package: @@ -34886,7 +34886,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- -Package: @types:node:22.9.4 +Package: @types:node:22.10.0 The following copyrights and licenses were found in the source code of this package: From f9a5d453ff8a19811436dd7817cc0c3c0e1a9828 Mon Sep 17 00:00:00 2001 From: ikolomi Date: Tue, 26 Nov 2024 16:44:33 +0200 Subject: [PATCH 07/11] Fix for ORT sweeper: Ensure multiple release-* branches are parsed correctly by removing newlines between branch names. Signed-off-by: ikolomi --- .github/workflows/ort-sweeper.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ort-sweeper.yml b/.github/workflows/ort-sweeper.yml index 25482f9737..f301901666 100644 --- a/.github/workflows/ort-sweeper.yml +++ b/.github/workflows/ort-sweeper.yml @@ -16,7 +16,7 @@ jobs: id: get-branches run: | # Get all branches matching 'release-*' and include 'main' - branches=$(git ls-remote --heads origin | awk -F'/' '/refs\/heads\/release-/ {print $NF}') + branches=$(git ls-remote --heads origin | awk -F'/' '/refs\/heads\/release-/ {printf $NF" "}') branches="main $branches" echo "::set-output name=branches::$branches" env: From 946dfdc35921e8e81ec21c71c65561116dcb395e Mon Sep 17 00:00:00 2001 From: Niharika Bhavaraju Date: Wed, 27 Nov 2024 09:53:41 +0000 Subject: [PATCH 08/11] Fixed failing tests due to version. Signed-off-by: Niharika Bhavaraju --- go/integTest/shared_commands_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/go/integTest/shared_commands_test.go b/go/integTest/shared_commands_test.go index b12314c3cf..ab127310f7 100644 --- a/go/integTest/shared_commands_test.go +++ b/go/integTest/shared_commands_test.go @@ -2560,6 +2560,7 @@ func (suite *GlideTestSuite) TestExpire_KeyDoesNotExist() { } func (suite *GlideTestSuite) TestExpireWithOptions_HasNoExpiry() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2583,6 +2584,7 @@ func (suite *GlideTestSuite) TestExpireWithOptions_HasNoExpiry() { } func (suite *GlideTestSuite) TestExpireWithOptions_HasExistingExpiry() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2607,6 +2609,7 @@ func (suite *GlideTestSuite) TestExpireWithOptions_HasExistingExpiry() { } func (suite *GlideTestSuite) TestExpireWithOptions_NewExpiryGreaterThanCurrent() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2627,6 +2630,7 @@ func (suite *GlideTestSuite) TestExpireWithOptions_NewExpiryGreaterThanCurrent() } func (suite *GlideTestSuite) TestExpireWithOptions_NewExpiryLessThanCurrent() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2655,6 +2659,7 @@ func (suite *GlideTestSuite) TestExpireWithOptions_NewExpiryLessThanCurrent() { } func (suite *GlideTestSuite) TestExpireAtWithOptions_HasNoExpiry() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2677,6 +2682,7 @@ func (suite *GlideTestSuite) TestExpireAtWithOptions_HasNoExpiry() { } func (suite *GlideTestSuite) TestExpireAtWithOptions_HasExistingExpiry() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2695,6 +2701,7 @@ func (suite *GlideTestSuite) TestExpireAtWithOptions_HasExistingExpiry() { }) } func (suite *GlideTestSuite) TestExpireAtWithOptions_NewExpiryGreaterThanCurrent() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2716,6 +2723,7 @@ func (suite *GlideTestSuite) TestExpireAtWithOptions_NewExpiryGreaterThanCurrent } func (suite *GlideTestSuite) TestExpireAtWithOptions_NewExpiryLessThanCurrent() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2763,6 +2771,7 @@ func (suite *GlideTestSuite) TestPExpire() { } func (suite *GlideTestSuite) TestPExpireWithOptions_HasExistingExpiry() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2790,6 +2799,7 @@ func (suite *GlideTestSuite) TestPExpireWithOptions_HasExistingExpiry() { } func (suite *GlideTestSuite) TestPExpireWithOptions_HasNoExpiry() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2812,6 +2822,7 @@ func (suite *GlideTestSuite) TestPExpireWithOptions_HasNoExpiry() { } func (suite *GlideTestSuite) TestPExpireWithOptions_NewExpiryGreaterThanCurrent() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2839,6 +2850,7 @@ func (suite *GlideTestSuite) TestPExpireWithOptions_NewExpiryGreaterThanCurrent( } func (suite *GlideTestSuite) TestPExpireWithOptions_NewExpiryLessThanCurrent() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2888,6 +2900,7 @@ func (suite *GlideTestSuite) TestPExpireAt() { } func (suite *GlideTestSuite) TestPExpireAtWithOptions_HasNoExpiry() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2908,6 +2921,7 @@ func (suite *GlideTestSuite) TestPExpireAtWithOptions_HasNoExpiry() { } func (suite *GlideTestSuite) TestPExpireAtWithOptions_HasExistingExpiry() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2931,6 +2945,7 @@ func (suite *GlideTestSuite) TestPExpireAtWithOptions_HasExistingExpiry() { } func (suite *GlideTestSuite) TestPExpireAtWithOptions_NewExpiryGreaterThanCurrent() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2956,6 +2971,7 @@ func (suite *GlideTestSuite) TestPExpireAtWithOptions_NewExpiryGreaterThanCurren } func (suite *GlideTestSuite) TestPExpireAtWithOptions_NewExpiryLessThanCurrent() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -2982,6 +2998,7 @@ func (suite *GlideTestSuite) TestPExpireAtWithOptions_NewExpiryLessThanCurrent() } func (suite *GlideTestSuite) TestExpireTime() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -3010,6 +3027,7 @@ func (suite *GlideTestSuite) TestExpireTime() { } func (suite *GlideTestSuite) TestExpireTime_KeyDoesNotExist() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() @@ -3022,6 +3040,7 @@ func (suite *GlideTestSuite) TestExpireTime_KeyDoesNotExist() { } func (suite *GlideTestSuite) TestPExpireTime() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() value := uuid.New().String() @@ -3050,6 +3069,7 @@ func (suite *GlideTestSuite) TestPExpireTime() { } func (suite *GlideTestSuite) TestPExpireTime_KeyDoesNotExist() { + suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { key := uuid.New().String() From 66f9f66ba7b732e5f13267509894d1888b3ff12f Mon Sep 17 00:00:00 2001 From: Niharika Bhavaraju Date: Thu, 28 Nov 2024 03:41:54 +0000 Subject: [PATCH 09/11] Minor test case fix Signed-off-by: Niharika Bhavaraju --- go/integTest/shared_commands_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/go/integTest/shared_commands_test.go b/go/integTest/shared_commands_test.go index ab127310f7..570a01ad0a 100644 --- a/go/integTest/shared_commands_test.go +++ b/go/integTest/shared_commands_test.go @@ -2952,18 +2952,18 @@ func (suite *GlideTestSuite) TestPExpireAtWithOptions_NewExpiryGreaterThanCurren suite.verifyOK(client.Set(key, value)) - initialExpire := 500 - resultExpire, err := client.PExpire(key, int64(initialExpire)) + initialExpire := time.Now().UnixMilli() + 1000 + resultExpire, err := client.PExpireAt(key, initialExpire) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpire.Value()) - newExpire := time.Now().Unix()*1000 + 1000 + newExpire := time.Now().UnixMilli() + 2000 resultExpireWithOptions, err := client.PExpireAtWithOptions(key, newExpire, api.NewExpiryGreaterThanCurrent) assert.Nil(suite.T(), err) assert.True(suite.T(), resultExpireWithOptions.Value()) - time.Sleep(1100 * time.Millisecond) + time.Sleep(2100 * time.Millisecond) resultExist, err := client.Exists([]string{key}) assert.Nil(suite.T(), err) assert.Equal(suite.T(), int64(0), resultExist.Value()) From 1de6214540fe6b275838f10cf2bbeda1e8be36ea Mon Sep 17 00:00:00 2001 From: Niharika Bhavaraju Date: Mon, 9 Dec 2024 12:15:01 +0000 Subject: [PATCH 10/11] Fixed code review comments Signed-off-by: Niharika Bhavaraju --- go/api/base_client.go | 8 ++++---- go/api/generic_commands.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go/api/base_client.go b/go/api/base_client.go index 12eff44a12..a081d3dc29 100644 --- a/go/api/base_client.go +++ b/go/api/base_client.go @@ -972,7 +972,7 @@ func (client *baseClient) ExpireWithOptions(key string, seconds int64, expireCon if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.Expire, append([]string{key, utils.IntToString(seconds), expireConditionStr})) + result, err := client.executeCommand(C.Expire, []string{key, utils.IntToString(seconds), expireConditionStr}) if err != nil { return CreateNilBoolResult(), err } @@ -993,7 +993,7 @@ func (client *baseClient) ExpireAtWithOptions(key string, unixTimestampInSeconds if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.ExpireAt, append([]string{key, utils.IntToString(unixTimestampInSeconds), expireConditionStr})) + result, err := client.executeCommand(C.ExpireAt, []string{key, utils.IntToString(unixTimestampInSeconds), expireConditionStr}) if err != nil { return CreateNilBoolResult(), err } @@ -1013,7 +1013,7 @@ func (client *baseClient) PExpireWithOptions(key string, milliseconds int64, exp if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.PExpire, append([]string{key, utils.IntToString(milliseconds), expireConditionStr})) + result, err := client.executeCommand(C.PExpire, []string{key, utils.IntToString(milliseconds), expireConditionStr}) if err != nil { return CreateNilBoolResult(), err } @@ -1033,7 +1033,7 @@ func (client *baseClient) PExpireAtWithOptions(key string, unixTimestampInMilliS if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.PExpireAt, append([]string{key, utils.IntToString(unixTimestampInMilliSeconds), expireConditionStr})) + result, err := client.executeCommand(C.PExpireAt, []string{key, utils.IntToString(unixTimestampInMilliSeconds), expireConditionStr}) if err != nil { return CreateNilBoolResult(), err } diff --git a/go/api/generic_commands.go b/go/api/generic_commands.go index b416f38e6d..045807703e 100644 --- a/go/api/generic_commands.go +++ b/go/api/generic_commands.go @@ -47,7 +47,7 @@ type GenericBaseCommands interface { // the request into sub-requests per slot to ensure atomicity. // // Parameters: - // keys - One or more keys to delete. + // keys - One or more keys to check if they exist. // // Return value: // Returns the number of existing keys. From e14b620e439753d6ed21eceef55ac3146261eaee Mon Sep 17 00:00:00 2001 From: Niharika Bhavaraju Date: Fri, 13 Dec 2024 05:59:52 +0000 Subject: [PATCH 11/11] Fixed lint errors Signed-off-by: Niharika Bhavaraju --- go/api/base_client.go | 28 +++++++++++++++++++++++----- go/api/generic_commands.go | 10 ++++++---- go/integTest/shared_commands_test.go | 2 +- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/go/api/base_client.go b/go/api/base_client.go index 20d5fbba21..7358dd5faf 100644 --- a/go/api/base_client.go +++ b/go/api/base_client.go @@ -997,12 +997,19 @@ func (client *baseClient) ExpireAt(key string, unixTimestampInSeconds int64) (Re return handleBooleanResponse(result) } -func (client *baseClient) ExpireAtWithOptions(key string, unixTimestampInSeconds int64, expireCondition ExpireCondition) (Result[bool], error) { +func (client *baseClient) ExpireAtWithOptions( + key string, + unixTimestampInSeconds int64, + expireCondition ExpireCondition, +) (Result[bool], error) { expireConditionStr, err := expireCondition.toString() if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.ExpireAt, []string{key, utils.IntToString(unixTimestampInSeconds), expireConditionStr}) + result, err := client.executeCommand( + C.ExpireAt, + []string{key, utils.IntToString(unixTimestampInSeconds), expireConditionStr}, + ) if err != nil { return CreateNilBoolResult(), err } @@ -1017,7 +1024,11 @@ func (client *baseClient) PExpire(key string, milliseconds int64) (Result[bool], return handleBooleanResponse(result) } -func (client *baseClient) PExpireWithOptions(key string, milliseconds int64, expireCondition ExpireCondition) (Result[bool], error) { +func (client *baseClient) PExpireWithOptions( + key string, + milliseconds int64, + expireCondition ExpireCondition, +) (Result[bool], error) { expireConditionStr, err := expireCondition.toString() if err != nil { return CreateNilBoolResult(), err @@ -1037,12 +1048,19 @@ func (client *baseClient) PExpireAt(key string, unixTimestampInMilliSeconds int6 return handleBooleanResponse(result) } -func (client *baseClient) PExpireAtWithOptions(key string, unixTimestampInMilliSeconds int64, expireCondition ExpireCondition) (Result[bool], error) { +func (client *baseClient) PExpireAtWithOptions( + key string, + unixTimestampInMilliSeconds int64, + expireCondition ExpireCondition, +) (Result[bool], error) { expireConditionStr, err := expireCondition.toString() if err != nil { return CreateNilBoolResult(), err } - result, err := client.executeCommand(C.PExpireAt, []string{key, utils.IntToString(unixTimestampInMilliSeconds), expireConditionStr}) + result, err := client.executeCommand( + C.PExpireAt, + []string{key, utils.IntToString(unixTimestampInMilliSeconds), expireConditionStr}, + ) if err != nil { return CreateNilBoolResult(), err } diff --git a/go/api/generic_commands.go b/go/api/generic_commands.go index 045807703e..090442ec68 100644 --- a/go/api/generic_commands.go +++ b/go/api/generic_commands.go @@ -103,8 +103,9 @@ type GenericBaseCommands interface { // [valkey.io]: https://valkey.io/commands/expire/ ExpireWithOptions(key string, seconds int64, expireCondition ExpireCondition) (Result[bool], error) - // ExpireAt sets a timeout on key. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of specifying the number of seconds. - // A timestamp in the past will delete the key immediately. After the timeout has expired, the key will automatically be deleted. + // ExpireAt sets a timeout on key. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of + // specifying the number of seconds. A timestamp in the past will delete the key immediately. After the timeout has + // expired, the key will automatically be deleted. // If key already has an existing expire set, the time to live is updated to the new value. // The timeout will only be cleared by commands that delete or overwrite the contents of key // If key already has an existing expire set, the time to live is updated to the new value. @@ -126,8 +127,9 @@ type GenericBaseCommands interface { // [valkey.io]: https://valkey.io/commands/expireat/ ExpireAt(key string, unixTimestampInSeconds int64) (Result[bool], error) - // ExpireAt sets a timeout on key. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of specifying the number of seconds. - // A timestamp in the past will delete the key immediately. After the timeout has expired, the key will automatically be deleted. + // ExpireAt sets a timeout on key. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of + // specifying the number of seconds. A timestamp in the past will delete the key immediately. After the timeout has + // expired, the key will automatically be deleted. // If key already has an existing expire set, the time to live is updated to the new value. // The timeout will only be cleared by commands that delete or overwrite the contents of key // If key already has an existing expire set, the time to live is updated to the new value. diff --git a/go/integTest/shared_commands_test.go b/go/integTest/shared_commands_test.go index bf168819dd..fa79122354 100644 --- a/go/integTest/shared_commands_test.go +++ b/go/integTest/shared_commands_test.go @@ -2795,6 +2795,7 @@ func (suite *GlideTestSuite) TestExpireAtWithOptions_HasExistingExpiry() { assert.True(suite.T(), resultExpireWithOptions.Value()) }) } + func (suite *GlideTestSuite) TestExpireAtWithOptions_NewExpiryGreaterThanCurrent() { suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { @@ -3124,7 +3125,6 @@ func (suite *GlideTestSuite) TestExpireTime() { func (suite *GlideTestSuite) TestExpireTime_KeyDoesNotExist() { suite.SkipIfServerVersionLowerThanBy("7.0.0") suite.runWithDefaultClients(func(client api.BaseClient) { - key := uuid.New().String() // Call ExpireTime on a key that doesn't exist