Skip to content

Commit d7cdb1b

Browse files
committed
feat: add first version
0 parents  commit d7cdb1b

85 files changed

Lines changed: 6769 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = LF
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 4
10+
11+
[Makefile]
12+
indent_style = tab
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[*.go]
18+
indent_style = tab
19+
20+
[*.yml]
21+
indent_size = 2
22+
23+
[*.yaml]
24+
indent_size = 2
25+
26+
[*.yml.dist]
27+
indent_size = 2

.github/dependabot.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
# Maintain dependencies for GitHub Actions
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
interval: "weekly"
13+
groups:
14+
all-actions:
15+
patterns: [ "*" ]
16+
17+
# Manage Go package versions.
18+
- package-ecosystem: gomod
19+
directory: "/"
20+
schedule:
21+
interval: "weekly"
22+
groups:
23+
opentelemetry:
24+
patterns:
25+
- "go.opentelemetry.io/*"

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copyright 2026 Axel Etcheverry. All rights reserved.
2+
# Use of this source code is governed by a MIT
3+
# license that can be found in the LICENSE file.
4+
5+
name: CI
6+
7+
on:
8+
push:
9+
branches: [main]
10+
pull_request:
11+
branches: [main]
12+
13+
permissions:
14+
contents: read
15+
16+
env:
17+
GO_VERSION: "1.26"
18+
19+
jobs:
20+
ci:
21+
name: Lint & Tests
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v6
25+
26+
- uses: actions/setup-go@v6
27+
with:
28+
go-version: ${{ env.GO_VERSION }}
29+
30+
- name: golangci-lint
31+
uses: golangci/golangci-lint-action@v9
32+
with:
33+
version: v2.10.1
34+
args: --timeout=300s
35+
36+
- name: Run unit tests
37+
run: go test -race -coverprofile=coverage.out -timeout 300s ./...
38+
39+
- name: Upload coverage
40+
uses: actions/upload-artifact@v7
41+
with:
42+
name: coverage-unit
43+
path: coverage.out

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
*.out
3+
4+
vendor/
5+
6+
*.swp

.golangci.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
formatters:
2+
enable:
3+
- gofmt
4+
exclusions:
5+
paths:
6+
- node_modules/.*
7+
- website/.*
8+
- proto/.*
9+
- infra/.*
10+
- build/.*
11+
- .*_mock\.go
12+
- mock_.*\.go
13+
- .*/pkg/mod/.*$
14+
- .*/go/src/.*\.go
15+
- third_party$
16+
- builtin$
17+
- examples$
18+
settings:
19+
gofmt:
20+
simplify: true
21+
goimports:
22+
local-prefixes:
23+
- go.opentelemetry.io
24+
issues:
25+
max-issues-per-linter: 50
26+
linters:
27+
default: none
28+
enable:
29+
- asciicheck
30+
- bodyclose
31+
- dogsled
32+
- durationcheck
33+
- errcheck
34+
- errorlint
35+
- exhaustive
36+
- forbidigo
37+
- forcetypeassert
38+
- goconst
39+
- gocritic
40+
- gocyclo
41+
- godot
42+
- gosec
43+
- govet
44+
- ineffassign
45+
- misspell
46+
- nestif
47+
- nilerr
48+
- noctx
49+
- prealloc
50+
- predeclared
51+
- revive
52+
- sqlclosecheck
53+
- staticcheck
54+
- unconvert
55+
- unused
56+
- whitespace
57+
exclusions:
58+
paths:
59+
- .*_mock\.go
60+
- mock_.*\.go
61+
- .*/pkg/mod/.*$
62+
- .*/go/src/.*\.go
63+
- third_party$
64+
- builtin$
65+
- examples$
66+
- .*/examples/.*
67+
presets:
68+
- comments
69+
- common-false-positives
70+
- legacy
71+
- std-error-handling
72+
settings:
73+
depguard:
74+
rules:
75+
main:
76+
allow:
77+
- $all
78+
dupl:
79+
threshold: 99
80+
errcheck:
81+
check-blank: false
82+
check-type-assertions: false
83+
goconst:
84+
min-len: 3
85+
min-occurrences: 2
86+
gocyclo:
87+
min-complexity: 30
88+
gosec:
89+
excludes:
90+
- G115
91+
govet:
92+
disable:
93+
- shadow
94+
misspell:
95+
ignore-rules:
96+
- cancelled
97+
locale: US
98+
revive:
99+
severity: warning
100+
output:
101+
formats:
102+
text:
103+
path: stdout
104+
print-issued-lines: true
105+
print-linter-name: true
106+
run:
107+
concurrency: 4
108+
issues-exit-code: 1
109+
tests: false
110+
version: "2"

.mockery.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
all: true
2+
dir: '{{.InterfaceDir}}'
3+
filename: 'mock_{{.InterfaceName | snakecase}}.go'
4+
structname: Mock{{.InterfaceName}}
5+
pkgname: '{{.SrcPackageName}}'
6+
inpackage: true
7+
template: testify
8+
template-data:
9+
unroll-variadic: true
10+
packages:
11+
github.com/hyperscale-stack/enigma:
12+
config:
13+
recursive: true

LICENSE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2026 Axel Etcheverry
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

Makefile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
GO_FILES := $(shell find . -type f -name '*.go' -not -path "./vendor/*")
2+
BUILD_DIR := build
3+
4+
_build:
5+
@mkdir -p ${BUILD_DIR}
6+
7+
.PHONY: clean
8+
clean:
9+
@go clean -i ./...
10+
11+
generate:
12+
@echo "Generating code..."
13+
@go generate ./...
14+
15+
$(BUILD_DIR)/coverage.out: _build $(GO_FILES)
16+
@go test -cover -race -coverprofile $(BUILD_DIR)/coverage.out.tmp -timeout 300s ./...
17+
@cat $(BUILD_DIR)/coverage.out.tmp | grep -v '.pb.go' | grep -v 'mock_' > $(BUILD_DIR)/coverage.out
18+
@rm $(BUILD_DIR)/coverage.out.tmp
19+
20+
.PHONY: lint
21+
lint:
22+
ifeq (, $(shell which golangci-lint))
23+
@echo "Install golangci-lint..."
24+
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.3
25+
endif
26+
@echo "lint..."
27+
@golangci-lint run --timeout=300s ./...
28+
29+
.PHONY: test
30+
test: $(BUILD_DIR)/coverage.out
31+
32+
.PHONY: coverage
33+
coverage: $(BUILD_DIR)/coverage.out
34+
@echo ""
35+
@go tool cover -func ./$(BUILD_DIR)/coverage.out
36+
37+
.PHONY: coverage-html
38+
coverage-html: $(BUILD_DIR)/coverage.out
39+
@go tool cover -html ./$(BUILD_DIR)/coverage.out

0 commit comments

Comments
 (0)