Merged in feature/CollectorBuildVersion (pull request #100)
Collector Build Version * lint * fixtests
This commit is contained in:
@@ -45,7 +45,7 @@ INSERT INTO documentCleanEntries (cleanId, version) VALUES ($1, $2)
|
||||
|
||||
type AddDocumentCleanEntryParams struct {
|
||||
Cleanid pgtype.UUID `db:"cleanid"`
|
||||
Version int32 `db:"version"`
|
||||
Version int64 `db:"version"`
|
||||
}
|
||||
|
||||
// AddDocumentCleanEntry
|
||||
@@ -133,7 +133,7 @@ type GetMostRecentDocumentCleanEntryRow struct {
|
||||
Documentid pgtype.UUID `db:"documentid"`
|
||||
Bucket *string `db:"bucket"`
|
||||
Key *string `db:"key"`
|
||||
Version int32 `db:"version"`
|
||||
Version int64 `db:"version"`
|
||||
Mimetype NullCleanmimetype `db:"mimetype"`
|
||||
Fail NullCleanfailtype `db:"fail"`
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ func TestClean(t *testing.T) {
|
||||
assert.Nil(t, clean.Bucket)
|
||||
assert.Nil(t, clean.Key)
|
||||
assert.Equal(t, fail, clean.Fail)
|
||||
assert.Equal(t, int32(1), clean.Version)
|
||||
assert.Equal(t, int64(1), clean.Version)
|
||||
assert.Equal(t, failcleanid, clean.ID)
|
||||
|
||||
cleanid, err := queries.AddDocumentClean(ctx, &repository.AddDocumentCleanParams{
|
||||
@@ -115,7 +115,7 @@ func TestClean(t *testing.T) {
|
||||
assert.Equal(t, bucket, *clean.Bucket)
|
||||
assert.Equal(t, key, *clean.Key)
|
||||
assert.Equal(t, mimetype, clean.Mimetype)
|
||||
assert.Equal(t, int32(2), clean.Version)
|
||||
assert.Equal(t, int64(2), clean.Version)
|
||||
assert.Equal(t, cleanid, clean.ID)
|
||||
|
||||
docclean, err := queries.GetCleanEntryByDocId(ctx, id)
|
||||
|
||||
@@ -176,7 +176,7 @@ INSERT INTO collectorMinCleanVersions (clientId, addedVersion, versionId) VALUES
|
||||
type SetCollectorCleanVersionParams struct {
|
||||
Clientid pgtype.UUID `db:"clientid"`
|
||||
Addedversion int32 `db:"addedversion"`
|
||||
Versionid int32 `db:"versionid"`
|
||||
Versionid int64 `db:"versionid"`
|
||||
}
|
||||
|
||||
// SetCollectorCleanVersion
|
||||
@@ -194,7 +194,7 @@ INSERT INTO collectorMinTextVersions (clientId, addedVersion, versionId) VALUES
|
||||
type SetCollectorTextVersionParams struct {
|
||||
Clientid pgtype.UUID `db:"clientid"`
|
||||
Addedversion int32 `db:"addedversion"`
|
||||
Versionid int32 `db:"versionid"`
|
||||
Versionid int64 `db:"versionid"`
|
||||
}
|
||||
|
||||
// SetCollectorTextVersion
|
||||
|
||||
@@ -57,8 +57,8 @@ func TestCollector(t *testing.T) {
|
||||
Externalid: "EXAMPLE",
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
minCleanVersion := int32(2)
|
||||
minTextVersion := int32(4)
|
||||
minCleanVersion := int64(2)
|
||||
minTextVersion := int64(4)
|
||||
|
||||
coll, err := queries.GetCollectorByClientID(ctx, clientId)
|
||||
assert.NoError(t, err)
|
||||
|
||||
@@ -209,7 +209,7 @@ type Collectorlatestversion struct {
|
||||
type Collectormincleanversion struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Clientid pgtype.UUID `db:"clientid"`
|
||||
Versionid int32 `db:"versionid"`
|
||||
Versionid int64 `db:"versionid"`
|
||||
Addedversion int32 `db:"addedversion"`
|
||||
Removedversion *int32 `db:"removedversion"`
|
||||
}
|
||||
@@ -217,7 +217,7 @@ type Collectormincleanversion struct {
|
||||
type Collectormintextversion struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Clientid pgtype.UUID `db:"clientid"`
|
||||
Versionid int32 `db:"versionid"`
|
||||
Versionid int64 `db:"versionid"`
|
||||
Addedversion int32 `db:"addedversion"`
|
||||
Removedversion *int32 `db:"removedversion"`
|
||||
}
|
||||
@@ -250,7 +250,7 @@ type Currentcleanentry struct {
|
||||
Documentid pgtype.UUID `db:"documentid"`
|
||||
Bucket *string `db:"bucket"`
|
||||
Key *string `db:"key"`
|
||||
Version int32 `db:"version"`
|
||||
Version int64 `db:"version"`
|
||||
Mimetype NullCleanmimetype `db:"mimetype"`
|
||||
Fail NullCleanfailtype `db:"fail"`
|
||||
}
|
||||
@@ -262,12 +262,12 @@ type Currentclientcansync struct {
|
||||
|
||||
type Currentcollectormincleanversion struct {
|
||||
Clientid pgtype.UUID `db:"clientid"`
|
||||
Mincleanversion int32 `db:"mincleanversion"`
|
||||
Mincleanversion int64 `db:"mincleanversion"`
|
||||
}
|
||||
|
||||
type Currentcollectormintextversion struct {
|
||||
Clientid pgtype.UUID `db:"clientid"`
|
||||
Mintextversion int32 `db:"mintextversion"`
|
||||
Mintextversion int64 `db:"mintextversion"`
|
||||
}
|
||||
|
||||
type Currentcollectorqueriesjsonagg struct {
|
||||
@@ -286,7 +286,7 @@ type Currenttextentry struct {
|
||||
Documentid pgtype.UUID `db:"documentid"`
|
||||
Bucket string `db:"bucket"`
|
||||
Key string `db:"key"`
|
||||
Version int32 `db:"version"`
|
||||
Version int64 `db:"version"`
|
||||
Cleanentryid pgtype.UUID `db:"cleanentryid"`
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ type Documentclean struct {
|
||||
type Documentcleanentry struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Cleanid pgtype.UUID `db:"cleanid"`
|
||||
Version int32 `db:"version"`
|
||||
Version int64 `db:"version"`
|
||||
}
|
||||
|
||||
type Documententry struct {
|
||||
@@ -321,15 +321,15 @@ type Documententry struct {
|
||||
type Documenttextextraction struct {
|
||||
ID pgtype.UUID `db:"id"`
|
||||
Cleanentryid pgtype.UUID `db:"cleanentryid"`
|
||||
Version int32 `db:"version"`
|
||||
Version int64 `db:"version"`
|
||||
Bucket string `db:"bucket"`
|
||||
Key string `db:"key"`
|
||||
}
|
||||
|
||||
type Fullactivecollector struct {
|
||||
Clientid pgtype.UUID `db:"clientid"`
|
||||
Mincleanversion int32 `db:"mincleanversion"`
|
||||
Mintextversion int32 `db:"mintextversion"`
|
||||
Mincleanversion int64 `db:"mincleanversion"`
|
||||
Mintextversion int64 `db:"mintextversion"`
|
||||
Activeversion int32 `db:"activeversion"`
|
||||
Latestversion int32 `db:"latestversion"`
|
||||
Fields []byte `db:"fields"`
|
||||
|
||||
@@ -16,7 +16,7 @@ INSERT INTO documentTextExtractions (version, bucket, key, cleanEntryId) VALUES
|
||||
`
|
||||
|
||||
type AddDocumentTextEntryParams struct {
|
||||
Version int32 `db:"version"`
|
||||
Version int64 `db:"version"`
|
||||
Bucket string `db:"bucket"`
|
||||
Key string `db:"key"`
|
||||
Cleanentryid pgtype.UUID `db:"cleanentryid"`
|
||||
|
||||
@@ -84,7 +84,7 @@ func TestTextExtraction(t *testing.T) {
|
||||
assert.Equal(t, id, text.Documentid)
|
||||
assert.Equal(t, bucket, text.Bucket)
|
||||
assert.Equal(t, key, text.Key)
|
||||
assert.Equal(t, int32(1), text.Version)
|
||||
assert.Equal(t, int64(1), text.Version)
|
||||
assert.NotEqual(t, pgtype.UUID{}, text.ID)
|
||||
assert.True(t, text.ID.Valid)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user