Skip to content
This repository was archived by the owner on Oct 31, 2021. It is now read-only.

Commit bb014e8

Browse files
committed
Cleaning up and migrating to monetr
1 parent 7092437 commit bb014e8

Some content is hidden

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

63 files changed

+114
-159
lines changed

.deepsource.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "go"
77
enabled = true
88

99
[analyzers.meta]
10-
import_paths = ["github.com/HarderThanItNeedsToBe/rest-api/v0"]
10+
import_paths = ["github.com/monetrapp/rest-api"]
1111

1212
[[analyzers]]
1313
name = "test-coverage"

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Binary:
6767
- k8s:shared
6868
- arch:amd64
6969
script:
70-
- go build -o ./bin/rest-api-${GOARCH} github.com/harderthanitneedstobe/rest-api/v0/cmd/api
70+
- go build -o ./bin/rest-api-${GOARCH} github.com/monetrapp/rest-api/cmd/api
7171
cache:
7272
key: go-${CI_COMMIT_SHA}
7373
paths:

Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@ FROM golang:1.16.3-alpine3.13 as builder
22
COPY ./ /build
33
WORKDIR /build
44
RUN go get ./...
5-
RUN go build -o /bin/rest-api github.com/harderthanitneedstobe/rest-api/v0/cmd/api
5+
RUN go build -o /bin/rest-api github.com/monetrapp/rest-api/v0/cmd/api
66

77
FROM alpine:3.13.5
88

99
RUN apk add --no-cache tzdata
1010

1111
ARG REVISION
1212

13-
LABEL org.opencontainers.image.url=https://github.com/harderthanitneedstobe/rest-api
14-
LABEL org.opencontainers.image.source=https://github.com/harderthanitneedstobe/rest-api
13+
LABEL org.opencontainers.image.url=https://github.com/monetrapp/rest-api
14+
LABEL org.opencontainers.image.source=https://github.com/monetrapp/rest-api
1515
1616
LABEL org.opencontainers.image.revision=$REVISION
17-
LABEL org.opencontainers.image.vendor="Harder Than It Needs To Be"
17+
LABEL org.opencontainers.image.vendor="monetr"
1818
LABEL org.opencontainers.image.licenses="BSL-1.1"
1919
LABEL org.opencontainers.image.title="REST API"
20-
LABEL org.opencontainers.image.description="Harder Than It Needs To Be's REST API"
20+
LABEL org.opencontainers.image.description="monetr's REST API"
2121

2222
COPY --from=builder /bin/rest-api /usr/bin/rest-api
2323
EXPOSE 4000
24-
VOLUME ["/etc/harder"]
24+
VOLUME ["/etc/monetr"]
2525
ENTRYPOINT ["/usr/bin/rest-api"]

Dockerfile.work

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ RUN go get github.com/gocraft/work/cmd/workwebui
66
RUN go build -o /bin/workwebui github.com/gocraft/work/cmd/workwebui
77
FROM ubuntu:20.04
88

9-
LABEL org.opencontainers.image.url=https://github.com/harderthanitneedstobe/rest-api
9+
LABEL org.opencontainers.image.url=https://github.com/monetrapp/rest-api
1010
LABEL org.opencontainers.image.source=https://github.com/gocraft/work/tree/master/webui
1111
12-
LABEL org.opencontainers.image.vendor="Harder Than It Needs To Be"
12+
LABEL org.opencontainers.image.vendor="monetr"
1313
LABEL org.opencontainers.image.title="Work UI"
1414
LABEL org.opencontainers.image.description="Web UI for viewing gocraft/work information"
1515

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ test:
1919
go tool cover -func=coverage.txt
2020

2121
schema:
22-
go run github.com/harderthanitneedstobe/rest-api/v0/tools/schemagen > schema/00000000_Initial.up.sql
22+
go run github.com/monetrapp/rest-api/tools/schemagen > schema/00000000_Initial.up.sql
2323
(which yarn && yarn sql-formatter -l postgresql -u --lines-between-queries 2 -i 4 \
2424
schema/00000000_Initial.up.sql -o schema/00000000_Initial.up.sql) || true
2525

@@ -62,7 +62,7 @@ staging-dry:
6262
generate_schema:
6363
$(eval TARGET_FILE := $(shell echo "$(TARGET_DIRECTORY)/0_initial.up.sql"))
6464
$(info "Generating current schema into file $(TARGET_FILE)")
65-
go run github.com/harderthanitneedstobe/rest-api/v0/tools/schemagen > $(TARGET_FILE)
65+
go run github.com/monetrapp/rest-api/tools/schemagen > $(TARGET_FILE)
6666
yarn sql-formatter -l postgresql -u --lines-between-queries 2 $(TARGET_FILE) -o $(TARGET_FILE)
6767

6868
migrations:

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# rest-api
22

