Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old frontend #33

Merged
merged 2 commits into from
Oct 8, 2023
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,26 @@ jobs:
run: |
go test -v -mod=vendor -timeout=60s -covermode=count -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./...
cat $GITHUB_WORKSPACE/profile.cov_tmp | grep -v "mock_" > $GITHUB_WORKSPACE/profile.cov
working-directory: backend/app
working-directory: app
env:
TZ: "America/Chicago"

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
working-directory: backend

- name: install goveralls
run: go install github.com/mattn/goveralls@latest
working-directory: backend

- name: build
run: go build -v -mod=vendor
working-directory: backend/app
working-directory: app

- name: submit coverage
run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: backend

- name: build pr image
if: github.event_name == 'pull_request'
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ ARG SKIP_TEST

ENV GOFLAGS="-mod=vendor"

ADD backend /build/secrets
ADD backend/ui/static /build/secrets/ui/static
ADD .git /build/secrets/.git
ADD . /build/secrets
WORKDIR /build/secrets

# run tests and linters
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Create a **safesecret** link to your message by entering 3 things:
The PIN is (typically) numeric and easy to pass by a voice call or text message.
Each link can be opened only **once** and the number of attempts to enter a wrong PIN is limited to 3 times by default.

[![ScreenShot](https://raw.github.com/umputun/secrets/master/frontend/demo/demo.png)](https://www.youtube.com/watch?v=erT1QYiDD-Q)
[![ScreenShot](https://raw.github.com/umputun/secrets/master/demo.png)](https://www.youtube.com/watch?v=erT1QYiDD-Q)

## How safe is this thing

Expand Down
6 changes: 3 additions & 3 deletions backend/app/main.go → app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
log "github.com/go-pkgz/lgr"
"github.com/umputun/go-flags"

"github.com/umputun/secrets/backend/app/messager"
"github.com/umputun/secrets/backend/app/server"
"github.com/umputun/secrets/backend/app/store"
"github.com/umputun/secrets/app/messager"
"github.com/umputun/secrets/app/server"
"github.com/umputun/secrets/app/store"
)

var opts struct {
Expand Down
File renamed without changes.
32 changes: 17 additions & 15 deletions backend/app/messager/crypt_mock.go → app/messager/crypt_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
52 changes: 28 additions & 24 deletions backend/app/messager/engine_mock.go → app/messager/engine_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/pkg/errors"
"golang.org/x/crypto/bcrypt"

"github.com/umputun/secrets/backend/app/store"
"github.com/umputun/secrets/app/store"
)

//go:generate moq -out crypt_mock.go -fmt goimports . Crypter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/umputun/secrets/backend/app/store"
"github.com/umputun/secrets/app/store"
)

func TestMessageProc_NewDefault(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions backend/app/server/server.go → app/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
log "github.com/go-pkgz/lgr"
um "github.com/go-pkgz/rest"

"github.com/umputun/secrets/backend/app/messager"
"github.com/umputun/secrets/backend/app/store"
"github.com/umputun/secrets/app/messager"
"github.com/umputun/secrets/app/store"
)

// Server is a rest with store
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/umputun/secrets/backend/app/messager"
"github.com/umputun/secrets/backend/app/store"
"github.com/umputun/secrets/app/messager"
"github.com/umputun/secrets/app/store"
)

func TestServer_saveAndLoadMemory(t *testing.T) {
Expand Down
16 changes: 9 additions & 7 deletions backend/app/server/web.go → app/server/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@ package server
import (
"bytes"
"fmt"
"github.com/go-chi/chi/v5"
log "github.com/go-pkgz/lgr"
"github.com/pkg/errors"
"github.com/umputun/secrets/backend/app/messager"
"github.com/umputun/secrets/backend/app/store"
"github.com/umputun/secrets/backend/app/validator"
"github.com/umputun/secrets/backend/ui"
"html/template"
"io/fs"
"net/http"
"path/filepath"
"strconv"
"strings"
"time"

"github.com/go-chi/chi/v5"
log "github.com/go-pkgz/lgr"
"github.com/pkg/errors"

"github.com/umputun/secrets/app/messager"
"github.com/umputun/secrets/app/store"
"github.com/umputun/secrets/app/validator"
"github.com/umputun/secrets/ui"
)

const (
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
4 changes: 0 additions & 4 deletions frontend/.gitignore

This file was deleted.

Loading