Skip to content

Commit 37fbb24

Browse files
committed
Initial commit
0 parents  commit 37fbb24

89 files changed

Lines changed: 16417 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.

.dockerignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Logs
2+
**/logs
3+
**/*.log
4+
**/npm-debug.log*
5+
**/yarn-debug.log*
6+
**/yarn-error.log*
7+
**/pnpm-debug.log*
8+
**/lerna-debug.log*
9+
10+
**/node_modules
11+
**/dist
12+
**/dist-ssr
13+
**/*.local
14+
15+
# Editor directories and files
16+
**/.vscode/*
17+
!**/.vscode/extensions.json
18+
**/.idea
19+
**/.DS_Store
20+
**/*.suo
21+
**/*.ntvs*
22+
**/*.njsproj
23+
**/*.sln
24+
**/*.sw?
25+
26+
# Default ignored files
27+
.idea/shelf
28+
.idea/workspace.xml
29+
# Editor-based HTTP Client requests
30+
.idea/httpRequests
31+
# Datasource local storage ignored files
32+
.idea/dataSources
33+
.idea/dataSources.local.xml
34+
35+
# Logs
36+
cmd/sql-to-logsql/web/ui/**/logs
37+
cmd/sql-to-logsql/web/ui/**/*.log
38+
cmd/sql-to-logsql/web/ui/**/npm-debug.log*
39+
cmd/sql-to-logsql/web/ui/**/yarn-debug.log*
40+
cmd/sql-to-logsql/web/ui/**/yarn-error.log*
41+
cmd/sql-to-logsql/web/ui/**/pnpm-debug.log*
42+
cmd/sql-to-logsql/web/ui/**/lerna-debug.log*
43+
44+
cmd/sql-to-logsql/web/ui/**/node_modules
45+
cmd/sql-to-logsql/web/ui/**/dist
46+
cmd/sql-to-logsql/web/ui/**/dist-ssr
47+
cmd/sql-to-logsql/web/ui/**/*.local
48+
49+
# Editor directories and files
50+
cmd/sql-to-logsql/web/ui/**/.vscode/*
51+
!cmd/sql-to-logsql/web/ui/**/.vscode/extensions.json
52+
cmd/sql-to-logsql/web/ui/**/.idea
53+
cmd/sql-to-logsql/web/ui/**/.DS_Store
54+
cmd/sql-to-logsql/web/ui/**/*.suo
55+
cmd/sql-to-logsql/web/ui/**/*.ntvs*
56+
cmd/sql-to-logsql/web/ui/**/*.njsproj
57+
cmd/sql-to-logsql/web/ui/**/*.sln
58+
cmd/sql-to-logsql/web/ui/**/*.sw?
59+
60+
.git
61+
vendor
62+
gocache-for-docker
63+
.idea
64+
.zed
65+
.vscode

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @Amper

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "gomod"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
open-pull-requests-limit: 5
12+
- package-ecosystem: "docker"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"

.github/workflows/lint.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Lint
2+
3+
on:
4+
push: { }
5+
pull_request: { }
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v5
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v6
18+
with:
19+
go-version: "1.25.1"
20+
21+
- name: Run ui build
22+
run: make ui-build
23+
24+
- name: golangci-lint
25+
uses: golangci/golangci-lint-action@v8
26+
with:
27+
version: v2.4
28+
29+
- name: Run lint
30+
run: make lint
31+
32+
- name: Run check
33+
run: make check
34+
35+
- name: Run test
36+
run: make test
37+
38+
- name: Run build
39+
run: make build

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: build
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
packages: write
11+
id-token: write
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
steps:
17+
18+
- name: Checkout
19+
uses: actions/checkout@v5
20+
21+
- name: Setup Go
22+
uses: actions/setup-go@v6
23+
with:
24+
go-version: 1.25.1
25+
26+
- name: Check licenses and vulnerabilities
27+
run: make check
28+
29+
- name: Run ui build
30+
run: make ui-build
31+
32+
- name: golangci-lint
33+
uses: golangci/golangci-lint-action@v8
34+
with:
35+
version: v2.4
36+
37+
- name: Tests
38+
run: make test
39+
40+
- name: Set up QEMU
41+
uses: docker/setup-qemu-action@v3
42+
43+
- name: Set up Docker Buildx
44+
uses: docker/setup-buildx-action@v3
45+
46+
- name: Docker Login
47+
uses: docker/login-action@v3
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.repository_owner }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
53+
- name: Build and release
54+
uses: goreleaser/goreleaser-action@v6
55+
if: success() && startsWith(github.ref, 'refs/tags/')
56+
with:
57+
args: release --clean --verbose --timeout 60m -f .goreleaser.yaml
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
/sql-to-logsql

