Skip to content

Commit

Permalink
[create-pull-request] automated change
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasparada authored and github-actions[bot] committed Jun 27, 2024
1 parent 45e2151 commit a5fd195
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 27 deletions.
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const (
DefaultBaseURL = "https://cloud-api.calyptia.com"
uintBase = 10
CalyptiaEnvAPIURL = "CALYPTIA_API_URL"
//nolint: gosec // no credential leaks just a variable.
//nolint:gosec // no credential leaks just a variable.
CalyptiaEnvAPIToken = "CALYPTIA_API_TOKEN"
)

Expand Down
4 changes: 1 addition & 3 deletions client/fleet.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ func (c *Client) FleetConfig(ctx context.Context, fleetID string, params types.F
return nil, err
}
return &cfg, nil
case types.ConfigFormatYAML:
fallthrough
case types.ConfigFormatJSON:
case types.ConfigFormatYAML, types.ConfigFormatJSON:
var out fluentbitconfig.Config
return &out, c.do(ctx, http.MethodGet, path, nil, &out)
}
Expand Down
6 changes: 3 additions & 3 deletions client/secrets/rsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func NewRSAHandler(bits int) *RSA {
return &RSA{Bits: bits}
}

func (r *RSA) EncryptWithPublicKey(msg []byte, key []byte) ([]byte, error) {
func (r *RSA) EncryptWithPublicKey(msg, key []byte) ([]byte, error) {
publicKey, err := BytesToPublicKey(key)
if err != nil {
return nil, err
Expand Down Expand Up @@ -100,7 +100,7 @@ func Decrypt(hash hash.Hash, privateKey *rsa.PrivateKey, msg []byte) ([]byte, er
return plaintext, nil
}

func (r *RSA) DecryptWithPrivateKey(msg []byte, key []byte) ([]byte, error) {
func (r *RSA) DecryptWithPrivateKey(msg, key []byte) ([]byte, error) {
privateKey, err := BytesToPrivateKey(key)
if err != nil {
return nil, err
Expand All @@ -113,7 +113,7 @@ func (r *RSA) DecryptWithPrivateKey(msg []byte, key []byte) ([]byte, error) {
return plaintext, nil
}

func (r *RSA) GenerateKeyPair() ([]byte, []byte, error) {
func (r *RSA) GenerateKeyPair() (priv, pub []byte, err error) {
privateKey, err := rsa.GenerateKey(rand.Reader, r.Bits)
if err != nil {
return nil, nil, err
Expand Down
11 changes: 0 additions & 11 deletions types/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@ type MetricsOutput struct {
RetriedRecords float64 `json:"retriedRecords"`
RetriesFailed float64 `json:"retriesFailed"`
DroppedRecords float64 `json:"droppedRecords"`

// Deprecated: `load` is not a valid counter metric.
// TODO: review `load` output metrics as they might not even exists in the first place.
Loads float64 `json:"loads"`
}

// MetricsOverTime stores a list of metrics over time for a core instance.
Expand Down Expand Up @@ -253,10 +249,6 @@ type MetricsOverTimeOutput struct {
RetriedRecords []MetricOverTime `json:"retriedRecords"`
RetriesFailed []MetricOverTime `json:"retriesFailed"`
DroppedRecords []MetricOverTime `json:"droppedRecords"`

// Deprecated: `load` is not a valid counter metric.
// TODO: review `load` output metrics as they might not even exists in the first place.
Loads []MetricOverTime `json:"loads"`
}

func (m *MetricsOverTimeOutput) Init() {
Expand All @@ -281,9 +273,6 @@ func (m *MetricsOverTimeOutput) Init() {
if m.DroppedRecords == nil {
m.DroppedRecords = []MetricOverTime{}
}
if m.Loads == nil {
m.Loads = []MetricOverTime{}
}
}

type MetricOverTime struct {
Expand Down
9 changes: 0 additions & 9 deletions types/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ type CreatePipeline struct {
Metadata *json.RawMessage `json:"metadata"`
Tags []string `json:"tags"`

// Deprecated: in favor of NoAutoCreateEndpointsFromConfig
AutoCreatePortsFromConfig bool `json:"autoCreatePortsFromConfig"`
// Deprecated: in favor of NoAutoCreateChecksFromConfig
AutoCreateChecksFromConfig bool `json:"autoCreateChecksFromConfig"`

// no automatically create endpoints from config
NoAutoCreateEndpointsFromConfig bool `json:"noAutoCreateEndpointsFromConfig"`
// no automatically create checks based on the output configuration.
Expand Down Expand Up @@ -343,10 +338,6 @@ type UpdatePipeline struct {
RawConfig *string `json:"rawConfig"`
ResourceProfile *string `json:"resourceProfile"`
Image *string `json:"image"`
// Deprecated: in favor of NoAutoCreateEndpointsFromConfig
AutoCreatePortsFromConfig *bool `json:"autoCreatePortsFromConfig"`
// Deprecated: in favor of NoAutoCreateChecksFromConfig
AutoCreateChecksFromConfig *bool `json:"autoCreateChecksFromConfig"`

// no automatically create endpoints from config
NoAutoCreateEndpointsFromConfig bool `json:"noAutoCreateEndpointsFromConfig"`
Expand Down

0 comments on commit a5fd195

Please sign in to comment.