-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
207 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM golang:1.16.5 | ||
|
||
ARG PEANUT_VERSION=0.1.6 | ||
ARG PEANUT_VERSION=0.1.7 | ||
|
||
ENV GO111MODULE=on | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// Copyright 2021 Clivern. All rights reserved. | ||
// Use of this source code is governed by the MIT | ||
// license that can be found in the LICENSE file. | ||
|
||
package controller | ||
|
||
// Message interface | ||
type Message interface { | ||
GetCorrelation() string | ||
GetService() string | ||
GetJob() string | ||
GetType() string | ||
} | ||
|
||
// DeployRequest type | ||
type DeployRequest struct { | ||
JobID string `json:"jobId"` | ||
ServiceID string `json:"serviceId"` | ||
Template string `json:"template"` | ||
Configs map[string]string `json:"configs"` | ||
DeleteAfter string `json:"deleteAfter"` | ||
Type string `json:"type"` | ||
CorrelationID string `json:"correlationID"` | ||
} | ||
|
||
// DestroyRequest type | ||
type DestroyRequest struct { | ||
JobID string `json:"jobId"` | ||
ServiceID string `json:"serviceId"` | ||
Template string `json:"template"` | ||
Configs map[string]string `json:"configs"` | ||
DeleteAfter string `json:"deleteAfter"` | ||
Type string `json:"type"` | ||
CorrelationID string `json:"correlationID"` | ||
} | ||
|
||
// GetCorrelation gets the correlation id | ||
func (d DeployRequest) GetCorrelation() string { | ||
return d.CorrelationID | ||
} | ||
|
||
// GetService gets the service id | ||
func (d DeployRequest) GetService() string { | ||
return d.ServiceID | ||
} | ||
|
||
// GetJob gets the job id | ||
func (d DeployRequest) GetJob() string { | ||
return d.JobID | ||
} | ||
|
||
// GetType gets the job type | ||
func (d DeployRequest) GetType() string { | ||
return d.Type | ||
} | ||
|
||
// GetCorrelation gets the correlation id | ||
func (d DestroyRequest) GetCorrelation() string { | ||
return d.CorrelationID | ||
} | ||
|
||
// GetService gets the service id | ||
func (d DestroyRequest) GetService() string { | ||
return d.ServiceID | ||
} | ||
|
||
// GetJob gets the job id | ||
func (d DestroyRequest) GetJob() string { | ||
return d.JobID | ||
} | ||
|
||
// GetType gets the job type | ||
func (d DestroyRequest) GetType() string { | ||
return d.Type | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.