Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: no-src/gofs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.0
Choose a base ref
...
head repository: no-src/gofs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Nov 29, 2021

  1. Add support gin web server, and implement basic auth and login middle…

    …ware for file server.
    mstmdev committed Nov 29, 2021
    Copy the full SHA
    4ddd76c View commit details
  2. Custom the gin log formatter.

    Update dependency, github.com/no-src/log v0.0.5 => github.com/no-src/log v0.0.6.
    mstmdev committed Nov 29, 2021
    Copy the full SHA
    827ed2c View commit details
  3. Change gin default mode is release.

    Use log.DefaultLogger as gin.DefaultWriter.
    mstmdev committed Nov 29, 2021
    Copy the full SHA
    a48760e View commit details
  4. Copy the full SHA
    996212d View commit details

Commits on Nov 30, 2021

  1. Copy the full SHA
    c55a7f9 View commit details
  2. The file server allows anonymous access if there is no effective acco…

    …unt from server_users flag.
    mstmdev committed Nov 30, 2021
    Copy the full SHA
    e2c746a View commit details

Commits on Dec 1, 2021

  1. Copy the full SHA
    7dcb7a0 View commit details
  2. Copy the full SHA
    158b974 View commit details
  3. Copy the full SHA
    a28d49a View commit details

Commits on Dec 5, 2021

  1. Copy the full SHA
    9a90528 View commit details
  2. Copy the full SHA
    439177e View commit details

Commits on Dec 7, 2021

  1. Copy the full SHA
    5c97954 View commit details
  2. Copy the full SHA
    c8f4f45 View commit details

Commits on Dec 8, 2021

  1. Copy the full SHA
    6320779 View commit details
  2. Copy the full SHA
    0f749c3 View commit details
  3. Add the server_compress flag to control the file server response comp…

    …ress.
    
    Add the Option struct as file server options.
    mstmdev committed Dec 8, 2021
    Copy the full SHA
    e40c2b5 View commit details
  4. Add the server_tmpl_override flag to support force override all templ…

    …ate resources when it releases
    mstmdev committed Dec 8, 2021
    Copy the full SHA
    8cbdf8b View commit details
  5. Copy the full SHA
    030f04f View commit details

Commits on Dec 10, 2021

  1. Reduce the monitor writes file repeated, because the write event will…

    … trigger twice or more in some cases maybe
    mstmdev committed Dec 10, 2021
    Copy the full SHA
    c081599 View commit details
  2. Copy the full SHA
    3f91e47 View commit details

Commits on Dec 11, 2021

  1. Copy the full SHA
    569e9f2 View commit details
  2. Copy the full SHA
    6f838d4 View commit details

Commits on Dec 13, 2021

  1. Use the list.List to save messages and events, avoid lost data, and r…

    …emove the msg_queue param
    mstmdev committed Dec 13, 2021
    Copy the full SHA
    c0f02c2 View commit details

Commits on Dec 16, 2021

  1. Update some logs

    mstmdev committed Dec 16, 2021
    Copy the full SHA
    50d87e3 View commit details

Commits on Dec 20, 2021

  1. Copy the full SHA
    872039a View commit details

Commits on Dec 22, 2021

  1. Copy the full SHA
    0ad767c View commit details
  2. Copy the full SHA
    d905622 View commit details

Commits on Dec 23, 2021

  1. Copy the full SHA
    040bb19 View commit details
  2. Copy the full SHA
    389f72c View commit details
  3. Copy the full SHA
    c627eff View commit details
  4. Copy the full SHA
    99ea2bf View commit details
  5. Copy the full SHA
    e0d2b6c View commit details
  6. Fix MD5FromFile write incorrect size bytes

    Add MD5FromFileName func to calculate file hash with file path
    mstmdev committed Dec 23, 2021
    Copy the full SHA
    d482ba2 View commit details
  7. Copy the full SHA
    f979cb4 View commit details
  8. Copy the full SHA
    56d8b63 View commit details
  9. The create event does not truncate the file, that will truncate file …

    …before writing to file now
    
    Optimize the sync_once command, support just sync the changed files
    mstmdev committed Dec 23, 2021
    Copy the full SHA
    213f177 View commit details
  10. Fix the web server allows unauthorized access, the default auth middl…

    …eware is not abort the route when auth failed
    mstmdev committed Dec 23, 2021
    Copy the full SHA
    d390a84 View commit details
  11. Copy the full SHA
    d12cbf8 View commit details
  12. Code refactoring for gin

    mstmdev committed Dec 23, 2021
    Copy the full SHA
    88bc218 View commit details
  13. Copy the full SHA
    c7d83ac View commit details

