-
Notifications
You must be signed in to change notification settings - Fork 562
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
57 changed files
with
423 additions
and
98 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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
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,16 @@ | ||
// Copyright 2023 ROC. All rights reserved. | ||
// Use of this source code is governed by a MIT style | ||
// license that can be found in the LICENSE file. | ||
|
||
package web | ||
|
||
import ( | ||
"github.com/rocboss/paopao-ce/internal/conf" | ||
"github.com/rocboss/paopao-ce/pkg/version" | ||
) | ||
|
||
type VersionResp struct { | ||
BuildInfo *version.BuildInfo `json:"build_info"` | ||
} | ||
|
||
type SiteProfileResp = conf.WebProfileConf |
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,39 @@ | ||
// Copyright 2023 ROC. All rights reserved. | ||
// Use of this source code is governed by a MIT style | ||
// license that can be found in the LICENSE file. | ||
|
||
package web | ||
|
||
import ( | ||
"github.com/alimy/mir/v4" | ||
api "github.com/rocboss/paopao-ce/auto/api/v1" | ||
"github.com/rocboss/paopao-ce/internal/conf" | ||
"github.com/rocboss/paopao-ce/internal/model/web" | ||
"github.com/rocboss/paopao-ce/internal/servants/base" | ||
"github.com/rocboss/paopao-ce/pkg/version" | ||
) | ||
|
||
var ( | ||
_ api.Site = (*siteSrv)(nil) | ||
) | ||
|
||
type siteSrv struct { | ||
api.UnimplementedSiteServant | ||
*base.BaseServant | ||
} | ||
|
||
func (*siteSrv) Profile() (*web.SiteProfileResp, mir.Error) { | ||
return conf.WebProfileSetting, nil | ||
} | ||
|
||
func (*siteSrv) Version() (*web.VersionResp, mir.Error) { | ||
return &web.VersionResp{ | ||
BuildInfo: version.ReadBuildInfo(), | ||
}, nil | ||
} | ||
|
||
func newSiteSrv() api.Site { | ||
return &siteSrv{ | ||
BaseServant: base.NewBaseServant(), | ||
} | ||
} |
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,22 @@ | ||
package v1 | ||
|
||
import ( | ||
. "github.com/alimy/mir/v4" | ||
. "github.com/alimy/mir/v4/engine" | ||
"github.com/rocboss/paopao-ce/internal/model/web" | ||
) | ||
|
||
func init() { | ||
Entry[Site]() | ||
} | ||
|
||
// Site 站点本身相关的信息服务 | ||
type Site struct { | ||
Group `mir:"v1"` | ||
|
||
// Version 获取后台版本信息 | ||
Version func(Get) web.VersionResp `mir:"/site/version"` | ||
|
||
// Profile 站点配置概要信息 | ||
Profile func(Get) web.SiteProfileResp `mir:"/site/profile"` | ||
} |
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
2 changes: 1 addition & 1 deletion
2
web/dist/assets/404-b8b53fcf.js → web/dist/assets/404-c0c7310e.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
web/dist/assets/Anouncement-96debf58.js → web/dist/assets/Anouncement-a1221d42.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.