Skip to content

Commit d23fa78

Browse files
committed
feat: add working repo
1 parent 00629f0 commit d23fa78

Some content is hidden

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

58 files changed

+2376
-1395
lines changed

api/api_impl/server.go

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,21 @@ import (
55
"errors"
66
"net"
77
"net/http"
8-
9-
"github.com/jiaozifs/jiaozifs/auth"
10-
11-
"github.com/jiaozifs/jiaozifs/auth/crypt"
8+
"net/url"
129

1310
"github.com/MadAppGang/httplog"
14-
"github.com/rs/cors"
15-
1611
"github.com/flowchartsman/swaggerui"
17-
18-
"github.com/gorilla/sessions"
19-
20-
"github.com/jiaozifs/jiaozifs/models"
21-
22-
"net/url"
23-
2412
"github.com/getkin/kin-openapi/openapi3filter"
2513
"github.com/go-chi/chi/v5"
14+
"github.com/gorilla/sessions"
2615
logging "github.com/ipfs/go-log/v2"
2716
"github.com/jiaozifs/jiaozifs/api"
17+
"github.com/jiaozifs/jiaozifs/auth"
18+
"github.com/jiaozifs/jiaozifs/auth/crypt"
2819
"github.com/jiaozifs/jiaozifs/config"
20+
"github.com/jiaozifs/jiaozifs/models"
2921
middleware "github.com/oapi-codegen/nethttp-middleware"
22+
"github.com/rs/cors"
3023
"go.uber.org/fx"
3124
)
3225

api/custom_response.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"net/http"
77

88
"github.com/jiaozifs/jiaozifs/auth"
9-
109
"github.com/jiaozifs/jiaozifs/models"
1110
)
1211

api/jiaozifs.gen.go

Lines changed: 50 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/swagger.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ components:
123123
type: string
124124
RefType:
125125
type: string
126-
enum: ["branch", "wip","tag", "test"]
126+
enum: ["branch", "wip","tag", "commit"]
127127
Branch:
128128
type: object
129129
required:
@@ -1082,7 +1082,7 @@ paths:
10821082
403:
10831083
description: Forbidden
10841084

1085-
/repos/{owner}/{repository}/contents/:
1085+
/repos/{owner}/{repository}/contents:
10861086
parameters:
10871087
- in: path
10881088
name: owner

auth/auth_middleware.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ import (
66
"net/http"
77
"strings"
88

9-
"github.com/jiaozifs/jiaozifs/auth/crypt"
10-
11-
"github.com/gorilla/sessions"
12-
"github.com/jiaozifs/jiaozifs/models"
13-
149
"github.com/getkin/kin-openapi/openapi3"
1510
"github.com/getkin/kin-openapi/routers"
1611
"github.com/getkin/kin-openapi/routers/legacy"
12+
"github.com/gorilla/sessions"
13+
"github.com/jiaozifs/jiaozifs/auth/crypt"
14+
"github.com/jiaozifs/jiaozifs/models"
1715
)
1816

1917
const (

cmd/daemon.go

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,18 @@ package cmd
33
import (
44
"context"
55

6-
"github.com/jiaozifs/jiaozifs/auth/crypt"
7-
8-
"github.com/jiaozifs/jiaozifs/version"
9-
106
"github.com/gorilla/sessions"
11-
"github.com/jiaozifs/jiaozifs/auth"
12-
13-
"github.com/jiaozifs/jiaozifs/block/params"
14-
15-
"github.com/jiaozifs/jiaozifs/block"
16-
"github.com/jiaozifs/jiaozifs/block/factory"
17-
187
logging "github.com/ipfs/go-log/v2"
198
apiImpl "github.com/jiaozifs/jiaozifs/api/api_impl"
9+
"github.com/jiaozifs/jiaozifs/auth"
10+
"github.com/jiaozifs/jiaozifs/auth/crypt"
11+
"github.com/jiaozifs/jiaozifs/block/params"
2012
"github.com/jiaozifs/jiaozifs/config"
2113
"github.com/jiaozifs/jiaozifs/fx_opt"
2214
"github.com/jiaozifs/jiaozifs/models"
2315
"github.com/jiaozifs/jiaozifs/models/migrations"
2416
"github.com/jiaozifs/jiaozifs/utils"
17+
"github.com/jiaozifs/jiaozifs/version"
2518
"github.com/spf13/cobra"
2619
"github.com/spf13/viper"
2720
"github.com/uptrace/bun"
@@ -57,9 +50,6 @@ var daemonCmd = &cobra.Command{
5750
fx_opt.Override(new(*config.AuthConfig), &cfg.Auth),
5851
fx_opt.Override(new(*config.DatabaseConfig), &cfg.Database),
5952
fx_opt.Override(new(params.AdapterConfig), &cfg.Blockstore),
60-
//blockstore
61-
fx_opt.Override(new(factory.BlockAdapterBuilder), factory.BuildBlockAdapter),
62-
fx_opt.Override(new(block.Adapter), factory.BuildBlockAdapter),
6353
//database
6454
fx_opt.Override(new(*bun.DB), models.SetupDatabase),
6555
fx_opt.Override(new(models.IRepo), func(db *bun.DB) models.IRepo {

cmd/version.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ package cmd
33
import (
44
"fmt"
55

6-
"github.com/jiaozifs/jiaozifs/version"
7-
86
"github.com/jiaozifs/jiaozifs/api"
7+
"github.com/jiaozifs/jiaozifs/version"
98
"github.com/spf13/cobra"
109
)
1110

config/blockstore.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"time"
66

77
"github.com/jiaozifs/jiaozifs/block/params"
8-
98
"github.com/mitchellh/go-homedir"
109
)
1110

config/config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"path"
77

88
"github.com/mitchellh/go-homedir"
9-
109
ms "github.com/mitchellh/mapstructure"
1110
"github.com/spf13/cobra"
1211
"github.com/spf13/viper"

controller/branch_ctl.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ import (
99
"strings"
1010
"time"
1111

12-
"github.com/jiaozifs/jiaozifs/utils/hash"
13-
14-
"github.com/jiaozifs/jiaozifs/auth"
15-
1612
"github.com/jiaozifs/jiaozifs/api"
13+
"github.com/jiaozifs/jiaozifs/auth"
1714
"github.com/jiaozifs/jiaozifs/models"
15+
"github.com/jiaozifs/jiaozifs/utils/hash"
1816
"go.uber.org/fx"
1917
)
2018

0 commit comments

Comments
 (0)