Commits on Dec 24, 2021

  1. Code refactoring

    mstmdev committed Dec 24, 2021
    Copy the full SHA
    aee1ab1 View commit details

Commits on Dec 27, 2021

  1. Copy the full SHA
    c515b02 View commit details

Commits on Dec 28, 2021

  1. Copy the full SHA
    b282e43 View commit details
  2. Copy the full SHA
    f834e91 View commit details
  3. Return file identity as hash key, that removes the query section if t…

    …he file name is an url
    mstmdev committed Dec 28, 2021
    Copy the full SHA
    8f709d5 View commit details
  4. Copy the full SHA
    f1d5ea2 View commit details
  5. Create the file first if that does not exist when trigger write actio…

    …n, then asynchronous execute the write in the background
    mstmdev committed Dec 28, 2021
    Copy the full SHA
    f847d0f View commit details
  6. Copy the full SHA
    116e810 View commit details
  7. Copy the full SHA
    697347f View commit details
  8. Copy the full SHA
    b22baf3 View commit details
Showing 334 changed files with 22,494 additions and 1,968 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
74 changes: 74 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '0 18 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
29 changes: 29 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Docker

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

build:
strategy:
matrix:
os: [ 'ubuntu-latest' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Build Docker
run: chmod +x ./scripts/build-docker.sh && ./scripts/build-docker.sh

- name: Test Print Version
run: chmod +x ./scripts/docker-example/run-gofs-docker-print-version.sh && ./scripts/docker-example/run-gofs-docker-print-version.sh

- name: Test Checksum
run: chmod +x ./scripts/docker-example/run-gofs-docker-checksum.sh && ./scripts/docker-example/run-gofs-docker-checksum.sh

- name: Test Timezone
run: chmod +x ./scripts/docker-example/run-gofs-docker-timezone.sh && ./scripts/docker-example/run-gofs-docker-timezone.sh
56 changes: 45 additions & 11 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
@@ -11,19 +14,50 @@ jobs:
build:
strategy:
matrix:
go: [ '1.17' ]
os: [ 'ubuntu-latest', 'windows-latest' ]
go: [ '1.22', '1.23' ]
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Init Env
run: chmod +x ./scripts/init-env.sh && ./scripts/init-env.sh
if: matrix.os != 'windows-latest'

- name: Init SFTP
run: chmod +x ./scripts/sftp/*.sh && ./scripts/sftp/init-sftp.sh
if: matrix.os == 'ubuntu-latest'

- name: Build
run: go build -v ./...

- name: Test
run: go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic -timeout=10m

- name: Test Integration
run: go test -v -race -tags=integration_test ./integration

- name: Test Integration Task
run: go test -v -race -tags=integration_test_task ./integration

- name: Install and mount MinIO
run: chmod +x ./scripts/minio/*.sh && ./scripts/minio/install-minio.sh && ./scripts/minio/mount-minio.sh
if: matrix.os == 'ubuntu-latest'

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Test Integration MinIO
run: go test -v -race -tags=integration_test_minio ./integration
if: matrix.os == 'ubuntu-latest'

- name: Build
run: go build -v ./...
- name: Test Integration SFTP
run: go test -v -race -tags=integration_test_sftp ./integration
if: matrix.os == 'ubuntu-latest'

- name: Test
run: go test -v ./...
- name: Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Govulncheck

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

build:
strategy:
matrix:
go: [ 'stable' ]
os: [ 'ubuntu-latest' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Scan Vulnerabilities
run: chmod +x ./scripts/govulncheck.sh && ./scripts/govulncheck.sh
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Release

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

build:
strategy:
matrix:
go: [ 'stable' ]
os: [ 'ubuntu-latest' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Test Release
run: chmod +x ./scripts/build-release.sh && ./scripts/build-release.sh
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
@@ -13,6 +16,11 @@

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work

.idea/
.vscode/
bin/
.run/
Loading