Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Myversion #28

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ testdata/files/dante.txt
.idea/

testdata/*
aws/**/*_test.go
# aws/**/*_test.go
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<div align="center">

# GoGPUtils

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/86513a2282374f87a813110db86f018b)](https://www.codacy.com/manual/alessiosavi/GoGPUtils?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=alessiosavi/GoGPUtils&amp;utm_campaign=Badge_Grade)
Expand All @@ -7,6 +9,7 @@
A simple Go general-purpose utility repository for avoid reinventing the wheel every time that I need to start a new
project.


## Benchmark

```text
Expand Down Expand Up @@ -120,3 +123,14 @@ cpu: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
BenchmarkReadZipFile-8 499692 10876 ns/op 6320 B/op 27 allocs/op
BenchmarkReadZip01-8 880110 12334 ns/op 6656 B/op 29 allocs/op
```

</div>

### List of content:

<ul>
<li> *aws*
<li>
<li>
<li>
</ul>
46 changes: 46 additions & 0 deletions aws/cloudwatch/cloudwatch_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package cloudwatchutils

import (
"fmt"
"testing"
"time"
)

/*
* This function controlls that there is a least 1 log group
* and if there is return it
*/
func TestGetLogGroups(t *testing.T) {

// Chiama la funzione GetLogGroups
groups, err := GetLogGroups()
if err != nil {
t.Errorf("Errore durante la chiamata GetLogGroups: %v", err)
}

if len(groups) == 0 {
t.Errorf("Nessun gruppo di log trovato")
}

//Controlla alcuni gruppi per verificarne la correttezza
for _, group := range groups {
fmt.Println(group.Arn)
}

}

/*
* This function return the export of a given log group
*
*/
func TestExportLog(t *testing.T) {
// Chiamata alla funzione ExportLog per esportare i log
output, err := ExportLog("friends-s3", "/aws/lambda/VisitCountFunction", "export_test", time.Now().Add(-24*time.Hour), time.Now())
if err != nil {
fmt.Println("Errore durante l'esportazione dei log:", err)
return
}

fmt.Println("Attività di esportazione dei log creata con successo:", output)

}
114 changes: 66 additions & 48 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,67 +1,85 @@
module github.com/alessiosavi/GoGPUtils
module GOGPUTILS

go 1.22
go 1.22.0

require (
github.com/alessiosavi/GoGPUtils v0.0.101
github.com/alessiosavi/ahocorasick v0.0.3
github.com/aws/aws-sdk-go-v2 v1.25.0
github.com/aws/aws-sdk-go-v2/config v1.27.0
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.13.2
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.2
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.33.1
github.com/aws/aws-sdk-go-v2/service/codepipeline v1.25.0
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.29.0
github.com/aws/aws-sdk-go-v2/service/ec2 v1.148.0
github.com/aws/aws-sdk-go-v2/service/ecr v1.26.0
github.com/aws/aws-sdk-go-v2/service/glue v1.76.1
github.com/aws/aws-sdk-go-v2/service/iam v1.30.0
github.com/aws/aws-sdk-go-v2/service/identitystore v1.22.1
github.com/aws/aws-sdk-go-v2/service/lambda v1.51.0
github.com/aws/aws-sdk-go-v2/service/rds v1.71.0
github.com/aws/aws-sdk-go-v2/service/redshift v1.42.0
github.com/aws/aws-sdk-go-v2/service/s3 v1.50.1
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.27.1
github.com/aws/aws-sdk-go-v2/service/sesv2 v1.25.0
github.com/aws/aws-sdk-go-v2/service/sfn v1.25.1
github.com/aws/aws-sdk-go-v2/service/sqs v1.30.1
github.com/aws/aws-sdk-go-v2/service/ssm v1.47.0
github.com/aws/aws-sdk-go-v2/service/workspaces v1.37.1
github.com/aws/aws-sdk-go-v2 v1.25.2
github.com/aws/aws-sdk-go-v2/config v1.27.5
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.13.7
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.7
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.34.2
github.com/aws/aws-sdk-go-v2/service/codepipeline v1.26.1
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.30.2
github.com/aws/aws-sdk-go-v2/service/ec2 v1.149.3
github.com/aws/aws-sdk-go-v2/service/ecr v1.27.1
github.com/aws/aws-sdk-go-v2/service/glue v1.77.2
github.com/aws/aws-sdk-go-v2/service/iam v1.31.1
github.com/aws/aws-sdk-go-v2/service/identitystore v1.23.1
github.com/aws/aws-sdk-go-v2/service/lambda v1.53.1
github.com/aws/aws-sdk-go-v2/service/rds v1.74.1
github.com/aws/aws-sdk-go-v2/service/redshift v1.43.1
github.com/aws/aws-sdk-go-v2/service/s3 v1.51.2
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.1
github.com/aws/aws-sdk-go-v2/service/sesv2 v1.26.1
github.com/aws/aws-sdk-go-v2/service/sfn v1.26.1
github.com/aws/aws-sdk-go-v2/service/sqs v1.31.1
github.com/aws/aws-sdk-go-v2/service/ssm v1.49.1
github.com/aws/aws-sdk-go-v2/service/workspaces v1.38.1
github.com/google/uuid v1.6.0
github.com/lib/pq v1.10.9
github.com/pkg/errors v0.9.1
github.com/pkg/sftp v1.13.6
github.com/schollz/progressbar/v3 v3.14.1
golang.org/x/crypto v0.19.0
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a
golang.org/x/net v0.21.0
github.com/schollz/progressbar/v3 v3.14.2
golang.org/x/crypto v0.21.0
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
golang.org/x/net v0.22.0
golang.org/x/text v0.14.0
)

require (
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.0 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.5 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.0 // indirect
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.19.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.19.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.22.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.27.0 // indirect
github.com/aws/smithy-go v1.20.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.2 // indirect
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.20.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.2 // indirect
github.com/aws/smithy-go v1.20.1 // indirect
github.com/cilium/ebpf v0.11.0 // indirect
github.com/cosiner/argv v0.1.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/derekparker/trie v0.0.0-20230829180723-39f4de51ef7d // indirect
github.com/go-delve/delve v1.22.1 // indirect
github.com/go-delve/liner v1.2.3-0.20231231155935-4726ab1d7f62 // indirect
github.com/google/go-dap v0.11.0 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/stretchr/testify v1.8.4 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/term v0.17.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.starlark.net v0.0.0-20231101134539-556fd59b42f6 // indirect
golang.org/x/arch v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading