diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..b030b853 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,56 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/alpine +{ + "name": "Alpine", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:alpine-3.17", + "features": { + "ghcr.io/devcontainers-contrib/features/act:1": { + "version": "latest" + }, + "ghcr.io/devcontainers-contrib/features/act-asdf:2": { + "version": "latest" + }, + "ghcr.io/devcontainers-contrib/features/age-keygen:1": { + "version": "latest" + }, + "ghcr.io/dhoeric/features/act:1": {}, + "ghcr.io/flexwie/devcontainer-features/op:1": {}, + "ghcr.io/devcontainers/features/anaconda:1": { + "version": "latest" + }, + "ghcr.io/devcontainers-contrib/features/alp-asdf:2": { + "version": "latest" + }, + "ghcr.io/akhildevelops/devcontainer-features/android-cli:0": {}, + "ghcr.io/akhildevelops/devcontainer-features/apt:0": {}, + "ghcr.io/jarrodcolburn/features/android-sdk:0": { + "emulator": true, + "platforms": "33", + "build-tools": "33.0.2" + }, + "ghcr.io/gmkonan/feature/airplane:1": {} + }, + "customizations": { + "vscode": { + "extensions": [ + "golang.go" + ] + } + } + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.ipynb_checkpoints/untitled-checkpoint.py b/.ipynb_checkpoints/untitled-checkpoint.py new file mode 100644 index 00000000..e69de29b diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..7203cb3f --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "golang.go" + ] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..e6a31c91 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,135 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "name": "Connect to server", + "type": "go", + "request": "attach", + "mode": "remote", + "remotePath": "${workspaceFolder}", + "port": 2345, + "host": "127.0.0.1" + }, + { + "name": "Attach to Chrome", + "port": 9222, + "request": "attach", + "type": "chrome", + "webRoot": "${workspaceFolder}" + }, + { + "name": "Launch Chrome", + "request": "launch", + "type": "chrome", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + }, + { + "name": "Attach to Chrome", + "port": 9222, + "request": "attach", + "type": "chrome", + "webRoot": "${workspaceFolder}" + }, + { + "name": "Connect to server", + "type": "go", + "request": "attach", + "mode": "remote", + "remotePath": "${workspaceFolder}", + "port": 2345, + "host": "127.0.0.1" + }, + { + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}" + ], + "name": "Launch Extension", + "outFiles": [ + "${workspaceFolder}/out/**/*.js" + ], + "preLaunchTask": "npm", + "request": "launch", + "type": "extensionHost" + }, + { + "name": "Connect to server", + "type": "go", + "request": "attach", + "mode": "remote", + "remotePath": "${workspaceFolder}", + "port": 2345, + "host": "127.0.0.1" + }, + { + "name": "\","type": "go","request": "attach", + "mode": "remote", + "remotePath": "${workspaceFolder}", + "port": 2345, + "host": "127.0.0.1" + }, + { + "name": "","type": "go","request": "attach", + "mode": "remote", + "remotePath": "${workspaceFolder}", + "port": 2345, + "host": "127.0.0.1" + }, + { + "name": "Launch Edge", + "request": "launch", + "type": "msedge", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + }, + { + "name": "Launch test function", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${workspaceFolder}", + "args": [ + "-test.run", + "MyTestFunction" + ] + }, + { + "name": "Launch test function", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${workspaceFolder}", + "args": [ + "-test.run", + "MyTestFunction" + ] + }, + { + "name": "Launch Package", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${fileDirname}" + }, + { + "name": "Connect to server", + "type": "go", + "request": "attach", + "mode": "remote", + "remotePath": "${workspaceFolder}", + "port": 2345, + "host": "127.0.0.1" + }, + { + "type": "chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..3addd250 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "go.toolsEnvVars": { + "GOPRIVATE": "", + "GOPATH": "/go" + }, + "python.analysis.typeCheckingMode": "basic" +} \ No newline at end of file diff --git a/ansible-playbook/hosts b/ansible-playbook/hosts index 7b9ad531..138eb770 100644 --- a/ansible-playbook/hosts +++ b/ansible-playbook/hosts @@ -1 +1,2 @@ 127.0.0.1 + diff --git a/controllers/controllers_test.go b/controllers/controllers_test.go index 31de71f1..ed82a4b0 100644 --- a/controllers/controllers_test.go +++ b/controllers/controllers_test.go @@ -86,8 +86,11 @@ func createTestData(t *testing.T) { // Add a group group := models.Group{Name: "Test Group"} group.Targets = []models.Target{ - models.Target{BaseRecipient: models.BaseRecipient{Email: "test1@example.com", FirstName: "First", LastName: "Example"}}, - models.Target{BaseRecipient: models.BaseRecipient{Email: "test2@example.com", FirstName: "Second", LastName: "Example"}}, + {BaseRecipient: models.BaseRecipient{Email: "test1@example.com", FirstName: "First", LastName: "Example"}}, + { + Id: 0, + BaseRecipient: models.BaseRecipient{Email: "test2@example.com", FirstName: "Second", LastName: "Example"}, + }, } group.UserId = 1 models.PostGroup(&group) diff --git a/untitled.py b/untitled.py new file mode 100644 index 00000000..e69de29b