File tree 5 files changed +27
-2
lines changed
5 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ func Server(cfg *config.Config) *cli.Command {
52
52
ocdav .Prefix (cfg .HTTP .Prefix ),
53
53
ocdav .GatewaySvc (cfg .Reva .Address ),
54
54
ocdav .JWTSecret (cfg .TokenManager .JWTSecret ),
55
+ ocdav .ProductName (cfg .Status .ProductName ),
56
+ ocdav .Product (cfg .Status .Product ),
57
+ ocdav .Version (cfg .Status .Version ),
58
+ ocdav .VersionString (cfg .Status .VersionString ),
59
+ ocdav .Edition (cfg .Status .Edition ),
55
60
// ocdav.FavoriteManager() // FIXME needs a proper persistence implementation
56
61
// ocdav.LockSystem(), // will default to the CS3 lock system
57
62
// ocdav.TLSConfig() // tls config for the http server
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ type Config struct {
33
33
Middleware Middleware `yaml:"middleware"`
34
34
35
35
Context context.Context `yaml:"-"`
36
+ Status Status `yaml:"-"`
36
37
}
37
38
type Tracing struct {
38
39
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;OCDAV_TRACING_ENABLED" desc:"Activates tracing."`
@@ -75,3 +76,12 @@ type Middleware struct {
75
76
type Auth struct {
76
77
CredentialsByUserAgent map [string ]string `yaml:"credentials_by_user_agent"`
77
78
}
79
+
80
+ // Status holds the configurable values for the status.php
81
+ type Status struct {
82
+ Version string
83
+ VersionString string
84
+ Product string
85
+ ProductName string
86
+ Edition string
87
+ }
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package defaults
2
2
3
3
import (
4
4
"github.com/owncloud/ocis/v2/extensions/ocdav/pkg/config"
5
+ "github.com/owncloud/ocis/v2/ocis-pkg/version"
5
6
)
6
7
7
8
func FullDefaultConfig () * config.Config {
@@ -42,6 +43,13 @@ func DefaultConfig() *config.Config {
42
43
CredentialsByUserAgent : map [string ]string {},
43
44
},
44
45
},
46
+ Status : config.Status {
47
+ Version : version .String + ".0" ,
48
+ VersionString : version .String ,
49
+ Product : "ocis" ,
50
+ ProductName : "Infinite Scale" ,
51
+ Edition : "Community" ,
52
+ },
45
53
}
46
54
}
47
55
Original file line number Diff line number Diff line change @@ -274,3 +274,5 @@ require (
274
274
275
275
// we need to use a fork to make the windows build pass
276
276
replace github.com/pkg/xattr => github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7
277
+
278
+ replace github.com/cs3org/reva/v2 => ../reva
Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ import (
6
6
7
7
var (
8
8
// String gets defined by the build system.
9
- String = "0 .0.0"
9
+ String = "2 .0.0-dev "
10
10
11
11
// Date indicates the build date.
12
- Date = "00000000"
12
+ Date = time . Now (). Format ( "20060102" )
13
13
)
14
14
15
15
// Compiled returns the compile time of this service.
You can’t perform that action at this time.
0 commit comments