Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 56d5be9

Browse files
author
Noah Lee
authored
Fix 'oss' build (#339)
1 parent a2ccc36 commit 56d5be9

15 files changed

+75
-23
lines changed

internal/server/api/v1/repos/lock.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// Copyright 2021 Gitploy.IO Inc. All rights reserved.
2-
// Use of this source code is governed by the Gitploy Non-Commercial License
3-
// that can be found in the LICENSE file.
4-
5-
//go:build !oss
6-
// +build !oss
7-
81
package repos
92

103
type (

internal/server/api/v1/repos/lock_create.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Copyright 2021 Gitploy.IO Inc. All rights reserved.
2+
// Use of this source code is governed by the Gitploy Non-Commercial License
3+
// that can be found in the LICENSE file.
4+
5+
//go:build !oss
6+
17
package repos
28

39
import (

internal/server/api/v1/repos/lock_create_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Copyright 2021 Gitploy.IO Inc. All rights reserved.
2+
// Use of this source code is governed by the Gitploy Non-Commercial License
3+
// that can be found in the LICENSE file.
4+
5+
//go:build !oss
6+
17
package repos
28

39
import (

internal/server/api/v1/repos/lock_delete.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Copyright 2021 Gitploy.IO Inc. All rights reserved.
2+
// Use of this source code is governed by the Gitploy Non-Commercial License
3+
// that can be found in the LICENSE file.
4+
5+
//go:build !oss
6+
17
package repos
28

39
import (

internal/server/api/v1/repos/lock_delete_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Copyright 2021 Gitploy.IO Inc. All rights reserved.
2+
// Use of this source code is governed by the Gitploy Non-Commercial License
3+
// that can be found in the LICENSE file.
4+
5+
//go:build !oss
6+
17
package repos
28

39
import (

internal/server/api/v1/repos/lock_list.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Copyright 2021 Gitploy.IO Inc. All rights reserved.
2+
// Use of this source code is governed by the Gitploy Non-Commercial License
3+
// that can be found in the LICENSE file.
4+
5+
//go:build !oss
6+
17
package repos
28

39
import (

internal/server/api/v1/repos/lock_oss.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build oss
1+
//go:build oss
22

33
package repos
44

@@ -12,25 +12,25 @@ import (
1212
"github.com/gitploy-io/gitploy/pkg/e"
1313
)
1414

15-
func (r *Repo) ListLocks(c *gin.Context) {
15+
func (s *LocksAPI) List(c *gin.Context) {
1616
gb.Response(c, http.StatusOK, make([]*ent.Lock, 0))
1717
}
1818

19-
func (r *Repo) CreateLock(c *gin.Context) {
19+
func (s *LocksAPI) Create(c *gin.Context) {
2020
gb.ResponseWithError(
2121
c,
2222
e.NewError(e.ErrorCodeLicenseRequired, nil),
2323
)
2424
}
2525

26-
func (r *Repo) UpdateLock(c *gin.Context) {
26+
func (s *LocksAPI) Update(c *gin.Context) {
2727
gb.ResponseWithError(
2828
c,
2929
e.NewError(e.ErrorCodeLicenseRequired, nil),
3030
)
3131
}
3232

33-
func (r *Repo) DeleteLock(c *gin.Context) {
33+
func (s *LocksAPI) Delete(c *gin.Context) {
3434
gb.ResponseWithError(
3535
c,
3636
e.NewError(e.ErrorCodeLicenseRequired, nil),

internal/server/api/v1/repos/lock_update.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Copyright 2021 Gitploy.IO Inc. All rights reserved.
2+
// Use of this source code is governed by the Gitploy Non-Commercial License
3+
// that can be found in the LICENSE file.
4+
5+
//go:build !oss
6+
17
package repos
28

39
import (

internal/server/api/v1/repos/lock_update_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Copyright 2021 Gitploy.IO Inc. All rights reserved.
2+
// Use of this source code is governed by the Gitploy Non-Commercial License
3+
// that can be found in the LICENSE file.
4+
5+
//go:build !oss
6+
17
package repos
28

39
import (

internal/server/api/v1/repos/review.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// Copyright 2021 Gitploy.IO Inc. All rights reserved.
2-
// Use of this source code is governed by the Gitploy Non-Commercial License
3-
// that can be found in the LICENSE file.
4-
5-
//go:build !oss
6-
// +build !oss
7-
81
package repos
92

103
type (

0 commit comments

Comments
 (0)