first commit

This commit is contained in:
2024-10-02 00:57:17 +08:00
commit 6773f86bc5
312 changed files with 19169 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.2
// Source: sentinel.proto
package server
import (
"context"
"tianyuan-api/apps/sentinel/internal/logic/product"
"tianyuan-api/apps/sentinel/internal/svc"
"tianyuan-api/apps/sentinel/sentinel"
)
type ProductServer struct {
svcCtx *svc.ServiceContext
sentinel.UnimplementedProductServer
}
func NewProductServer(svcCtx *svc.ServiceContext) *ProductServer {
return &ProductServer{
svcCtx: svcCtx,
}
}
// Product methods
func (s *ProductServer) CreateProduct(ctx context.Context, in *sentinel.CreateProductRequest) (*sentinel.Product, error) {
l := productlogic.NewCreateProductLogic(ctx, s.svcCtx)
return l.CreateProduct(in)
}
func (s *ProductServer) UpdateProduct(ctx context.Context, in *sentinel.UpdateProductRequest) (*sentinel.Product, error) {
l := productlogic.NewUpdateProductLogic(ctx, s.svcCtx)
return l.UpdateProduct(in)
}
func (s *ProductServer) DeleteProduct(ctx context.Context, in *sentinel.DeleteProductRequest) (*sentinel.Product, error) {
l := productlogic.NewDeleteProductLogic(ctx, s.svcCtx)
return l.DeleteProduct(in)
}
func (s *ProductServer) GetProductPageList(ctx context.Context, in *sentinel.PageListRequest) (*sentinel.ProductResponse, error) {
l := productlogic.NewGetProductPageListLogic(ctx, s.svcCtx)
return l.GetProductPageList(in)
}
func (s *ProductServer) GetProductById(ctx context.Context, in *sentinel.GetRecordByIdRequest) (*sentinel.Product, error) {
l := productlogic.NewGetProductByIdLogic(ctx, s.svcCtx)
return l.GetProductById(in)
}

View File

@@ -0,0 +1,40 @@
// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.2
// Source: sentinel.proto
package server
import (
"context"
"tianyuan-api/apps/sentinel/internal/logic/secret"
"tianyuan-api/apps/sentinel/internal/svc"
"tianyuan-api/apps/sentinel/sentinel"
)
type SecretServer struct {
svcCtx *svc.ServiceContext
sentinel.UnimplementedSecretServer
}
func NewSecretServer(svcCtx *svc.ServiceContext) *SecretServer {
return &SecretServer{
svcCtx: svcCtx,
}
}
// Secret methods
func (s *SecretServer) CreateSecret(ctx context.Context, in *sentinel.CreateSecretRequest) (*sentinel.Secret, error) {
l := secretlogic.NewCreateSecretLogic(ctx, s.svcCtx)
return l.CreateSecret(in)
}
func (s *SecretServer) GetSecretByUserId(ctx context.Context, in *sentinel.GetRecordByIdRequest) (*sentinel.Secret, error) {
l := secretlogic.NewGetSecretByUserIdLogic(ctx, s.svcCtx)
return l.GetSecretByUserId(in)
}
func (s *SecretServer) GetSecretBySecretId(ctx context.Context, in *sentinel.GetSecretBySecretIdRequest) (*sentinel.Secret, error) {
l := secretlogic.NewGetSecretBySecretIdLogic(ctx, s.svcCtx)
return l.GetSecretBySecretId(in)
}

View File

@@ -0,0 +1,40 @@
// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.2
// Source: sentinel.proto
package server
import (
"context"
"tianyuan-api/apps/sentinel/internal/logic/userproduct"
"tianyuan-api/apps/sentinel/internal/svc"
"tianyuan-api/apps/sentinel/sentinel"
)
type UserProductServer struct {
svcCtx *svc.ServiceContext
sentinel.UnimplementedUserProductServer
}
func NewUserProductServer(svcCtx *svc.ServiceContext) *UserProductServer {
return &UserProductServer{
svcCtx: svcCtx,
}
}
// UserProduct methods
func (s *UserProductServer) CreateUserProduct(ctx context.Context, in *sentinel.CreateUserProductRequest) (*sentinel.UserProductEmptyResponse, error) {
l := userproductlogic.NewCreateUserProductLogic(ctx, s.svcCtx)
return l.CreateUserProduct(in)
}
func (s *UserProductServer) GetUserProductPageList(ctx context.Context, in *sentinel.UserProuctPageListRequest) (*sentinel.UserProductResponse, error) {
l := userproductlogic.NewGetUserProductPageListLogic(ctx, s.svcCtx)
return l.GetUserProductPageList(in)
}
func (s *UserProductServer) MatchingUserIdProductCode(ctx context.Context, in *sentinel.MatchingUserIdProductCodeRequest) (*sentinel.MatchResponse, error) {
l := userproductlogic.NewMatchingUserIdProductCodeLogic(ctx, s.svcCtx)
return l.MatchingUserIdProductCode(in)
}

View File

@@ -0,0 +1,50 @@
// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.2
// Source: sentinel.proto
package server
import (
"context"
"tianyuan-api/apps/sentinel/internal/logic/whitelist"
"tianyuan-api/apps/sentinel/internal/svc"
"tianyuan-api/apps/sentinel/sentinel"
)
type WhitelistServer struct {
svcCtx *svc.ServiceContext
sentinel.UnimplementedWhitelistServer
}
func NewWhitelistServer(svcCtx *svc.ServiceContext) *WhitelistServer {
return &WhitelistServer{
svcCtx: svcCtx,
}
}
// Whitelist methods
func (s *WhitelistServer) CreateWhitelist(ctx context.Context, in *sentinel.CreateWhitelistRequest) (*sentinel.Whitelist, error) {
l := whitelistlogic.NewCreateWhitelistLogic(ctx, s.svcCtx)
return l.CreateWhitelist(in)
}
func (s *WhitelistServer) UpdateWhitelist(ctx context.Context, in *sentinel.UpdateWhitelistRequest) (*sentinel.Whitelist, error) {
l := whitelistlogic.NewUpdateWhitelistLogic(ctx, s.svcCtx)
return l.UpdateWhitelist(in)
}
func (s *WhitelistServer) DeleteWhitelist(ctx context.Context, in *sentinel.DeleteWhitelistRequest) (*sentinel.Whitelist, error) {
l := whitelistlogic.NewDeleteWhitelistLogic(ctx, s.svcCtx)
return l.DeleteWhitelist(in)
}
func (s *WhitelistServer) GetWhitePageList(ctx context.Context, in *sentinel.WhitePageListRequest) (*sentinel.WhitelistResponse, error) {
l := whitelistlogic.NewGetWhitePageListLogic(ctx, s.svcCtx)
return l.GetWhitePageList(in)
}
func (s *WhitelistServer) MatchWhitelistByIp(ctx context.Context, in *sentinel.MatchWhitelistByIpRequest) (*sentinel.MatchResponse, error) {
l := whitelistlogic.NewMatchWhitelistByIpLogic(ctx, s.svcCtx)
return l.MatchWhitelistByIp(in)
}