Skip to content
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
19 changes: 19 additions & 0 deletions golang-immudb/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# syntax=docker/dockerfile:1
FROM golang:1.24.4-alpine as build

WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download

COPY . .
RUN go build -o immudb-writer

FROM alpine:3.18
WORKDIR /app
COPY --from=build /app/immudb-writer /app/immudb-writer

# Copy your config.json
COPY config.json .

CMD ["./immudb-writer"]

21 changes: 21 additions & 0 deletions golang-immudb/activity.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package main

type ActivityLog struct {
ID string `json:"id"`
AssetName string `json:"asset_name"`
AssetType string `json:"asset_type"`
Operation string `json:"operation"`
CreatedAt string `json:"created_at"`
AssetID string `json:"asset_id"`
API string `json:"api"`
Method string `json:"method"`
Size int64 `json:"size"`
Role string `json:"role"`
UserID string `json:"user_id"`
OriginServer string `json:"origin_server"`
ShortDescription string `json:"short_description"`
MyactivityEnabled bool `json:"myactivity_enabled"`
OrganizationID *string `json:"org_id"`
OrganizationName *string `json:"org_name"`
}

20 changes: 20 additions & 0 deletions golang-immudb/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"dataBrokerIP": "",
"dataBrokerPort": 2468,
"dataBrokerUserName": "",
"dataBrokerPassword": "",
"connectionTimeout": 60000,
"requestedHeartbeat": 60,
"handshakeTimeout": 10000,
"requestedChannelMax": 100,
"networkRecoveryInterval": 5000,
"virtualHost": "",
"queueName": "immudb-msg",

"immuDatabaseIP": "",
"immuDatabasePort": 32322,
"immuDatabaseName": "tgdex_testing",
"immuDatabaseUserName": "",
"immuDatabasePassword": "",
"immuPoolSize": 25
}
22 changes: 22 additions & 0 deletions golang-immudb/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '3.8'

services:
immudb-writer:
build: .
environment:
METERING_DATABASE_IP: database.iudx.io
METERING_DATABASE_PORT: 3322
METERING_DATABASE_USERNAME: immudb
METERING_DATABASE_PASSWORD: KNQCXZvIi*8NrRnRh
METERING_DATABASE_NAME: tgdex_testing

DATA_BROKER_IP: databroker.iudx.io
DATA_BROKER_PORT: 24568
DATA_BROKER_USERNAME: admin
DATA_BROKER_PASSWORD: pxSe%dnBmdFNK#g^:Cax0I4>qGkTgX
VIRTUAL_HOST: IUDX_INTERNAL
REQUESTED_HEARTBEAT: 5000
CONNECTION_TIMEOUT: 60000
ports:
- "8080:8080"

51 changes: 51 additions & 0 deletions golang-immudb/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
module rabbitmq-consumer

go 1.24.4

require (
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
github.com/aead/chacha20poly1305 v0.0.0-20201124145622-1a5aba2a8b29 // indirect
github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/codenotary/immudb v1.9.7 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/o1egl/paseto v1.0.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.12.2 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rabbitmq/amqp091-go v1.10.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/rs/xid v1.5.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.6.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.15.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/grpc v1.57.1 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading