Skip to content

Commit

Permalink
Piped api update
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhtc1202 committed Jul 22, 2022
1 parent 05443eb commit 0272ba2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pkg/app/server/grpcapi/piped_api.go
Expand Up @@ -69,7 +69,7 @@ type pipedApiDeploymentChainStore interface {

type pipedApiPipedStore interface {
Get(ctx context.Context, id string) (*model.Piped, error)
UpdateMetadata(ctx context.Context, id, version, config string, cps []*model.Piped_CloudProvider, repos []*model.ApplicationGitRepository, se *model.Piped_SecretEncryption, startedAt int64) error
UpdateMetadata(ctx context.Context, id, version, config string, pps []*model.Piped_PlatformProvider, repos []*model.ApplicationGitRepository, se *model.Piped_SecretEncryption, startedAt int64) error
}

type pipedApiEventStore interface {
Expand Down Expand Up @@ -176,7 +176,7 @@ func (a *PipedAPI) ReportPipedMeta(ctx context.Context, req *pipedservice.Report
pipedID,
req.Version,
req.Config,
req.CloudProviders,
req.PlatformProviders,
req.Repositories,
req.SecretEncryption,
now,
Expand Down
2 changes: 1 addition & 1 deletion pkg/datastore/datastoretest/datastore.mock.go

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

6 changes: 3 additions & 3 deletions pkg/datastore/pipedstore.go
Expand Up @@ -115,7 +115,7 @@ type PipedStore interface {
EnablePiped(ctx context.Context, id string) error
DisablePiped(ctx context.Context, id string) error
UpdateDesiredVersion(ctx context.Context, id, version string) error
UpdateMetadata(ctx context.Context, id, version, config string, cps []*model.Piped_CloudProvider, repos []*model.ApplicationGitRepository, se *model.Piped_SecretEncryption, startedAt int64) error
UpdateMetadata(ctx context.Context, id, version, config string, pps []*model.Piped_PlatformProvider, repos []*model.ApplicationGitRepository, se *model.Piped_SecretEncryption, startedAt int64) error
AddKey(ctx context.Context, id, keyHash, creator string, createdAt time.Time) error
DeleteOldKeys(ctx context.Context, id string) error
}
Expand Down Expand Up @@ -222,9 +222,9 @@ func (s *pipedStore) UpdateDesiredVersion(ctx context.Context, id, version strin
})
}

func (s *pipedStore) UpdateMetadata(ctx context.Context, id, version, config string, cps []*model.Piped_CloudProvider, repos []*model.ApplicationGitRepository, se *model.Piped_SecretEncryption, startedAt int64) error {
func (s *pipedStore) UpdateMetadata(ctx context.Context, id, version, config string, pps []*model.Piped_PlatformProvider, repos []*model.ApplicationGitRepository, se *model.Piped_SecretEncryption, startedAt int64) error {
return s.update(ctx, id, func(piped *model.Piped) error {
piped.CloudProviders = cps
piped.PlatformProviders = pps
piped.Repositories = repos
piped.SecretEncryption = se
piped.Version = version
Expand Down

0 comments on commit 0272ba2

Please sign in to comment.