.golangci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: "2"
2+
linters:
3+
exclusions:
4+
generated: lax
5+
presets:
6+
- comments
7+
- common-false-positives
8+
- legacy
9+
- std-error-handling
10+
paths:
11+
- third_party$
12+
- builtin$
13+
- examples$
14+
15+
formatters:
16+
exclusions:
17+
generated: lax
18+
paths:
19+
- third_party$
20+
- builtin$
21+
- examples$

.goreleaser.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
version: 2
2+
project_name: sql-to-logsql
3+
4+
before:
5+
hooks:
6+
- make ui-build
7+
8+
builds:
9+
- env:
10+
- CGO_ENABLED=0
11+
goos:
12+
- linux
13+
- windows
14+
- darwin
15+
goarch:
16+
- amd64
17+
- arm64
18+
- arm
19+
- "386"
20+
hooks:
21+
pre: make ui-build
22+
main: ./cmd/sql-to-logsql/main.go
23+
binary: sql-to-logsql
24+
ldflags:
25+
- -X main.version={{.Version}} -X main.date={{ .CommitDate }}
26+
27+
archives:
28+
- formats: [tar.gz]
29+
# this name template makes the OS and Arch compatible with the results of `uname`.
30+
name_template: >-
31+
{{ .ProjectName }}_
32+
{{- title .Os }}_
33+
{{- if eq .Arch "amd64" }}x86_64
34+
{{- else if eq .Arch "386" }}i386
35+
{{- else }}{{ .Arch }}{{ end }}
36+
{{- if .Arm }}v{{ .Arm }}{{ end }}
37+
# use zip for windows archives
38+
format_overrides:
39+
- goos: windows
40+
formats: [zip]
41+
42+
checksum:
43+
name_template: 'checksums.txt'
44+
45+
snapshot:
46+
version_template: "{{ .Tag }}-next"
47+
48+
changelog:
49+
sort: asc
50+
51+
dockers_v2:
52+
- images:
53+
- "ghcr.io/victoriametrics-community/sql-to-logsql"
54+
tags:
55+
- latest
56+
- "v{{ .Version }}"
57+
dockerfile: Dockerfile.goreleaser
58+
labels:
59+
"org.opencontainers.image.title": "{{.ProjectName}}"
60+
"org.opencontainers.image.description": "{{.ProjectName}}"
61+
"org.opencontainers.image.url": "{{.GitURL}}"
62+
"org.opencontainers.image.source": "{{.GitURL}}"
63+
"org.opencontainers.image.version": "{{.Version}}"
64+
"org.opencontainers.image.created": "{{.Date}}"
65+
"org.opencontainers.image.revision": "{{.FullCommit}}"
66+
"org.opencontainers.image.licenses": "Apache-2.0"
67+
annotations:
68+
"project": "{{.ProjectName}}"
69+
platforms:
70+
- linux/amd64
71+
- linux/arm64
72+

.wwhrd.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
allowlist:
2+
- Apache-2.0
3+
- MIT
4+
- BSD-3-Clause
5+
- BSD-2-Clause
6+
- ISC
7+
- MPL-2.0

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues and other contributions
42+
that are not aligned to this Code of Conduct or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing or otherwise unacceptable behavior may be
58+
reported by contacting the project team at info@victoriametrics.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate for the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
<https://www.contributor-covenant.org/faq>

0 commit comments

Comments
 (0)