mirror of
https://github.com/m5stack/StackChan.git
synced 2026-04-28 03:22:39 +00:00
server code 4/27
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD
|
||||
SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package appstore
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD
|
||||
SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package appstore
|
||||
|
||||
import (
|
||||
"stackChan/api/appstore"
|
||||
)
|
||||
|
||||
type ControllerV1 struct{}
|
||||
|
||||
func NewV1() appstore.IAppstoreV1 {
|
||||
return &ControllerV1{}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD
|
||||
SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
package appstore
|
||||
|
||||
import (
|
||||
"context"
|
||||
"stackChan/internal/service"
|
||||
|
||||
"stackChan/api/appstore/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) GetAppList(ctx context.Context, req *v1.GetAppListReq) (res *v1.GetAppListRes, err error) {
|
||||
apps, err := service.GetAppList(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := v1.GetAppListRes(apps)
|
||||
return &response, nil
|
||||
}
|
||||
Reference in New Issue
Block a user