-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
9,662 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: v2 | ||
managed: | ||
enabled: true | ||
override: | ||
- file_option: go_package_prefix | ||
value: github.com/crlssn/getstronger/go/pkg/pb | ||
disable: | ||
- module: buf.build/bufbuild/protovalidate | ||
plugins: | ||
- remote: buf.build/protocolbuffers/go | ||
out: go/pkg/pb | ||
opt: paths=source_relative | ||
- remote: buf.build/connectrpc/go | ||
out: go/pkg/pb | ||
opt: paths=source_relative | ||
inputs: | ||
- directory: proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Generated by buf. DO NOT EDIT. | ||
version: v2 | ||
deps: | ||
- name: buf.build/bufbuild/protovalidate | ||
commit: a6c49f84cc0f4e038680d390392e2ab0 | ||
digest: b5:e968392e88ff7915adcbd1635d670b45bff8836ec2415d81fc559ca5470a695dbdc30030bad8bc5764647c731079e9e7bba0023ea25c4e4a1672a7d2561d4a19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# For details on buf.yaml configuration, visit https://buf.build/docs/configuration/v2/buf-yaml | ||
version: v2 | ||
modules: | ||
- path: proto | ||
lint: | ||
use: | ||
- DEFAULT | ||
breaking: | ||
use: | ||
- FILE | ||
deps: | ||
- buf.build/bufbuild/protovalidate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
CREATE SCHEMA IF NOT EXISTS getstronger; | ||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
CREATE TABLE getstronger.auth | ||
( | ||
id UUID PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(), | ||
email VARCHAR(255) NOT NULL UNIQUE, | ||
password BYTEA NOT NULL, | ||
created_at TIMESTAMP NOT NULL DEFAULT (NOW() AT TIME ZONE 'UTC') | ||
); | ||
|
||
CREATE TABLE getstronger.users | ||
( | ||
id UUID PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(), | ||
auth_id UUID NOT NULL REFERENCES getstronger.auth (id), | ||
name VARCHAR NOT NULL, | ||
created_at TIMESTAMP NOT NULL DEFAULT (NOW() AT TIME ZONE 'UTC') | ||
); | ||
|
||
CREATE TABLE getstronger.routines | ||
( | ||
id UUID PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(), | ||
user_id UUID NOT NULL REFERENCES getstronger.users (id), | ||
title VARCHAR NOT NULL, | ||
created_at TIMESTAMP NOT NULL DEFAULT (NOW() AT TIME ZONE 'UTC') | ||
); | ||
|
||
CREATE TABLE getstronger.exercises | ||
( | ||
id UUID PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(), | ||
user_id UUID NOT NULL REFERENCES getstronger.users (id), | ||
title VARCHAR NOT NULL, | ||
sub_title VARCHAR, | ||
created_at TIMESTAMP NOT NULL DEFAULT (NOW() AT TIME ZONE 'UTC') | ||
); | ||
|
||
CREATE TABLE getstronger.routine_exercises | ||
( | ||
routine_id UUID NOT NULL REFERENCES getstronger.routines (id), | ||
exercise_id UUID NOT NULL REFERENCES getstronger.exercises (id), | ||
PRIMARY KEY (routine_id, exercise_id) | ||
); | ||
|
||
CREATE TABLE getstronger.workouts | ||
( | ||
id UUID PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(), | ||
user_id UUID NOT NULL REFERENCES getstronger.users (id), | ||
date DATE NOT NULL, | ||
created_at TIMESTAMP NOT NULL DEFAULT (NOW() AT TIME ZONE 'UTC') | ||
); | ||
|
||
CREATE TABLE getstronger.sets | ||
( | ||
id UUID PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(), | ||
workout_id UUID NOT NULL REFERENCES getstronger.workouts (id), | ||
exercise_id UUID NOT NULL REFERENCES getstronger.exercises (id), | ||
weight DECIMAL(8, 2) NOT NULL, | ||
reps INT NOT NULL, | ||
created_at TIMESTAMP NOT NULL DEFAULT (NOW() AT TIME ZONE 'UTC') | ||
); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
output = "pkg/orm" | ||
output = "go/pkg/orm" | ||
pkgname = "orm" | ||
wipe = true | ||
no-tests = true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,50 @@ | ||
module getstronger | ||
module github.com/crlssn/getstronger | ||
|
||
go 1.23.0 | ||
|
||
require ( | ||
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240920164238-5a7b106cbb87.2 | ||
connectrpc.com/connect v1.16.2 | ||
github.com/bufbuild/protovalidate-go v0.7.2 | ||
github.com/friendsofgo/errors v0.9.2 | ||
github.com/golang-jwt/jwt/v5 v5.2.1 | ||
github.com/google/uuid v1.6.0 | ||
github.com/jackc/pgx/v5 v5.6.0 | ||
github.com/stretchr/testify v1.9.0 | ||
github.com/volatiletech/null/v8 v8.1.2 | ||
github.com/volatiletech/sqlboiler/v4 v4.16.2 | ||
github.com/volatiletech/strmangle v0.0.6 | ||
go.uber.org/fx v1.22.2 | ||
go.uber.org/zap v1.26.0 | ||
golang.org/x/crypto v0.27.0 | ||
google.golang.org/grpc v1.67.1 | ||
google.golang.org/protobuf v1.35.1 | ||
) | ||
|
||
require ( | ||
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/ericlagergren/decimal v0.0.0-20190420051523-6335edbaa640 // indirect | ||
github.com/gofrs/uuid v4.2.0+incompatible // indirect | ||
github.com/google/cel-go v0.21.0 // indirect | ||
github.com/jackc/pgpassfile v1.0.0 // indirect | ||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect | ||
github.com/jackc/puddle/v2 v2.2.1 // indirect | ||
github.com/lib/pq v1.10.6 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/spf13/cast v1.5.0 // indirect | ||
github.com/stoewer/go-strcase v1.3.0 // indirect | ||
github.com/volatiletech/inflect v0.0.1 // indirect | ||
github.com/volatiletech/randomize v0.0.1 // indirect | ||
go.uber.org/dig v1.18.0 // indirect | ||
go.uber.org/multierr v1.10.0 // indirect | ||
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect | ||
golang.org/x/net v0.29.0 // indirect | ||
golang.org/x/sync v0.8.0 // indirect | ||
golang.org/x/sys v0.25.0 // indirect | ||
golang.org/x/text v0.18.0 // indirect | ||
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect | ||
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
Oops, something went wrong.