Skip to content

Commit

Permalink
Merge branch 'release/0.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
RMPall committed Mar 31, 2023
2 parents d69ab98 + 49e1540 commit f340946
Show file tree
Hide file tree
Showing 39 changed files with 1,751 additions and 511 deletions.
8 changes: 3 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@ linters:
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- deadcode
- depguard
- dogsled
- errcheck
- gochecknoinits
- goconst
- gocritic
# - gocritic // This will be re added once datasets uri code is enabled.
- gocyclo
- gofmt
- goimports
Expand All @@ -65,12 +64,10 @@ linters:
- ineffassign
- nakedret
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unused
- varcheck
#- unused // This will be re added once datasets uri code is enabled.
- whitespace
- gocognit
- prealloc
Expand All @@ -83,6 +80,7 @@ issues:
- errcheck
- dupl
- gosec
- typecheck
new: false

# golangci.com configuration
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.concourse
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM onsdigital/dp-concourse-tools-ubuntu
FROM onsdigital/dp-concourse-tools-ubuntu-20:ubuntu20.4-rc.1

WORKDIR /app/

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ build:

.PHONY: lint
lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.43.0
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.0
golangci-lint run ./...

.PHONY: debug
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ a. To check if service produced an event for content-updated Topic

make test

b. set ContentUpdatedTopicFlag in config as true/false
b. set EnablePublishContentUpdatedTopic in config as true/false

c. build and run the service
go build
Expand All @@ -66,7 +66,7 @@ make produce
Type uri (any text)

e. Check the service logs if either of the following appears and there is no error in service logs
ContentUpdatedTopic Flag is enabled/disabled
EnablePublishContentUpdatedTopic Flag is enabled/disabled

### Contributing

Expand Down
2 changes: 1 addition & 1 deletion ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ image_resource:
type: docker-image
source:
repository: golang
tag: 1.17.8
tag: 1.19.2

inputs:
- name: dp-search-data-finder
Expand Down
2 changes: 1 addition & 1 deletion ci/component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ image_resource:
type: docker-image
source:
repository: golang
tag: 1.17.8
tag: 1.19.2

inputs:
- name: dp-search-data-finder
Expand Down
2 changes: 1 addition & 1 deletion ci/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ image_resource:
type: docker-image
source:
repository: golang
tag: 1.17.8
tag: 1.19.2

inputs:
- name: dp-search-data-finder
Expand Down
2 changes: 1 addition & 1 deletion ci/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ image_resource:
type: docker-image
source:
repository: golang
tag: 1.17.8
tag: 1.19.2

inputs:
- name: dp-search-data-finder
Expand Down
10 changes: 10 additions & 0 deletions clients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@ package clients
import (
"context"

datasetclient "github.com/ONSdigital/dp-api-clients-go/v2/dataset"
zebedeeclient "github.com/ONSdigital/dp-api-clients-go/v2/zebedee"
"github.com/ONSdigital/dp-healthcheck/healthcheck"
)

//go:generate moq -out mock/mockZebedeeClient.go -pkg mock . ZebedeeClient
//go:generate moq -out mock/mockDatasetAPIClient.go -pkg mock . DatasetAPIClient

// ZebedeeClient defines the zebedee client
type ZebedeeClient interface {
Checker(context.Context, *healthcheck.CheckState) error
GetPublishedIndex(ctx context.Context, publishedIndexRequestParams *zebedeeclient.PublishedIndexRequestParams) (zebedeeclient.PublishedIndex, error)
}

// DatasetAPIClient defines the dataset-api client
type DatasetAPIClient interface {
Checker(context.Context, *healthcheck.CheckState) error
GetDatasets(ctx context.Context, userAuthToken, serviceAuthToken, collectionID string, q *datasetclient.QueryParams) (m datasetclient.List, err error)
GetFullEditionsDetails(ctx context.Context, userAuthToken, serviceAuthToken, collectionID, datasetID string) (m []datasetclient.EditionsDetails, err error)
GetVersionMetadata(ctx context.Context, userAuthToken, serviceAuthToken, collectionID, id, edition, version string) (m datasetclient.Metadata, err error)
}
Loading

0 comments on commit f340946

Please sign in to comment.