-
Notifications
You must be signed in to change notification settings - Fork 49
/
wire_gen.go
36 lines (30 loc) · 1.16 KB
/
wire_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2024 Lingfei Kong <colin404@foxmail.com>. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file. The original repo for
// this file is https://github.com/superproj/onex.
//
// Code generated by Wire. DO NOT EDIT.
//go:generate go run github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject
package cacheserver
import (
"github.com/superproj/onex/internal/cacheserver/biz"
"github.com/superproj/onex/internal/cacheserver/service"
"github.com/superproj/onex/internal/cacheserver/store"
"github.com/superproj/onex/pkg/api/cacheserver/v1"
"github.com/superproj/onex/pkg/cache"
"github.com/superproj/onex/pkg/db"
"google.golang.org/protobuf/types/known/anypb"
)
// Injectors from wire.go:
func wireServer(mySQLOptions *db.MySQLOptions, cacheCache cache.Cache[*anypb.Any], bool2 bool) (v1.CacheServerServer, error) {
gormDB, err := db.NewMySQL(mySQLOptions)
if err != nil {
return nil, err
}
datastore := store.NewStore(gormDB, bool2)
bizBiz := biz.NewBiz(cacheCache, datastore)
cacheServerService := service.NewCacheServerService(bizBiz)
return cacheServerService, nil
}