From 49198ed92e52585b3c742f57388af2365639416d Mon Sep 17 00:00:00 2001 From: Michael Dockter Date: Fri, 19 Apr 2024 11:55:44 -0400 Subject: [PATCH] 126.dockter.3 (#144) * #126 move szinterface to sz * #126 Rename SzConfig methods * #126 Rename SzConfig methods * #126 Update dependencies * #126 Delete obsolete code * #126 Update SzAbstractFactory * #126 Remove non-senzing API method signatures * #126 Refactor to sorted order * #126 Update workflows * #126 Modify szabstractfactory method names * #126 Remove ReplaceRecord() * #126 Normalize DataSource capitalization * #126 Updated szerror * #126 Prepare for versioned release * #126 Prepare for versioned release --- .github/workflows/gosec.yaml | 2 +- CHANGELOG.md | 7 +++ bin/response-testcases.json | 19 ------ go.mod | 11 +--- go.sum | 33 +++++------ main.go | 29 +--------- senzing/unmarshal.go | 6 -- senzing/unmarshal_test.go | 9 +-- {szinterface => sz}/flags.go | 2 +- {szinterface => sz}/main.go | 67 +++++----------------- {szinterface => sz}/parameters.go | 4 +- szinterface/szapi_test.go => sz/sz_test.go | 2 +- szerror/main.go | 58 +++++++++---------- szerror/szerror.go | 2 +- szerror/szerror_test.go | 2 +- 15 files changed, 74 insertions(+), 179 deletions(-) rename {szinterface => sz}/flags.go (99%) rename {szinterface => sz}/main.go (64%) rename {szinterface => sz}/parameters.go (81%) rename szinterface/szapi_test.go => sz/sz_test.go (99%) diff --git a/.github/workflows/gosec.yaml b/.github/workflows/gosec.yaml index 44ccbb7..2a3b8b2 100644 --- a/.github/workflows/gosec.yaml +++ b/.github/workflows/gosec.yaml @@ -22,6 +22,6 @@ jobs: uses: actions/checkout@v4 - name: run Gosec Security Scanner - uses: securego/gosec@master + uses: securego/gosec@v2.19.0 with: args: ./... diff --git a/CHANGELOG.md b/CHANGELOG.md index 1312fac..a93e8ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - +## [0.12.0] - 2024-04-19 + +### Changed in 0.12.0 + +- Updated to Senzing V4 method signatures +- Updated dependencies + ## [0.11.1] - 2024-04-02 ### Changed in 0.11.1 diff --git a/bin/response-testcases.json b/bin/response-testcases.json index 9386812..9213979 100644 --- a/bin/response-testcases.json +++ b/bin/response-testcases.json @@ -44509,25 +44509,6 @@ } } }, - "SzEngineReplaceRecordResponse": { - "tests": { - "test-001": { - "AFFECTED_ENTITIES": [ - { - "ENTITY_ID": 1 - }, - { - "ENTITY_ID": 1 - } - ], - "DATA_SOURCE": "blank", - "INTERESTING_ENTITIES": { - "ENTITIES": [] - }, - "RECORD_ID": "blank" - } - } - }, "SzEngineSearchByAttributesResponse": { "tests": { "test-001": { diff --git a/go.mod b/go.mod index c735cf9..3fa7525 100644 --- a/go.mod +++ b/go.mod @@ -4,20 +4,15 @@ go 1.21 require ( github.com/aquilax/truncate v1.0.0 - github.com/senzing-garage/go-observing v0.3.0 github.com/senzing-garage/sz-sdk-json-type-definition v0.2.4 github.com/stretchr/testify v1.9.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/protobuf v1.5.4 // indirect + github.com/kr/pretty v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.22.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/grpc v1.62.1 // indirect - google.golang.org/protobuf v1.33.0 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect + gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 87a4853..7605cf8 100644 --- a/go.sum +++ b/go.sum @@ -1,32 +1,27 @@ github.com/aquilax/truncate v1.0.0 h1:UgIGS8U/aZ4JyOJ2h3xcF5cSQ06+gGBnjxH2RUHJe0U= github.com/aquilax/truncate v1.0.0/go.mod h1:BeMESIDMlvlS3bmg4BVvBbbZUNwWtS8uzYPAKXwwhLw= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/senzing-garage/go-observing v0.3.0 h1:uWKZtiW4dwQJx8i7Y+7QrdrBJ8NPSOTZu2+6q0gy1DI= -github.com/senzing-garage/go-observing v0.3.0/go.mod h1:Bxl4c7G9hQ8iqSxZp/omolUhmkEdrbCzLt0s0VkPdnw= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/senzing-garage/sz-sdk-json-type-definition v0.2.4 h1:mM3yu8Ntbupl92I78Z1VzOMguL7/4oI/0LmfB8pLifM= github.com/senzing-garage/sz-sdk-json-type-definition v0.2.4/go.mod h1:UlKL1vflvcE8rNOpbptlNiw57SixFAUWk5ftu5gHL9Y= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= -google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/main.go b/main.go index 36c410f..62c2428 100644 --- a/main.go +++ b/main.go @@ -2,31 +2,4 @@ */ package main -func main() { - // ctx := context.TODO() - - // Create a Subject. - - // mySenzing := &senzing.SenzingImpl{ - // GrpcDialOptions: []grpc.DialOption{}, - // GrpcTarget: "", - // ObserverOrigin: "", - // Observers: []observer.Observer{}, - // } - - // G2 style. - - // g2Engine := mySenzing.GetG2Engine(ctx) - // jsonString := `` - // result, err := g2Engine.AddRecord(jsonString) - - // Senzing style. - - // engine := mySenzing.GetEngine(ctx) - // engineAddRecordRequest := &senzing.EngineAddRecordRequest{} // Uses existing import of senzing - // engineAddRecordRequest := &engine.AddRecordRequest{} // Requires an import of senzing/engine - - // engineAddRecordResponse, err := engine.AddRecord(engineAddRecordRequest) - // x := engineAddRecordResponse.Bob - -} +func main() {} diff --git a/senzing/unmarshal.go b/senzing/unmarshal.go index 4e45915..5158f2b 100644 --- a/senzing/unmarshal.go +++ b/senzing/unmarshal.go @@ -151,12 +151,6 @@ func UnmarshalSzEngineReevaluateRecordResponse(ctx context.Context, jsonString s return result, err } -func UnmarshalSzEngineReplaceRecordResponse(ctx context.Context, jsonString string) (*typedef.SzEngineReplaceRecordResponse, error) { - result := &typedef.SzEngineReplaceRecordResponse{} - err := json.Unmarshal([]byte(jsonString), result) - return result, err -} - func UnmarshalSzEngineSearchByAttributesResponse(ctx context.Context, jsonString string) (*typedef.SzEngineSearchByAttributesResponse, error) { result := &typedef.SzEngineSearchByAttributesResponse{} err := json.Unmarshal([]byte(jsonString), result) diff --git a/senzing/unmarshal_test.go b/senzing/unmarshal_test.go index 25d4df8..f6fffc0 100644 --- a/senzing/unmarshal_test.go +++ b/senzing/unmarshal_test.go @@ -1,7 +1,7 @@ // DO NOT EDIT. This code is generated. // Generated by: sz-sdk-go/bin/generate_senzing_unmarshal_test.py // Generated for: sz-sdk-go/senzing/unmarshal_test.go -// Generated date: 2024-04-02T15:02:30.657781+00:00 +// Generated date: 2024-04-17T20:16:34.055460+00:00 package senzing @@ -1099,13 +1099,6 @@ func TestSzEngineReevaluateRecordResponseTest001(test *testing.T) { testError(test, ctx, err) printActual(test, result) } -func TestSzEngineReplaceRecordResponseTest001(test *testing.T) { - ctx := context.TODO() - jsonString := `{"AFFECTED_ENTITIES":[{"ENTITY_ID":1},{"ENTITY_ID":1}],"DATA_SOURCE":"blank","INTERESTING_ENTITIES":{"ENTITIES":[]},"RECORD_ID":"blank"}` - result, err := UnmarshalSzEngineReplaceRecordResponse(ctx, jsonString) - testError(test, ctx, err) - printActual(test, result) -} func TestSzEngineSearchByAttributesResponseTest001(test *testing.T) { ctx := context.TODO() jsonString := `{"RESOLVED_ENTITIES":[],"SEARCH_STATISTICS":[{"CANDIDATE_KEYS":{"FEATURE_TYPES":[{"FOUND":1,"FTYPE_CODE":"blank","GENERIC":1,"NOT_FOUND":1},{"FOUND":1,"FTYPE_CODE":"blank","GENERIC":1,"NOT_FOUND":1},{"FOUND":1,"FTYPE_CODE":"blank","GENERIC":1,"NOT_FOUND":1}],"SUMMARY":{"FOUND":1,"GENERIC":1,"NOT_FOUND":1}}}]}` diff --git a/szinterface/flags.go b/sz/flags.go similarity index 99% rename from szinterface/flags.go rename to sz/flags.go index df68017..b59e2de 100644 --- a/szinterface/flags.go +++ b/sz/flags.go @@ -1,4 +1,4 @@ -package szinterface +package sz // ---------------------------------------------------------------------------- // Constants diff --git a/szinterface/main.go b/sz/main.go similarity index 64% rename from szinterface/main.go rename to sz/main.go index 43dc13e..0fa0f26 100644 --- a/szinterface/main.go +++ b/sz/main.go @@ -1,9 +1,7 @@ -package szinterface +package sz import ( "context" - - "github.com/senzing-garage/go-observing/observer" ) // ---------------------------------------------------------------------------- @@ -20,23 +18,25 @@ type StringFragment struct { // Types - interface // ---------------------------------------------------------------------------- +// The SzAbstractFactory interface is the interface for all Senzing factories in the Abstract Factory pattern +type SzAbstractFactory interface { + CreateSzConfig(ctx context.Context) (SzConfig, error) + CreateSzConfigManager(ctx context.Context) (SzConfigManager, error) + CreateSzDiagnostic(ctx context.Context) (SzDiagnostic, error) + CreateSzEngine(ctx context.Context) (SzEngine, error) + CreateSzProduct(ctx context.Context) (SzProduct, error) +} + // The SzConfig interface is a Golang representation of Senzing's libg2config.h type SzConfig interface { AddDataSource(ctx context.Context, configHandle uintptr, dataSourceCode string) (string, error) - Close(ctx context.Context, configHandle uintptr) error - Create(ctx context.Context) (uintptr, error) + CloseConfig(ctx context.Context, configHandle uintptr) error + CreateConfig(ctx context.Context) (uintptr, error) DeleteDataSource(ctx context.Context, configHandle uintptr, dataSourceCode string) error Destroy(ctx context.Context) error + ExportConfig(ctx context.Context, configHandle uintptr) (string, error) GetDataSources(ctx context.Context, configHandle uintptr) (string, error) - GetJsonString(ctx context.Context, configHandle uintptr) (string, error) - GetObserverOrigin(ctx context.Context) string - GetSdkId(ctx context.Context) string - Initialize(ctx context.Context, instanceName string, settings string, verboseLogging int64) error - Load(ctx context.Context, configDefinition string) (uintptr, error) - RegisterObserver(ctx context.Context, observer observer.Observer) error - SetLogLevel(ctx context.Context, logLevelName string) error - SetObserverOrigin(ctx context.Context, origin string) - UnregisterObserver(ctx context.Context, observer observer.Observer) error + ImportConfig(ctx context.Context, configDefinition string) (uintptr, error) } // The SzConfigManager interface is a Golang representation of Senzing's libg2configmgr.h @@ -46,30 +46,16 @@ type SzConfigManager interface { GetConfig(ctx context.Context, configId int64) (string, error) GetConfigList(ctx context.Context) (string, error) GetDefaultConfigId(ctx context.Context) (int64, error) - GetObserverOrigin(ctx context.Context) string - GetSdkId(ctx context.Context) string - Initialize(ctx context.Context, instanceName string, settings string, verboseLogging int64) error - RegisterObserver(ctx context.Context, observer observer.Observer) error ReplaceDefaultConfigId(ctx context.Context, currentDefaultConfigId int64, newDefaultConfigId int64) error SetDefaultConfigId(ctx context.Context, configId int64) error - SetLogLevel(ctx context.Context, logLevelName string) error - SetObserverOrigin(ctx context.Context, origin string) - UnregisterObserver(ctx context.Context, observer observer.Observer) error } // The SzDiagnostic interface is a Golang representation of Senzing's libg2diagnostic.h type SzDiagnostic interface { CheckDatabasePerformance(ctx context.Context, secondsToRun int) (string, error) Destroy(ctx context.Context) error - GetObserverOrigin(ctx context.Context) string - GetSdkId(ctx context.Context) string - Initialize(ctx context.Context, instanceName string, settings string, verboseLogging int64, configId int64) error PurgeRepository(ctx context.Context) error - RegisterObserver(ctx context.Context, observer observer.Observer) error Reinitialize(ctx context.Context, configId int64) error - SetLogLevel(ctx context.Context, logLevelName string) error - SetObserverOrigin(ctx context.Context, origin string) - UnregisterObserver(ctx context.Context, observer observer.Observer) error } // The SzEngine interface is a Golang representation of Senzing's libg2.h @@ -91,51 +77,26 @@ type SzEngine interface { GetActiveConfigId(ctx context.Context) (int64, error) GetEntityByEntityId(ctx context.Context, entityId int64, flags int64) (string, error) GetEntityByRecordId(ctx context.Context, dataSourceCode string, recordId string, flags int64) (string, error) - GetObserverOrigin(ctx context.Context) string GetRecord(ctx context.Context, dataSourceCode string, recordId string, flags int64) (string, error) GetRedoRecord(ctx context.Context) (string, error) GetRepositoryLastModifiedTime(ctx context.Context) (int64, error) - GetSdkId(ctx context.Context) string GetStats(ctx context.Context) (string, error) GetVirtualEntityByRecordId(ctx context.Context, recordList string, flags int64) (string, error) HowEntityByEntityId(ctx context.Context, entityId int64, flags int64) (string, error) - Initialize(ctx context.Context, instanceName string, settings string, verboseLogging int64, configId int64) error PrimeEngine(ctx context.Context) error ProcessRedoRecord(ctx context.Context, redoRecord string, flags int64) (string, error) ReevaluateEntity(ctx context.Context, entityId int64, flags int64) (string, error) ReevaluateRecord(ctx context.Context, dataSourceCode string, recordId string, flags int64) (string, error) - RegisterObserver(ctx context.Context, observer observer.Observer) error Reinitialize(ctx context.Context, configId int64) error - ReplaceRecord(ctx context.Context, dataSourceCode string, recordId string, recordDefinition string, flags int64) (string, error) SearchByAttributes(ctx context.Context, attributes string, searchProfile string, flags int64) (string, error) - SetLogLevel(ctx context.Context, logLevelName string) error - SetObserverOrigin(ctx context.Context, origin string) - UnregisterObserver(ctx context.Context, observer observer.Observer) error WhyEntities(ctx context.Context, entityId1 int64, entityId2 int64, flags int64) (string, error) WhyRecordInEntity(ctx context.Context, dataSourceCode string, recordId string, flags int64) (string, error) WhyRecords(ctx context.Context, dataSourceCode1 string, recordId1 string, dataSourceCode2 string, recordId2 string, flags int64) (string, error) } -// The SzAbstractFactory interface is the interface for all Senzing factories in the Abstract Factory pattern -type SzAbstractFactory interface { - Close(ctx context.Context) error - CreateConfig(ctx context.Context) (SzConfig, error) - CreateConfigMgr(ctx context.Context) (SzConfigManager, error) - CreateDiagnostic(ctx context.Context) (SzDiagnostic, error) - CreateEngine(ctx context.Context) (SzEngine, error) - CreateProduct(ctx context.Context) (SzProduct, error) -} - // The SzProduct interface is a Golang representation of Senzing's libg2product.h type SzProduct interface { Destroy(ctx context.Context) error GetLicense(ctx context.Context) (string, error) - GetObserverOrigin(ctx context.Context) string - GetSdkId(ctx context.Context) string GetVersion(ctx context.Context) (string, error) - Initialize(ctx context.Context, instanceName string, settings string, verboseLogging int64) error - RegisterObserver(ctx context.Context, observer observer.Observer) error - SetLogLevel(ctx context.Context, logLevelName string) error - SetObserverOrigin(ctx context.Context, origin string) - UnregisterObserver(ctx context.Context, observer observer.Observer) error } diff --git a/szinterface/parameters.go b/sz/parameters.go similarity index 81% rename from szinterface/parameters.go rename to sz/parameters.go index 696f5d0..c65fb52 100644 --- a/szinterface/parameters.go +++ b/sz/parameters.go @@ -1,4 +1,4 @@ -package szinterface +package sz // ---------------------------------------------------------------------------- // Constants @@ -8,7 +8,9 @@ const ( SZ_INITIALIZE_WITH_DEFAULT_CONFIGURATION int64 = 0 SZ_NO_ATTRIBUTES string = "" SZ_NO_EXCLUSIONS string = "" + SZ_NO_LOGGING int64 = 0 SZ_NO_REQUIRED_DATASOURCES string = "" SZ_NO_SEARCH_PROFILE string = "" + SZ_VERBOSE_LOGGING int64 = 1 SZ_WITHOUT_INFO int64 = 0 ) diff --git a/szinterface/szapi_test.go b/sz/sz_test.go similarity index 99% rename from szinterface/szapi_test.go rename to sz/sz_test.go index 4d27a7a..6b030ae 100644 --- a/szinterface/szapi_test.go +++ b/sz/sz_test.go @@ -1,4 +1,4 @@ -package szinterface +package sz import ( "testing" diff --git a/szerror/main.go b/szerror/main.go index c00d4d2..aef12e2 100644 --- a/szerror/main.go +++ b/szerror/main.go @@ -1,7 +1,7 @@ // DO NOT EDIT. This code is generated. -// Generated by: szerrors/bin/generate_go.py -// Generated for: g2-sdk-go/szerror/main.go -// Generated date: 2024-03-25T20:44:07.292267+00:00 +// Generated by: sz-sdk-errors/bin/generate_go.py +// Generated for: sz-sdk-go/szerror/main.go +// Generated date: 2024-04-18T19:47:30.022931+00:00 package szerror @@ -13,7 +13,7 @@ type SzErrorTypeIds int // ---------------------------------------------------------------------------- // "Category" errors -// One of these errors must be the last in each SzErrorTypes value list. +// One of these errors must be the last in each SZErrorTypes value list. // ---------------------------------------------------------------------------- type SzBadInputError struct { @@ -48,7 +48,7 @@ type SzNotFoundError struct{ error } type SzNotInitializedError struct{ error } type SzRetryTimeoutExceededError struct{ error } type SzUnhandledError struct{ error } -type SzUnknownDatasourceError struct{ error } +type SzUnknownDataSourceError struct{ error } // ---------------------------------------------------------------------------- // Constants @@ -66,7 +66,7 @@ const ( SzRetryable SzRetryTimeoutExceeded SzUnhandled - SzUnknownDatasource + SzUnknownDataSource SzUnrecoverable ) @@ -81,7 +81,7 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 2: {SzBadInput}, // EAS_ERR_INVALID_XML - Invalid XML 5: {SzBase}, // EAS_ERR_EXCEEDED_MAX_RETRIES - Exceeded the Maximum Number of Retries Allowed 7: {SzBadInput}, // EAS_ERR_EMPTY_XML_MESSAGE - Empty XML Message - 10: {SzRetryTimeoutExceeded, SzRetryable}, // EAS_ERR_RETRY_TIMEOUT - Retry timeout exceeded + 10: {SzRetryTimeoutExceeded, SzRetryable}, // EAS_ERR_RETRY_TIMEOUT - Retry timeout exceeded RES_ENT_ID locklist [{0}] 14: {SzConfiguration}, // EAS_ERR_INVALID_DATASTORE_CONFIGURATION_TYPE - Invalid Datastore Configuration Type 19: {SzConfiguration}, // EAS_ERR_NO_CONFIGURATION_FOUND - Configuration not found 20: {SzConfiguration}, // EAS_ERR_CONFIG_CANNOT_BE_NULL_DATABASE - Configuration cannot be loaded from database connection @@ -89,9 +89,8 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 22: {SzBadInput}, // EAS_ERR_INVALID_DOCTYPE - Invalid DocType {0} 23: {SzBadInput}, // EAS_ERR_CONFLICTING_DATA_SOURCE_VALUES - Conflicting DATA_SOURCE values '{0}' and '{1}' 24: {SzBadInput}, // EAS_ERR_CONFLICTING_RECORD_ID_VALUES - Conflicting RECORD_ID values '{0}' and '{1}' - 25: {SzBadInput}, // EAS_ERR_CONFLICTING_LOAD_ID_VALUES - Conflicting LOAD_ID values '{0}' and '{1}' 26: {SzBadInput}, // EAS_ERR_RESERVED_WORD_USED_IN_DOCUMENT - Inbound data contains a reserved keyword '{0}' - 27: {SzUnknownDatasource, SzBadInput}, // EAS_ERR_UNKNOWN_DSRC_CODE_VALUE - Unknown DATA_SOURCE value '{0}' + 27: {SzUnknownDataSource, SzBadInput}, // EAS_ERR_UNKNOWN_DSRC_CODE_VALUE - Unknown DATA_SOURCE value '{0}' 28: {SzConfiguration}, // EAS_ERR_INVALID_JSON_CONFIG_DOCUMENT - Invalid JSON config document 29: {SzBase}, // EAS_ERR_INVALID_HANDLE - Invalid Handle 30: {SzConfiguration}, // EAS_ERR_INVALID_MATCH_LEVEL - Invalid match level '{0}' @@ -107,7 +106,7 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 42: {SzBase}, // EAS_ERR_DOCUMENT_LOAD_PROCESSING_FAILED - Document load processing failed 43: {SzBase}, // EAS_ERR_DOCUMENT_ER_PROCESSING_FAILED - Document ER processing failed 44: {SzBase}, // EAS_ERR_CHECK_ENTITY_PROCESSING_FAILED - Check entity processing failed - 45: {SzBase}, // EAS_ERR_UMF_PROC_PROCESSING_FAILED - UMF procedure processing failed + 45: {SzBase}, // EAS_ERR_INPUT_PROCEDURE_PROCESSING_FAILED - Input procedure processing failed 46: {SzBase}, // EAS_ERR_DOCUMENT_HASHING_PROCESSING_FAILED - Document hashing-processing failed 47: {SzBase}, // EAS_ERR_SESSION_IS_INVALID - Session is invalid 48: {SzNotInitialized, SzUnrecoverable}, // EAS_ERR_G2_NOT_INITIALIZED - G2 is not initialized @@ -126,7 +125,6 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 62: {SzConfiguration}, // EAS_ERR_AMBIGUOUS_TYPE_FELEM_MISSING - AMBIGUOUS_TYPE Feature Element is not configured 63: {SzNotInitialized, SzUnrecoverable}, // EAS_ERR_G2CONFIGMGR_NOT_INITIALIZED - G2ConfigMgr is not initialized 64: {SzConfiguration}, // EAS_ERR_CONFUSED_ENTITY_FTYPE_MISSING - CONFUSED_ENTITY Feature Type is not configured - 65: {SzBadInput}, // EAS_ERR_UNKNOWN_ENTITY_TYPE_ID - Unknown entity type ID '{0}' 66: {SzBadInput}, // EAS_ERR_UNKNOWN_GENERIC_PLAN_VALUE - Unknown generic plan value '{0}' 67: {SzConfiguration}, // EAS_ERR_INVALID_GENERIC_PLAN_VALUE - Invalid Generic Plan ID [{0}] configured for the '{1}' retention level.' 68: {SzBase}, // EAS_ERR_UNKNOWN_ER_RESULT - Unknown ER-result. @@ -134,7 +132,7 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 76: {SzBase}, // EAS_ERR_INBOUND_FEATURE_VERSION_NEWER_THAN_CONFIG - Inbound Feature Version [{0}] is newer than configured version [{1}] for feature type[{2}]. 77: {SzBase}, // EAS_ERR_ERROR_WHEN_PRIMING_GNR - Error when priming GNR resources '{0}' 78: {SzBase}, // EAS_ERR_ERROR_WHEN_ENCRYPTING - Error when encrypting '{0}' - 79: {SzBase}, // EAS_ERR_ERROR_WHEN_DECRYPTING - Error when decryting '{0}' + 79: {SzBase}, // EAS_ERR_ERROR_WHEN_DECRYPTING - Error when decrypting '{0}' 80: {SzBase}, // EAS_ERR_ERROR_WHEN_VALIDATING_ENCRYPTION_SIGNATURE_COMPATIBILITY - Error when validating encryption signature compatibility '{0}' 81: {SzBase}, // EAS_ERR_ERROR_WHEN_CHECKING_DISTINCT_FEATURE_GENERALIZATION - Error when checking distinct feature generalization '{0}' 82: {SzBase}, // EAS_ERR_ERROR_WHEN_RUNNING_DQM - Error when running DQM '{0}' @@ -145,7 +143,9 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 87: {SzUnhandled, SzUnrecoverable}, // EAS_ERR_SRD_EXCEPTION - SRD Exception '{0}' 88: {SzBadInput}, // EAS_ERR_UNKNOWN_SEARCH_PROFILE_VALUE - Unknown search profile value '{0}' 89: {SzConfiguration}, // EAS_ERR_MISCONFIGURED_SEARCH_PROFILE_VALUE - Misconfigured search profile value '{0}' - 90: {SzConfiguration}, // EAS_ERR_CANNOT_ADD_LIBRARY_FEATURES_TO_DATASTORE - Cannot add library features to datastore + 90: {SzConfiguration}, // EAS_ERR_CANNOT_ADD_LIBRARY_FEATURES_TO_DATASTORE - Cannot add library features to datastore: '{0}' + 91: {SzBase}, // EAS_ERR_TRUSTED_ID_FTYPE_MISSING - TRUSTED_ID Feature Type is not configured + 92: {SzBase}, // EAS_ERR_RECORD_TYPE_FTYPE_MISSING - RECORD_TYPE Feature Type is not configured 999: {SzLicense, SzUnrecoverable}, // EAS_ERR_LICENSE_HAS_EXPIRED - License has expired 1000: {SzDatabase, SzUnrecoverable}, // EAS_ERR_UNHANDLED_DATABASE_ERROR - Unhandled Database Error '{0}' 1001: {SzDatabase, SzUnrecoverable}, // EAS_ERR_CRITICAL_DATABASE_ERROR - Critical Database Error '{0}' @@ -172,7 +172,6 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 2003: {SzBase}, // EAS_ERR_NO_FELEM_CODE - Cannot process OBS_FELEM with no FELEM_CODE[{0}] 2005: {SzBase}, // EAS_ERR_INVALID_FELEM_CODE - FELEM_CODE[{0}] is not configured for FTYPE_CODE[{1}] 2006: {SzBase}, // EAS_ERR_MISSING_ENT_SRC_KEY - OBS_ENT is missing ENT_SRC_KEY - 2007: {SzBase}, // EAS_ERR_MISSING_OBS_SRC_KEY - OBS is missing OBS_SRC_KEY 2012: {SzConfiguration}, // EAS_ERR_ERRULE_CONFIGURED_FOR_RESOLVE_AND_RELATE - ER Rule [{0}] is configured for both resolve and relate. 2015: {SzConfiguration}, // EAS_ERR_INVALID_FTYPE_CODE - Invalid FTYPE_CODE[{0}] 2027: {SzBase}, // EAS_ERR_PLUGIN_INIT - Plugin initialization error {0} @@ -183,12 +182,12 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 2038: {SzConfiguration}, // EAS_ERR_DISTINCT_FEATURE_HAS_NO_BOM - Distinct feature call configured with no Bill of Materials DFCALL_ID[{0}] 2041: {SzConfiguration}, // EAS_ERR_EFCALL_HAS_NO_BOM - EFeature creation call configured with no Bill of Materials EFCALL_ID[{0}] 2045: {SzConfiguration}, // EAS_ERR_CFRTN_REFERS_BAD_CFUNC_ID - CFG_CFRTN references CFUNC_ID[{0}] which is not configured - 2047: {SzConfiguration}, // EAS_ERR_MISSING_DSRC_CODE - OBS_SRC_KEY[{0}] is missing DSRC_CODE tag which is required + 2047: {SzConfiguration}, // EAS_ERR_MISSING_DSRC_CODE - Observation is missing DSRC_CODE tag which is required 2048: {SzConfiguration}, // EAS_ERR_FEAT_FREQ_INVALID - FEATURE CODE[{0}] FEATURE FREQUENCY[{1}] is an invalid frequency 2049: {SzConfiguration}, // EAS_ERR_FUNC_INVALID - {2} [{0}] is invalid for {3}[{1}] 2050: {SzConfiguration}, // EAS_ERR_QUAL_FRAG_NOT_FOUND - Rule[{0}] Qualifier Fragment[{1}]: Fragment not found 2051: {SzConfiguration}, // EAS_ERR_DISQUAL_FRAG_NOT_FOUND - Rule[{0}] Disqualifier Fragment[{1}]: Fragment not found - 2057: {SzBadInput}, // EAS_ERR_BAD_DSRC_ACTION - OBS_SRC_KEY[{0}] has DSRC_ACTION[{1}] which is invalid. Valid values are [A]dd, [C]hange, [D]elete, [P]rune or E[X]tensive Evaluation + 2057: {SzBadInput}, // EAS_ERR_BAD_DSRC_ACTION - Observation has DSRC_ACTION[{0}] which is invalid. Valid values are [A]dd, [C]hange, [D]elete or E[X]tensive Evaluation 2061: {SzConfiguration}, // EAS_ERR_DUPLICATE_LOOKUP_IDENTIFIER - Duplicate [{0}] with identifier value [{1}]. Only unique values are allowed. 2062: {SzConfiguration}, // EAS_ERR_INVALID_LOOKUP_IDENTIFIER - Requested lookup of [{0}] using unknown value [{1}]. Value not found. 2065: {SzConfiguration}, // EAS_ERR_FTYPE_HAS_MULTIPLE_DEFINITIONS - FType configured with multiple definitions. FTYPE_CODE[{0}] used in FTYPE_ID[{1}] and FTYPE_ID[{2}] @@ -201,14 +200,12 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 2074: {SzBase}, // EAS_ERR_SCORING_MANAGER_PLUGIN - Scoring manager: id {0} and {1} do not match 2075: {SzConfiguration}, // EAS_ERR_TABLE_CONFIGURED_WITH_INVALID_FTYPE_CODE - Table {0} configured with an invalid type FTYPE_CODE[{1}] 2076: {SzConfiguration}, // EAS_ERR_TABLE_CONFIGURED_WITH_INVALID_FELEM_CODE - Table {0} configured with an invalid type FELEM_CODE[{1}] - 2077: {SzConfiguration}, // EAS_ERR_TABLE_CONFIGURED_WITH_INVALID_ETYPE_ID - Table {0} configured with an invalid type ETYPE_ID[{1}] 2079: {SzConfiguration}, // EAS_ERR_EFBOM_CONFIGURED_WITH_INVALID_FTYPE_ID - CFG_EFBOM configured with an invalid type FTYPE_ID[{0}] 2080: {SzConfiguration}, // EAS_ERR_EFBOM_CONFIGURED_WITH_INVALID_FELEM_ID - CFG_EFBOM configured with an invalid type FELEM_ID[{0}] 2081: {SzConfiguration}, // EAS_ERR_FUNC_CALL_CONFIGURED_WITH_INVALID_FTYPE_ID - {1} configured with an invalid type FTYPE_ID[{0}] 2082: {SzConfiguration}, // EAS_ERR_FUNC_CALL_CONFIGURED_WITH_INVALID_FUNC_ID - {1} configured with an invalid type {2}[{0}] 2083: {SzConfiguration}, // EAS_ERR_FUNC_BOM_CONFIGURED_WITH_INVALID_FTYPE_ID - {1} configured with an invalid type FTYPE_ID[{0}] 2084: {SzConfiguration}, // EAS_ERR_FUNC_BOM_CONFIGURED_WITH_INVALID_FELEM_ID - {1} configured with an invalid type FELEM_ID[{0}] - 2087: {SzConfiguration}, // EAS_ERR_TABLE_CONFIGURED_WITH_DUPLICATE_CONFIG_FOR_EFU_TYPE - Table [{0}] configured with duplicate config values for ETYPE_ID[{1}]/FTYPE_ID[{2}]/UTYPE_CODE[{3}] 2088: {SzConfiguration}, // EAS_ERR_TABLE_CONFIGURED_WITH_INVALID_RCLASS_ID - Table {0} configured with an invalid RCLASS_ID[{1}] 2089: {SzConfiguration}, // EAS_ERR_UNKNOWN_FCLASS_ID - UNKNOWN FCLASS ID[{0}] 2090: {SzConfiguration}, // EAS_ERR_SFCALL_HAS_INVALID_FUNCTION - Feature standardization call configured with invalid function ID SFCALL_ID[{0}] SFUNC_ID[{1}] @@ -239,15 +236,12 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 2121: {SzConfiguration}, // EAS_ERR_TABLE_CONFIGURED_WITH_INVALID_FELEM_ID - Table {0} configured with an invalid type FELEM_ID[{1}] 2123: {SzConfiguration}, // EAS_ERR_CFUNC_CONFIGURED_WITH_NO_CFRTN - CFG_CFUNC [{0}] feature type [{1}] configured without any corresponding return values in CFG_CFRTN 2131: {SzConfiguration}, // EAS_ERR_OBS_ENT_NOT_FOUND - Requested resolution of OBS_ENT_ID that is not loaded OBS_ENT_ID[{0}] - 2135: {SzConfiguration}, // EAS_ERR_UMF_MAPPING_CONFIG_ERROR - Error in UMF Mapping Config[{0}] - 2136: {SzConfiguration}, // EAS_ERR_UMF_MAPPING_MISSING_REQUIRED_FIELD - Error in UMF Mapping, missing required field[{0}] - 2137: {SzConfiguration}, // EAS_ERR_UMF_MAPPING_MALFORMED_INPUT - Error in UMF Mapping, input message is malformed[{0}] + 2135: {SzConfiguration}, // EAS_ERR_INPUT_MAPPING_CONFIG_ERROR - Error in input mapping config[{0}] + 2136: {SzConfiguration}, // EAS_ERR_INPUT_MAPPING_MISSING_REQUIRED_FIELD - Error in input mapping, missing required field[{0}] + 2137: {SzConfiguration}, // EAS_ERR_INPUT_MAPPING_MALFORMED_INPUT - Error in input mapping, input message is malformed[{0}] 2138: {SzConfiguration}, // EAS_ERR_INVALID_CFRTN_INDEX - CFRTN_ID[{0}] is out of range. Valid range is 0-7 2139: {SzConfiguration}, // EAS_ERR_DSRC_INTEREST_CONFIGURED_WITH_INVALID_DSRCID - Data Source Interest configured with invalid Data Source ID DSRC_ID[{0}] - 2205: {SzConfiguration}, // EAS_ERR_ENTITY_TYPE_CODE_ALREADY_EXISTS - Entity type code [{0}] already exists. - 2206: {SzConfiguration}, // EAS_ERR_ENTITY_TYPE_ID_ALREADY_EXISTS - Entity type ID [{0}] already exists. 2207: {SzConfiguration}, // EAS_ERR_DATA_SOURCE_CODE_DOES_NOT_EXIST - Data source code [{0}] does not exist. - 2208: {SzConfiguration}, // EAS_ERR_DATA_SOURCE_CODE_ALREADY_EXISTS - Data source code [{0}] already exists. 2209: {SzConfiguration}, // EAS_ERR_DATA_SOURCE_ID_ALREADY_EXISTS - Data source ID [{0}] already exists. 2210: {SzConfiguration}, // EAS_ERR_FELEM_CODE_DOES_NOT_EXIST - Feature element code [{0}] does not exist. 2211: {SzConfiguration}, // EAS_ERR_FELEM_CODE_ALREADY_EXISTS - Feature element code [{0}] already exists. @@ -308,7 +302,7 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 2268: {SzConfiguration}, // EAS_ERR_SECTION_NAME_DOES_NOT_EXIST - Section name [{0}] does not exist. 2269: {SzConfiguration}, // EAS_ERR_SECTION_FIELD_NAME_ALREADY_EXISTS - Section field name [{0}] already exists. 2270: {SzConfiguration}, // EAS_ERR_SFUNC_ID_ALREADY_EXISTS - Feature standardization function ID [{0}] already exists. - 2271: {SzConfiguration}, // EAS_ERR_SFUNC_CODE_ALREADY_EXISTS - Feature standardization function code [{0}] already exists. + 2271: {SzConfiguration}, // EAS_ERR_SFUNC_CODE_ALREADY_EXISTS - Feature standardization function code [{0}] already exists. 2272: {SzConfiguration}, // EAS_ERR_EFUNC_ID_ALREADY_EXISTS - Feature expression function ID [{0}] already exists. 2273: {SzConfiguration}, // EAS_ERR_EFUNC_CODE_ALREADY_EXISTS - Feature expression function code [{0}] already exists. 2274: {SzConfiguration}, // EAS_ERR_CFUNC_ID_ALREADY_EXISTS - Feature comparison function ID [{0}] already exists. @@ -331,14 +325,13 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 2292: {SzBase}, // EAS_ERR_CANT_RETRIEVE_OBS_FEATURE_DATA_FOR_OBS_ENT - Could not retrieve observed feature data for observed entity [{0}]. 2293: {SzBase}, // EAS_ERR_NO_RECORDS_SPECIFIED - No records specified. 2294: {SzBase}, // EAS_ERR_DATA_SOURCE_ID_DOES_NOT_EXIST - Data source ID [{0}] does not exist. - 2295: {SzBase}, // EAS_ERR_ETYPE_CODE_DOES_NOT_EXIST - Entity type code [{0}] does not exist. 7209: {SzConfiguration}, // EAS_ERR_DB_BAD_BACKEND_TYPE - Invalid [SQL] Backend Parameter. Valid values are SQL or HYBRID 7211: {SzConfiguration}, // EAS_ERR_DB_BAD_CLUSTER_SIZE - Cluster [{0}] is configured with an invalid size. Size must be equal to 1. 7212: {SzConfiguration}, // EAS_ERR_DB_BAD_CLUSTER_NODE - Cluster [{0}] Node [{1}] is not configured. 7216: {SzConfiguration}, // EAS_ERR_DB_BAD_CLUSTER_DEFINITION - Cluster [{0}] is not properly configured 7217: {SzConfiguration}, // EAS_ERR_DB_CONFLICTING_DEFAULT_SHARD_CONFIG - Cannot specify both default backend database and default backend cluster 7218: {SzConfiguration}, // EAS_ERR_DB_CLUSTER_DOES_NOT_EXIST - Cluster [{0}] does not exist - 7220: {SzConfiguration}, // EAS_ERR_NO_CONFIG_REGISTERED_IN_DATASTORE - No engine configuration registered in datastore (see https:#senzing.zendesk.com/hc/en-us/articles/360036587313). + 7220: {SzConfiguration}, // EAS_ERR_NO_CONFIG_REGISTERED_IN_DATASTORE - No engine configuration registered in datastore (see https://senzing.zendesk.com/hc/en-us/articles/360036587313). 7221: {SzConfiguration}, // EAS_ERR_NO_CONFIG_REGISTERED_FOR_DATA_ID - No engine configuration registered with data ID [{0}]. 7222: {SzBase}, // EAS_ERR_FAILED_TO_SET_SYS_VAR_IN_DATASTORE - Could not set system variable value in database for Group[{0}],Code[{1}],Value[{2}]. 7223: {SzConfiguration}, // EAS_ERR_INVALID_SCHEMA_VERSION_IN_DATASTORE - Invalid version number for datastore schema [version '{0}']. @@ -353,9 +346,10 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 7235: {SzConfiguration}, // EAS_ERR_FTYPE_CONFIGURED_AS_REL_BUT_NO_RTYPE - FTYPE_CODE[{0}] IS CONFIGURED AS A RELATIONSHIP FEATURE TYPE BUT RTYPE_ID IS NOT SET. 7236: {SzConfiguration}, // EAS_ERR_DUPLICATE_BEHAVIOR_OVERRIDE_KEY_IN_CFG_FBOVR - Duplicate behavior override keys in CFG_FBOVR -- FTYPE_ID[{0}], UTYPE_CODE[{1}] referenced in CFG_FBOVR. 7237: {SzConfiguration}, // EAS_ERR_UNKNOWN_FTYPE_IN_TABLE - Unknown FTYPE_ID[{0}] referenced in {1}. + 7238: {SzBase}, // EAS_ERR_DATASTORE_ENCRYPTION_CONFIGURATION_DOES_NOT_MATCH_DATASTORE - Datastore encryption configuration does not match data store: '{0}' 7239: {SzConfiguration}, // EAS_ERR_INVALID_GENERIC_THRESHOLD_CANDIDATE_CAP - Invalid generic threshold {0} cap [{1}] for [GPLAN_ID[{2}], BEHAVIOR[{3}], FTYPE_ID[{4}]]. 7240: {SzConfiguration}, // EAS_ERR_INCORRECT_BEHAVIOR_REFERENCED - Incorrect BEHAVIOR[{0}] referenced in CFG_GENERIC_THRESHOLD for [GPLAN_ID[{1}], FTYPE_ID[{2}]]. FType configured for behavior [{3}] - 7241: {SzConfiguration}, // EAS_ERR_UNKNOWN_GPLAN_IN_TABLE - Unknown FTYPE_ID[{0}] referenced in {1}. + 7241: {SzConfiguration}, // EAS_ERR_UNKNOWN_GPLAN_IN_TABLE - Unknown GPLAN_ID[{0}] referenced in {1}. 7242: {SzConfiguration}, // EAS_ERR_MULTIPLE_GENERIC_THRESHOLD_DEFINITIONS - Multiple Generic Threshold definitions for [GPLAN_ID[{0}], BEHAVIOR[{1}], FTYPE_ID[{2}]]. 7243: {SzConfiguration}, // EAS_ERR_ER_FRAGMENT_HAS_UNDEFINED_DEPENDENT_FRAGMENTS - ER Fragment [{0}] configured with undefined dependent fragments. Fragment [{1}] undefined. 7244: {SzConfiguration}, // EAS_ERR_ER_RULE_FRAGMENT_LACKS_REQUIRED_FRAGMENT - ER Rule Fragment configuration lacks the required {0} fragment. @@ -433,7 +427,7 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 9210: {SzConfiguration}, // EAS_ERR_DIGEST_CONTEXT_INIT_FAILED - Unable to initialize Digest Context. 9220: {SzConfiguration}, // EAS_ERR_FTYPE_CANNOT_BE_HASHED - FType configured to be hashed, but cannot be scored. FTYPE_ID[{0}] FTYPE_CODE[{1}] 9222: {SzConfiguration}, // EAS_ERR_FTYPE_CONFIGURED_TO_BE_HASHED_MISSING_SALT - A Feature Type is marked for hashing, but a valid salt value was not found. FTYPE_ID[{0}] FTYPE_CODE[{1}] - 9224: {SzConfiguration}, // EAS_ERR_FTYPE_CONFIGURED_TO_BE_HASHED - A Feature Type is marked for hashing, but a valid salt value was not found. FTYPE_ID[{0}] FTYPE_CODE[{1}] + 9224: {SzConfiguration}, // EAS_ERR_FTYPE_CONFIGURED_TO_BE_HASHED - FType configured to be hashed, but no hashable data found. FTYPE_ID[{0}] FTYPE_CODE[{1}] 9228: {SzConfiguration}, // EAS_ERR_UNEXPECTED_SALT_CHECKUM_LIST - The SALT checksum on the Observation does not match the EXPECTED SALT checksum: EXPECTED=[{0}] Observation=[{1}] 9240: {SzConfiguration}, // EAS_ERR_CIPHER_CONTEXT_INIT_FAILED - Unable to initialize an ICC Context. 9241: {SzConfiguration}, // EAS_ERR_CIPHER_OP_FAILED - Unable to perform a required ICC operation. @@ -469,7 +463,7 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 9281: {SzBase}, // EAS_ERR_G2SS_OBJECT_DELETE_FAILED - Secure Store unable to delete object: {0}. 9282: {SzBase}, // EAS_ERR_G2SS_OBJECT_CHANGE_FAILED - Secure Store unable to modify object: {0}. 9283: {SzBase}, // EAS_ERR_G2SS_UNINITIALISED - Secure Store has not been initialized - 9284: {SzBase}, // EAS_ERR_G2SS_INVALID_SLOT_ID - Can not obtain info on specified slot. Possibly invalid slot ID specified in Secure Store URL: {0} + 9284: {SzConfiguration}, // EAS_ERR_G2SS_INVALID_SLOT_ID - Can not obtain info on specified slot. Possibly invalid slot ID specified in Secure Store URL: {0} 9285: {SzConfiguration}, // EAS_ERR_G2SS_NO_TOKEN_IN_SLOT - No security token present in slot specified by Secure Store URL: slot ID = {0} 9286: {SzConfiguration}, // EAS_ERR_G2SS_TOKEN_NOT_FOUND - Can not obtain info for security token. Possibly invalid token label and/or slot ID specified in Secure Store URL: {0} 9287: {SzBase}, // EAS_ERR_G2SS_TOKEN_IMPL_ERROR - An internal error occurred in the security token implementation library: Return Code = {0} @@ -498,8 +492,8 @@ var SzErrorTypes = map[int][]SzErrorTypeIds{ 9413: {SzConfiguration}, // EAS_ERR_G2SS_INCORRECT_PASSWORD - The export file password appears to be incorrect. 9414: {SzBadInput}, // EAS_ERR_STRING_IS_INVALID_UTF8 - Invalid data string. Data must be in UTF-8. 9500: {SzConfiguration}, // EAS_ERR_TOKEN_LIBRARY_CHECKSUM_MISMATCH - Cannot load token library. The checksum does not match the configuration of this node. Found: [{0}] Expected: [{1}] + 9501: {SzBase}, // EAS_TOKEN_LIBRARY_ALREADY_HASHED - Cannot hash token library. The Token Library contains previous hashed data 9701: {SzBase}, // EAS_ERR_CANT_RETRIEVE_INDEX_FROM_MEMORY_ROW - Cannot retrieve index[{0}] from memory row of key[{1}], out of range! - 9703: {SzBase}, // EAS_ERR_MEMTBL_COL_INDEX_TOO_BIG - Current field in memory row is passed end of row 9802: {SzConfiguration}, // EAS_ERR_INBOUND_OBS_CONFIG_CHECKSUM_MISMATCH - Configuration checksum on inbound observation [{0}] does not match this nodes configuration checksum [{1}]. Cannot process. 9803: {SzConfiguration}, // EAS_ERR_CALC_CONFIGCHKSUM_AND_PARAMSTORE_CONFIGCHKSUM_DONT_MATCH - The calculated configuration checksum [{0}] does not match the CONFIGURATION_CHECKSUM value in the parameter store [{1}]. 30011: {SzBase}, // EAS_ERR_DELETE_WITH_RESOLVE_ONLY - Cannot delete an entity with type RESOLVE_ONLY @@ -529,6 +523,6 @@ var AllSzErrorTypes = []SzErrorTypeIds{ SzRetryable, SzRetryTimeoutExceeded, SzUnhandled, - SzUnknownDatasource, + SzUnknownDataSource, SzUnrecoverable, } diff --git a/szerror/szerror.go b/szerror/szerror.go index 4fb119e..8849d99 100644 --- a/szerror/szerror.go +++ b/szerror/szerror.go @@ -205,7 +205,7 @@ func wrapError(originalError error, errorTypeIds []SzErrorTypeIds) error { result = SzRetryTimeoutExceededError{result} case SzUnhandled: result = SzUnhandledError{result} - case SzUnknownDatasource: + case SzUnknownDataSource: result = SzUnhandledError{result} // Default error. diff --git a/szerror/szerror_test.go b/szerror/szerror_test.go index 5e45a5c..9daea58 100644 --- a/szerror/szerror_test.go +++ b/szerror/szerror_test.go @@ -105,7 +105,7 @@ var testCases = []struct { expectedCode: 27, expectedMessage: "Test message", expectedType: SzBadInputError{}, - expectedTypes: []SzErrorTypeIds{SzUnknownDatasource, SzBadInput}, + expectedTypes: []SzErrorTypeIds{SzUnknownDataSource, SzBadInput}, falseTypes: []SzErrorTypeIds{SzUnrecoverable}, }, {