33
![Gitlab pipeline status (self-hosted)](https://img.shields.io/gitlab/pipeline/harderthanitneedstobe/rest-api/main?gitlab_url=https%3A%2F%2Fgitlab.elliotcourant.dev%2Fgithub.com&logo=gitlab)
4-
[![DeepSource](https://deepsource.io/gh/HarderThanItNeedsToBe/rest-api.svg/?label=active+issues&show_trend=true&token=4x9L6ApemrQ6x80icvE9cEJl)](https://deepsource.io/gh/HarderThanItNeedsToBe/rest-api/?ref=repository-badge)
5-
[![DeepSource](https://deepsource.io/gh/HarderThanItNeedsToBe/rest-api.svg/?label=resolved+issues&show_trend=true&token=4x9L6ApemrQ6x80icvE9cEJl)](https://deepsource.io/gh/HarderThanItNeedsToBe/rest-api/?ref=repository-badge)
4+
[![DeepSource](https://deepsource.io/gh/monetrapp/rest-api.svg/?label=active+issues&show_trend=true&token=4x9L6ApemrQ6x80icvE9cEJl)](https://deepsource.io/gh/monetrapp/rest-api/?ref=repository-badge)
5+
[![DeepSource](https://deepsource.io/gh/monetrapp/rest-api.svg/?label=resolved+issues&show_trend=true&token=4x9L6ApemrQ6x80icvE9cEJl)](https://deepsource.io/gh/monetrapp/rest-api/?ref=repository-badge)
66

7-
This is the REST API behind Harder Than It Needs To Be's budgeting application.
8-
9-
Test Change
7+
This is the REST API behind monetr's budgeting application.

cmd/api/main.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ import (
44
"context"
55
"fmt"
66
"github.com/go-pg/pg/v10/orm"
7-
"github.com/harderthanitneedstobe/rest-api/v0/pkg/application"
8-
"github.com/harderthanitneedstobe/rest-api/v0/pkg/cache"
9-
"github.com/harderthanitneedstobe/rest-api/v0/pkg/jobs"
10-
"github.com/harderthanitneedstobe/rest-api/v0/pkg/metrics"
11-
"github.com/harderthanitneedstobe/rest-api/v0/pkg/migrations"
7+
"github.com/monetrapp/rest-api/pkg/application"
8+
"github.com/monetrapp/rest-api/pkg/cache"
9+
"github.com/monetrapp/rest-api/pkg/jobs"
10+
"github.com/monetrapp/rest-api/pkg/metrics"
11+
"github.com/monetrapp/rest-api/pkg/migrations"
1212
"github.com/plaid/plaid-go/plaid"
1313
"github.com/prometheus/client_golang/prometheus"
1414
"github.com/sirupsen/logrus"
1515
"net/http"
1616
"strings"
1717

1818
"github.com/go-pg/pg/v10"
19-
"github.com/harderthanitneedstobe/rest-api/v0/pkg/config"
20-
"github.com/harderthanitneedstobe/rest-api/v0/pkg/controller"
19+
"github.com/monetrapp/rest-api/pkg/config"
20+
"github.com/monetrapp/rest-api/pkg/controller"
2121
)
2222

2323
var (

cmd/monetr/main.go

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package main
2+
3+
func main() {
4+
// This is going to be the final actual program that is distributed.
5+
}

config.example.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Harder Than It Needs To Be
1+
name: monetr
22
uiDomainName: localhost:3000
33
apiDomainName: localhost:4000
44
allowSignUp: true

go.mod

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
module github.com/harderthanitneedstobe/rest-api/v0
1+
module github.com/monetrapp/rest-api
22

33
go 1.16
44

55
require (
66
github.com/Joker/hpp v1.0.0 // indirect
7-
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
87
github.com/alicebob/miniredis/v2 v2.14.3
98
github.com/brianvoe/gofakeit/v6 v6.4.0
109
github.com/dgrijalva/jwt-go v3.2.0+incompatible
@@ -15,7 +14,6 @@ require (
1514
github.com/hashicorp/vault/api v1.1.0
1615
github.com/iris-contrib/middleware/cors v0.0.0-20210110101738-6d0a4d799b5d
1716
github.com/jarcoal/httpmock v1.0.8
18-
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
1917
github.com/kataras/iris/v12 v12.2.0-alpha2.0.20210127025153-61f04ee4ff51
2018
github.com/kr/text v0.2.0 // indirect
2119
github.com/mailru/easyjson v0.7.7 // indirect
@@ -29,11 +27,11 @@ require (
2927
github.com/sirupsen/logrus v1.8.1
3028
github.com/spf13/viper v1.7.1
3129
github.com/stretchr/testify v1.7.0
32-
github.com/swaggo/swag v1.7.0
3330
github.com/teambition/rrule-go v1.6.2
3431
github.com/xlzd/gotp v0.0.0-20181030022105-c8557ba2c119
3532
github.com/yudai/pp v2.0.1+incompatible // indirect
3633
golang.org/x/text v0.3.5 // indirect
34+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
3735
gopkg.in/ezzarghili/recaptcha-go.v4 v4.3.0
3836
gopkg.in/yaml.v2 v2.4.0 // indirect
3937
)

0 commit comments

Comments
 (0)