Skip to content

Commit

Permalink
refactor: move sync related methods as private
Browse files Browse the repository at this point in the history
  • Loading branch information
batrov committed Dec 5, 2023
1 parent af6c5ce commit 340ad34
Show file tree
Hide file tree
Showing 8 changed files with 162 additions and 399 deletions.
5 changes: 1 addition & 4 deletions core/asset/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ type DiscoveryRepository interface {
Search(ctx context.Context, cfg SearchConfig) (results []SearchResult, err error)
Suggest(ctx context.Context, cfg SearchConfig) (suggestions []string, err error)
GroupAssets(ctx context.Context, cfg GroupConfig) (results []GroupResult, err error)
Clone(ctx context.Context, indexName, clonedIndexName string) error
UpdateAlias(ctx context.Context, indexName, alias string) error
DeleteByIndexName(ctx context.Context, indexName string) error
UpdateIndexSettings(ctx context.Context, indexName string, body string) error
SyncAssets(ctx context.Context, indexName string, assets []Asset) error
}

// GroupConfig represents a group query along
Expand Down
161 changes: 15 additions & 146 deletions core/asset/mocks/discovery_repository.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion internal/server/v1beta1/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ func (server *APIServer) CreateAssetProbe(ctx context.Context, req *compassv1bet
}

func (server *APIServer) SyncAssets(ctx context.Context, req *compassv1beta1.SyncAssetsRequest) (*compassv1beta1.SyncAssetsResponse, error) {

server.assetService.SyncAssets(ctx, req.GetServices())

return nil, nil
Expand Down
Loading

0 comments on commit 340ad34

Please sign in to comment.