add: user accomplished
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
Name: pb.rpc
|
||||
ListenOn: 0.0.0.0:8080
|
||||
|
||||
DataSource: "${DB_URI}?sslmode=disable"
|
||||
|
||||
SnowflakeRpcConf:
|
||||
Target: k8s://juwan/snowflake-svc:8080
|
||||
|
||||
DB:
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-rw.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slave: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-ro.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
|
||||
CacheConf:
|
||||
- Host: "${REDIS_M_HOST}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
User: "default"
|
||||
- Host: "${REDIS_S_HOST}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
User: "default"
|
||||
|
||||
Jwt:
|
||||
SecretKey: "${JWT_SECRET_KEY}"
|
||||
Issuer: "juwan-user-rpc"
|
||||
|
||||
Log:
|
||||
Level: info
|
||||
@@ -0,0 +1,7 @@
|
||||
package config
|
||||
|
||||
import "github.com/zeromicro/go-zero/zrpc"
|
||||
|
||||
type Config struct {
|
||||
zrpc.RpcServerConf
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"juwan-backend/app/user_verifications/rpc/internal/svc"
|
||||
"juwan-backend/app/user_verifications/rpc/pb"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type AddUserVerificationsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewAddUserVerificationsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddUserVerificationsLogic {
|
||||
return &AddUserVerificationsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------userVerifications-----------------------
|
||||
func (l *AddUserVerificationsLogic) AddUserVerifications(in *pb.AddUserVerificationsReq) (*pb.AddUserVerificationsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &pb.AddUserVerificationsResp{}, nil
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"juwan-backend/app/user_verifications/rpc/internal/svc"
|
||||
"juwan-backend/app/user_verifications/rpc/pb"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type DelUserVerificationsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewDelUserVerificationsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DelUserVerificationsLogic {
|
||||
return &DelUserVerificationsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DelUserVerificationsLogic) DelUserVerifications(in *pb.DelUserVerificationsReq) (*pb.DelUserVerificationsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &pb.DelUserVerificationsResp{}, nil
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"juwan-backend/app/user_verifications/rpc/internal/svc"
|
||||
"juwan-backend/app/user_verifications/rpc/pb"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type GetUserVerificationsByIdLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewGetUserVerificationsByIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserVerificationsByIdLogic {
|
||||
return &GetUserVerificationsByIdLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetUserVerificationsByIdLogic) GetUserVerificationsById(in *pb.GetUserVerificationsByIdReq) (*pb.GetUserVerificationsByIdResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &pb.GetUserVerificationsByIdResp{}, nil
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"juwan-backend/app/user_verifications/rpc/internal/svc"
|
||||
"juwan-backend/app/user_verifications/rpc/pb"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type SearchUserVerificationsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewSearchUserVerificationsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SearchUserVerificationsLogic {
|
||||
return &SearchUserVerificationsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *SearchUserVerificationsLogic) SearchUserVerifications(in *pb.SearchUserVerificationsReq) (*pb.SearchUserVerificationsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &pb.SearchUserVerificationsResp{}, nil
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"juwan-backend/app/user_verifications/rpc/internal/svc"
|
||||
"juwan-backend/app/user_verifications/rpc/pb"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type UpdateUserVerificationsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewUpdateUserVerificationsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateUserVerificationsLogic {
|
||||
return &UpdateUserVerificationsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UpdateUserVerificationsLogic) UpdateUserVerifications(in *pb.UpdateUserVerificationsReq) (*pb.UpdateUserVerificationsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &pb.UpdateUserVerificationsResp{}, nil
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.9.2
|
||||
// Source: user_verifications.proto
|
||||
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"juwan-backend/app/user_verifications/rpc/internal/logic"
|
||||
"juwan-backend/app/user_verifications/rpc/internal/svc"
|
||||
"juwan-backend/app/user_verifications/rpc/pb"
|
||||
)
|
||||
|
||||
type UserVerificationsServer struct {
|
||||
svcCtx *svc.ServiceContext
|
||||
pb.UnimplementedUserVerificationsServer
|
||||
}
|
||||
|
||||
func NewUserVerificationsServer(svcCtx *svc.ServiceContext) *UserVerificationsServer {
|
||||
return &UserVerificationsServer{
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------userVerifications-----------------------
|
||||
func (s *UserVerificationsServer) AddUserVerifications(ctx context.Context, in *pb.AddUserVerificationsReq) (*pb.AddUserVerificationsResp, error) {
|
||||
l := logic.NewAddUserVerificationsLogic(ctx, s.svcCtx)
|
||||
return l.AddUserVerifications(in)
|
||||
}
|
||||
|
||||
func (s *UserVerificationsServer) UpdateUserVerifications(ctx context.Context, in *pb.UpdateUserVerificationsReq) (*pb.UpdateUserVerificationsResp, error) {
|
||||
l := logic.NewUpdateUserVerificationsLogic(ctx, s.svcCtx)
|
||||
return l.UpdateUserVerifications(in)
|
||||
}
|
||||
|
||||
func (s *UserVerificationsServer) DelUserVerifications(ctx context.Context, in *pb.DelUserVerificationsReq) (*pb.DelUserVerificationsResp, error) {
|
||||
l := logic.NewDelUserVerificationsLogic(ctx, s.svcCtx)
|
||||
return l.DelUserVerifications(in)
|
||||
}
|
||||
|
||||
func (s *UserVerificationsServer) GetUserVerificationsById(ctx context.Context, in *pb.GetUserVerificationsByIdReq) (*pb.GetUserVerificationsByIdResp, error) {
|
||||
l := logic.NewGetUserVerificationsByIdLogic(ctx, s.svcCtx)
|
||||
return l.GetUserVerificationsById(in)
|
||||
}
|
||||
|
||||
func (s *UserVerificationsServer) SearchUserVerifications(ctx context.Context, in *pb.SearchUserVerificationsReq) (*pb.SearchUserVerificationsResp, error) {
|
||||
l := logic.NewSearchUserVerificationsLogic(ctx, s.svcCtx)
|
||||
return l.SearchUserVerifications(in)
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package svc
|
||||
|
||||
import "juwan-backend/app/user_verifications/rpc/internal/config"
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package svc
|
||||
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
)
|
||||
|
||||
var _ UserVerificationsModel = (*customUserVerificationsModel)(nil)
|
||||
|
||||
type (
|
||||
// UserVerificationsModel is an interface to be customized, add more methods here,
|
||||
// and implement the added methods in customUserVerificationsModel.
|
||||
UserVerificationsModel interface {
|
||||
userVerificationsModel
|
||||
}
|
||||
|
||||
customUserVerificationsModel struct {
|
||||
*defaultUserVerificationsModel
|
||||
}
|
||||
)
|
||||
|
||||
// NewUserVerificationsModel returns a model for the database table.
|
||||
func NewUserVerificationsModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) UserVerificationsModel {
|
||||
return &customUserVerificationsModel{
|
||||
defaultUserVerificationsModel: newUserVerificationsModel(conn, c, opts...),
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// versions:
|
||||
// goctl version: 1.9.2
|
||||
|
||||
package svc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/stores/builder"
|
||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlc"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
"github.com/zeromicro/go-zero/core/stringx"
|
||||
)
|
||||
|
||||
var (
|
||||
userVerificationsFieldNames = builder.RawFieldNames(&UserVerifications{}, true)
|
||||
userVerificationsRows = strings.Join(userVerificationsFieldNames, ",")
|
||||
userVerificationsRowsExpectAutoSet = strings.Join(stringx.Remove(userVerificationsFieldNames, "create_at", "create_time", "created_at", "update_at", "update_time", "updated_at"), ",")
|
||||
userVerificationsRowsWithPlaceHolder = builder.PostgreSqlJoin(stringx.Remove(userVerificationsFieldNames, "id", "create_at", "create_time", "created_at", "update_at", "update_time", "updated_at"))
|
||||
|
||||
cachePublicUserVerificationsIdPrefix = "cache:public:userVerifications:id:"
|
||||
cachePublicUserVerificationsUserIdRolePrefix = "cache:public:userVerifications:userId:role:"
|
||||
)
|
||||
|
||||
type (
|
||||
userVerificationsModel interface {
|
||||
Insert(ctx context.Context, data *UserVerifications) (sql.Result, error)
|
||||
FindOne(ctx context.Context, id int64) (*UserVerifications, error)
|
||||
FindOneByUserIdRole(ctx context.Context, userId int64, role string) (*UserVerifications, error)
|
||||
Update(ctx context.Context, data *UserVerifications) error
|
||||
Delete(ctx context.Context, id int64) error
|
||||
}
|
||||
|
||||
defaultUserVerificationsModel struct {
|
||||
sqlc.CachedConn
|
||||
table string
|
||||
}
|
||||
|
||||
UserVerifications struct {
|
||||
Id int64 `db:"id"`
|
||||
UserId int64 `db:"user_id"`
|
||||
Role string `db:"role"`
|
||||
Status string `db:"status"`
|
||||
Materials string `db:"materials"`
|
||||
RejectReason sql.NullString `db:"reject_reason"`
|
||||
ReviewedBy sql.NullInt64 `db:"reviewed_by"`
|
||||
ReviewedAt sql.NullTime `db:"reviewed_at"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at"`
|
||||
}
|
||||
)
|
||||
|
||||
func newUserVerificationsModel(conn sqlx.SqlConn, c cache.CacheConf, opts ...cache.Option) *defaultUserVerificationsModel {
|
||||
return &defaultUserVerificationsModel{
|
||||
CachedConn: sqlc.NewConn(conn, c, opts...),
|
||||
table: `"public"."user_verifications"`,
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultUserVerificationsModel) Delete(ctx context.Context, id int64) error {
|
||||
data, err := m.FindOne(ctx, id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
publicUserVerificationsIdKey := fmt.Sprintf("%s%v", cachePublicUserVerificationsIdPrefix, id)
|
||||
publicUserVerificationsUserIdRoleKey := fmt.Sprintf("%s%v:%v", cachePublicUserVerificationsUserIdRolePrefix, data.UserId, data.Role)
|
||||
_, err = m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("delete from %s where id = $1", m.table)
|
||||
return conn.ExecCtx(ctx, query, id)
|
||||
}, publicUserVerificationsIdKey, publicUserVerificationsUserIdRoleKey)
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *defaultUserVerificationsModel) FindOne(ctx context.Context, id int64) (*UserVerifications, error) {
|
||||
publicUserVerificationsIdKey := fmt.Sprintf("%s%v", cachePublicUserVerificationsIdPrefix, id)
|
||||
var resp UserVerifications
|
||||
err := m.QueryRowCtx(ctx, &resp, publicUserVerificationsIdKey, func(ctx context.Context, conn sqlx.SqlConn, v any) error {
|
||||
query := fmt.Sprintf("select %s from %s where id = $1 limit 1", userVerificationsRows, m.table)
|
||||
return conn.QueryRowCtx(ctx, v, query, id)
|
||||
})
|
||||
switch err {
|
||||
case nil:
|
||||
return &resp, nil
|
||||
case sqlc.ErrNotFound:
|
||||
return nil, ErrNotFound
|
||||
default:
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultUserVerificationsModel) FindOneByUserIdRole(ctx context.Context, userId int64, role string) (*UserVerifications, error) {
|
||||
publicUserVerificationsUserIdRoleKey := fmt.Sprintf("%s%v:%v", cachePublicUserVerificationsUserIdRolePrefix, userId, role)
|
||||
var resp UserVerifications
|
||||
err := m.QueryRowIndexCtx(ctx, &resp, publicUserVerificationsUserIdRoleKey, m.formatPrimary, func(ctx context.Context, conn sqlx.SqlConn, v any) (i any, e error) {
|
||||
query := fmt.Sprintf("select %s from %s where user_id = $1 and role = $2 limit 1", userVerificationsRows, m.table)
|
||||
if err := conn.QueryRowCtx(ctx, &resp, query, userId, role); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp.Id, nil
|
||||
}, m.queryPrimary)
|
||||
switch err {
|
||||
case nil:
|
||||
return &resp, nil
|
||||
case sqlc.ErrNotFound:
|
||||
return nil, ErrNotFound
|
||||
default:
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultUserVerificationsModel) Insert(ctx context.Context, data *UserVerifications) (sql.Result, error) {
|
||||
publicUserVerificationsIdKey := fmt.Sprintf("%s%v", cachePublicUserVerificationsIdPrefix, data.Id)
|
||||
publicUserVerificationsUserIdRoleKey := fmt.Sprintf("%s%v:%v", cachePublicUserVerificationsUserIdRolePrefix, data.UserId, data.Role)
|
||||
ret, err := m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("insert into %s (%s) values ($1, $2, $3, $4, $5, $6, $7, $8)", m.table, userVerificationsRowsExpectAutoSet)
|
||||
return conn.ExecCtx(ctx, query, data.Id, data.UserId, data.Role, data.Status, data.Materials, data.RejectReason, data.ReviewedBy, data.ReviewedAt)
|
||||
}, publicUserVerificationsIdKey, publicUserVerificationsUserIdRoleKey)
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (m *defaultUserVerificationsModel) Update(ctx context.Context, newData *UserVerifications) error {
|
||||
data, err := m.FindOne(ctx, newData.Id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
publicUserVerificationsIdKey := fmt.Sprintf("%s%v", cachePublicUserVerificationsIdPrefix, data.Id)
|
||||
publicUserVerificationsUserIdRoleKey := fmt.Sprintf("%s%v:%v", cachePublicUserVerificationsUserIdRolePrefix, data.UserId, data.Role)
|
||||
_, err = m.ExecCtx(ctx, func(ctx context.Context, conn sqlx.SqlConn) (result sql.Result, err error) {
|
||||
query := fmt.Sprintf("update %s set %s where id = $1", m.table, userVerificationsRowsWithPlaceHolder)
|
||||
return conn.ExecCtx(ctx, query, newData.Id, newData.UserId, newData.Role, newData.Status, newData.Materials, newData.RejectReason, newData.ReviewedBy, newData.ReviewedAt)
|
||||
}, publicUserVerificationsIdKey, publicUserVerificationsUserIdRoleKey)
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *defaultUserVerificationsModel) formatPrimary(primary any) string {
|
||||
return fmt.Sprintf("%s%v", cachePublicUserVerificationsIdPrefix, primary)
|
||||
}
|
||||
|
||||
func (m *defaultUserVerificationsModel) queryPrimary(ctx context.Context, conn sqlx.SqlConn, v, primary any) error {
|
||||
query := fmt.Sprintf("select %s from %s where id = $1 limit 1", userVerificationsRows, m.table)
|
||||
return conn.QueryRowCtx(ctx, v, query, primary)
|
||||
}
|
||||
|
||||
func (m *defaultUserVerificationsModel) tableName() string {
|
||||
return m.table
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package svc
|
||||
|
||||
import "github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
|
||||
var ErrNotFound = sqlx.ErrNotFound
|
||||
@@ -0,0 +1,39 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
|
||||
"juwan-backend/app/user_verifications/rpc/internal/config"
|
||||
"juwan-backend/app/user_verifications/rpc/internal/server"
|
||||
"juwan-backend/app/user_verifications/rpc/internal/svc"
|
||||
"juwan-backend/app/user_verifications/rpc/pb"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/conf"
|
||||
"github.com/zeromicro/go-zero/core/service"
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/reflection"
|
||||
)
|
||||
|
||||
var configFile = flag.String("f", "etc/pb.yaml", "the config file")
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
ctx := svc.NewServiceContext(c)
|
||||
|
||||
s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
|
||||
pb.RegisterUserVerificationsServer(grpcServer, server.NewUserVerificationsServer(ctx))
|
||||
|
||||
if c.Mode == service.DevMode || c.Mode == service.TestMode {
|
||||
reflection.Register(grpcServer)
|
||||
}
|
||||
})
|
||||
defer s.Stop()
|
||||
|
||||
fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)
|
||||
s.Start()
|
||||
}
|
||||
@@ -0,0 +1,936 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v5.29.6
|
||||
// source: user_verifications.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// --------------------------------userVerifications--------------------------------
|
||||
type UserVerifications struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` //id
|
||||
UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` //userId
|
||||
Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"` //role
|
||||
Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` //status
|
||||
Materials string `protobuf:"bytes,5,opt,name=materials,proto3" json:"materials,omitempty"` //materials
|
||||
RejectReason string `protobuf:"bytes,6,opt,name=rejectReason,proto3" json:"rejectReason,omitempty"` //rejectReason
|
||||
ReviewedBy int64 `protobuf:"varint,7,opt,name=reviewedBy,proto3" json:"reviewedBy,omitempty"` //reviewedBy
|
||||
ReviewedAt int64 `protobuf:"varint,8,opt,name=reviewedAt,proto3" json:"reviewedAt,omitempty"` //reviewedAt
|
||||
CreatedAt int64 `protobuf:"varint,9,opt,name=createdAt,proto3" json:"createdAt,omitempty"` //createdAt
|
||||
UpdatedAt int64 `protobuf:"varint,10,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` //updatedAt
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UserVerifications) Reset() {
|
||||
*x = UserVerifications{}
|
||||
mi := &file_user_verifications_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UserVerifications) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UserVerifications) ProtoMessage() {}
|
||||
|
||||
func (x *UserVerifications) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_verifications_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UserVerifications.ProtoReflect.Descriptor instead.
|
||||
func (*UserVerifications) Descriptor() ([]byte, []int) {
|
||||
return file_user_verifications_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *UserVerifications) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserVerifications) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserVerifications) GetRole() string {
|
||||
if x != nil {
|
||||
return x.Role
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserVerifications) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserVerifications) GetMaterials() string {
|
||||
if x != nil {
|
||||
return x.Materials
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserVerifications) GetRejectReason() string {
|
||||
if x != nil {
|
||||
return x.RejectReason
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserVerifications) GetReviewedBy() int64 {
|
||||
if x != nil {
|
||||
return x.ReviewedBy
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserVerifications) GetReviewedAt() int64 {
|
||||
if x != nil {
|
||||
return x.ReviewedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserVerifications) GetCreatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserVerifications) GetUpdatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type AddUserVerificationsReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` //userId
|
||||
Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` //role
|
||||
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` //status
|
||||
Materials string `protobuf:"bytes,4,opt,name=materials,proto3" json:"materials,omitempty"` //materials
|
||||
RejectReason string `protobuf:"bytes,5,opt,name=rejectReason,proto3" json:"rejectReason,omitempty"` //rejectReason
|
||||
ReviewedBy int64 `protobuf:"varint,6,opt,name=reviewedBy,proto3" json:"reviewedBy,omitempty"` //reviewedBy
|
||||
ReviewedAt int64 `protobuf:"varint,7,opt,name=reviewedAt,proto3" json:"reviewedAt,omitempty"` //reviewedAt
|
||||
CreatedAt int64 `protobuf:"varint,8,opt,name=createdAt,proto3" json:"createdAt,omitempty"` //createdAt
|
||||
UpdatedAt int64 `protobuf:"varint,9,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` //updatedAt
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AddUserVerificationsReq) Reset() {
|
||||
*x = AddUserVerificationsReq{}
|
||||
mi := &file_user_verifications_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AddUserVerificationsReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AddUserVerificationsReq) ProtoMessage() {}
|
||||
|
||||
func (x *AddUserVerificationsReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_verifications_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AddUserVerificationsReq.ProtoReflect.Descriptor instead.
|
||||
func (*AddUserVerificationsReq) Descriptor() ([]byte, []int) {
|
||||
return file_user_verifications_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *AddUserVerificationsReq) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *AddUserVerificationsReq) GetRole() string {
|
||||
if x != nil {
|
||||
return x.Role
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AddUserVerificationsReq) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AddUserVerificationsReq) GetMaterials() string {
|
||||
if x != nil {
|
||||
return x.Materials
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AddUserVerificationsReq) GetRejectReason() string {
|
||||
if x != nil {
|
||||
return x.RejectReason
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AddUserVerificationsReq) GetReviewedBy() int64 {
|
||||
if x != nil {
|
||||
return x.ReviewedBy
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *AddUserVerificationsReq) GetReviewedAt() int64 {
|
||||
if x != nil {
|
||||
return x.ReviewedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *AddUserVerificationsReq) GetCreatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *AddUserVerificationsReq) GetUpdatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type AddUserVerificationsResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AddUserVerificationsResp) Reset() {
|
||||
*x = AddUserVerificationsResp{}
|
||||
mi := &file_user_verifications_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AddUserVerificationsResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AddUserVerificationsResp) ProtoMessage() {}
|
||||
|
||||
func (x *AddUserVerificationsResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_verifications_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AddUserVerificationsResp.ProtoReflect.Descriptor instead.
|
||||
func (*AddUserVerificationsResp) Descriptor() ([]byte, []int) {
|
||||
return file_user_verifications_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
type UpdateUserVerificationsReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` //id
|
||||
UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` //userId
|
||||
Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"` //role
|
||||
Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` //status
|
||||
Materials string `protobuf:"bytes,5,opt,name=materials,proto3" json:"materials,omitempty"` //materials
|
||||
RejectReason string `protobuf:"bytes,6,opt,name=rejectReason,proto3" json:"rejectReason,omitempty"` //rejectReason
|
||||
ReviewedBy int64 `protobuf:"varint,7,opt,name=reviewedBy,proto3" json:"reviewedBy,omitempty"` //reviewedBy
|
||||
ReviewedAt int64 `protobuf:"varint,8,opt,name=reviewedAt,proto3" json:"reviewedAt,omitempty"` //reviewedAt
|
||||
CreatedAt int64 `protobuf:"varint,9,opt,name=createdAt,proto3" json:"createdAt,omitempty"` //createdAt
|
||||
UpdatedAt int64 `protobuf:"varint,10,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` //updatedAt
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsReq) Reset() {
|
||||
*x = UpdateUserVerificationsReq{}
|
||||
mi := &file_user_verifications_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateUserVerificationsReq) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateUserVerificationsReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_verifications_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateUserVerificationsReq.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateUserVerificationsReq) Descriptor() ([]byte, []int) {
|
||||
return file_user_verifications_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsReq) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsReq) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsReq) GetRole() string {
|
||||
if x != nil {
|
||||
return x.Role
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsReq) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsReq) GetMaterials() string {
|
||||
if x != nil {
|
||||
return x.Materials
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsReq) GetRejectReason() string {
|
||||
if x != nil {
|
||||
return x.RejectReason
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsReq) GetReviewedBy() int64 {
|
||||
if x != nil {
|
||||
return x.ReviewedBy
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsReq) GetReviewedAt() int64 {
|
||||
if x != nil {
|
||||
return x.ReviewedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsReq) GetCreatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsReq) GetUpdatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type UpdateUserVerificationsResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsResp) Reset() {
|
||||
*x = UpdateUserVerificationsResp{}
|
||||
mi := &file_user_verifications_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateUserVerificationsResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateUserVerificationsResp) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateUserVerificationsResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_verifications_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateUserVerificationsResp.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateUserVerificationsResp) Descriptor() ([]byte, []int) {
|
||||
return file_user_verifications_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
type DelUserVerificationsReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` //id
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DelUserVerificationsReq) Reset() {
|
||||
*x = DelUserVerificationsReq{}
|
||||
mi := &file_user_verifications_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DelUserVerificationsReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DelUserVerificationsReq) ProtoMessage() {}
|
||||
|
||||
func (x *DelUserVerificationsReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_verifications_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DelUserVerificationsReq.ProtoReflect.Descriptor instead.
|
||||
func (*DelUserVerificationsReq) Descriptor() ([]byte, []int) {
|
||||
return file_user_verifications_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *DelUserVerificationsReq) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DelUserVerificationsResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DelUserVerificationsResp) Reset() {
|
||||
*x = DelUserVerificationsResp{}
|
||||
mi := &file_user_verifications_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DelUserVerificationsResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DelUserVerificationsResp) ProtoMessage() {}
|
||||
|
||||
func (x *DelUserVerificationsResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_verifications_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DelUserVerificationsResp.ProtoReflect.Descriptor instead.
|
||||
func (*DelUserVerificationsResp) Descriptor() ([]byte, []int) {
|
||||
return file_user_verifications_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
type GetUserVerificationsByIdReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` //id
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetUserVerificationsByIdReq) Reset() {
|
||||
*x = GetUserVerificationsByIdReq{}
|
||||
mi := &file_user_verifications_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetUserVerificationsByIdReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetUserVerificationsByIdReq) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserVerificationsByIdReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_verifications_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetUserVerificationsByIdReq.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserVerificationsByIdReq) Descriptor() ([]byte, []int) {
|
||||
return file_user_verifications_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *GetUserVerificationsByIdReq) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetUserVerificationsByIdResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserVerifications *UserVerifications `protobuf:"bytes,1,opt,name=userVerifications,proto3" json:"userVerifications,omitempty"` //userVerifications
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetUserVerificationsByIdResp) Reset() {
|
||||
*x = GetUserVerificationsByIdResp{}
|
||||
mi := &file_user_verifications_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetUserVerificationsByIdResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetUserVerificationsByIdResp) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserVerificationsByIdResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_verifications_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetUserVerificationsByIdResp.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserVerificationsByIdResp) Descriptor() ([]byte, []int) {
|
||||
return file_user_verifications_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *GetUserVerificationsByIdResp) GetUserVerifications() *UserVerifications {
|
||||
if x != nil {
|
||||
return x.UserVerifications
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SearchUserVerificationsReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` //page
|
||||
Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` //limit
|
||||
Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` //id
|
||||
UserId int64 `protobuf:"varint,4,opt,name=userId,proto3" json:"userId,omitempty"` //userId
|
||||
Role string `protobuf:"bytes,5,opt,name=role,proto3" json:"role,omitempty"` //role
|
||||
Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` //status
|
||||
Materials string `protobuf:"bytes,7,opt,name=materials,proto3" json:"materials,omitempty"` //materials
|
||||
RejectReason string `protobuf:"bytes,8,opt,name=rejectReason,proto3" json:"rejectReason,omitempty"` //rejectReason
|
||||
ReviewedBy int64 `protobuf:"varint,9,opt,name=reviewedBy,proto3" json:"reviewedBy,omitempty"` //reviewedBy
|
||||
ReviewedAt int64 `protobuf:"varint,10,opt,name=reviewedAt,proto3" json:"reviewedAt,omitempty"` //reviewedAt
|
||||
CreatedAt int64 `protobuf:"varint,11,opt,name=createdAt,proto3" json:"createdAt,omitempty"` //createdAt
|
||||
UpdatedAt int64 `protobuf:"varint,12,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` //updatedAt
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) Reset() {
|
||||
*x = SearchUserVerificationsReq{}
|
||||
mi := &file_user_verifications_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SearchUserVerificationsReq) ProtoMessage() {}
|
||||
|
||||
func (x *SearchUserVerificationsReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_verifications_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SearchUserVerificationsReq.ProtoReflect.Descriptor instead.
|
||||
func (*SearchUserVerificationsReq) Descriptor() ([]byte, []int) {
|
||||
return file_user_verifications_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) GetPage() int64 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) GetLimit() int64 {
|
||||
if x != nil {
|
||||
return x.Limit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) GetRole() string {
|
||||
if x != nil {
|
||||
return x.Role
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) GetMaterials() string {
|
||||
if x != nil {
|
||||
return x.Materials
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) GetRejectReason() string {
|
||||
if x != nil {
|
||||
return x.RejectReason
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) GetReviewedBy() int64 {
|
||||
if x != nil {
|
||||
return x.ReviewedBy
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) GetReviewedAt() int64 {
|
||||
if x != nil {
|
||||
return x.ReviewedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) GetCreatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsReq) GetUpdatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SearchUserVerificationsResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserVerifications []*UserVerifications `protobuf:"bytes,1,rep,name=userVerifications,proto3" json:"userVerifications,omitempty"` //userVerifications
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsResp) Reset() {
|
||||
*x = SearchUserVerificationsResp{}
|
||||
mi := &file_user_verifications_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SearchUserVerificationsResp) ProtoMessage() {}
|
||||
|
||||
func (x *SearchUserVerificationsResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_verifications_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SearchUserVerificationsResp.ProtoReflect.Descriptor instead.
|
||||
func (*SearchUserVerificationsResp) Descriptor() ([]byte, []int) {
|
||||
return file_user_verifications_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *SearchUserVerificationsResp) GetUserVerifications() []*UserVerifications {
|
||||
if x != nil {
|
||||
return x.UserVerifications
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_user_verifications_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_user_verifications_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x18user_verifications.proto\x12\x02pb\"\xa5\x02\n" +
|
||||
"\x11UserVerifications\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x16\n" +
|
||||
"\x06userId\x18\x02 \x01(\x03R\x06userId\x12\x12\n" +
|
||||
"\x04role\x18\x03 \x01(\tR\x04role\x12\x16\n" +
|
||||
"\x06status\x18\x04 \x01(\tR\x06status\x12\x1c\n" +
|
||||
"\tmaterials\x18\x05 \x01(\tR\tmaterials\x12\"\n" +
|
||||
"\frejectReason\x18\x06 \x01(\tR\frejectReason\x12\x1e\n" +
|
||||
"\n" +
|
||||
"reviewedBy\x18\a \x01(\x03R\n" +
|
||||
"reviewedBy\x12\x1e\n" +
|
||||
"\n" +
|
||||
"reviewedAt\x18\b \x01(\x03R\n" +
|
||||
"reviewedAt\x12\x1c\n" +
|
||||
"\tcreatedAt\x18\t \x01(\x03R\tcreatedAt\x12\x1c\n" +
|
||||
"\tupdatedAt\x18\n" +
|
||||
" \x01(\x03R\tupdatedAt\"\x9b\x02\n" +
|
||||
"\x17AddUserVerificationsReq\x12\x16\n" +
|
||||
"\x06userId\x18\x01 \x01(\x03R\x06userId\x12\x12\n" +
|
||||
"\x04role\x18\x02 \x01(\tR\x04role\x12\x16\n" +
|
||||
"\x06status\x18\x03 \x01(\tR\x06status\x12\x1c\n" +
|
||||
"\tmaterials\x18\x04 \x01(\tR\tmaterials\x12\"\n" +
|
||||
"\frejectReason\x18\x05 \x01(\tR\frejectReason\x12\x1e\n" +
|
||||
"\n" +
|
||||
"reviewedBy\x18\x06 \x01(\x03R\n" +
|
||||
"reviewedBy\x12\x1e\n" +
|
||||
"\n" +
|
||||
"reviewedAt\x18\a \x01(\x03R\n" +
|
||||
"reviewedAt\x12\x1c\n" +
|
||||
"\tcreatedAt\x18\b \x01(\x03R\tcreatedAt\x12\x1c\n" +
|
||||
"\tupdatedAt\x18\t \x01(\x03R\tupdatedAt\"\x1a\n" +
|
||||
"\x18AddUserVerificationsResp\"\xae\x02\n" +
|
||||
"\x1aUpdateUserVerificationsReq\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x16\n" +
|
||||
"\x06userId\x18\x02 \x01(\x03R\x06userId\x12\x12\n" +
|
||||
"\x04role\x18\x03 \x01(\tR\x04role\x12\x16\n" +
|
||||
"\x06status\x18\x04 \x01(\tR\x06status\x12\x1c\n" +
|
||||
"\tmaterials\x18\x05 \x01(\tR\tmaterials\x12\"\n" +
|
||||
"\frejectReason\x18\x06 \x01(\tR\frejectReason\x12\x1e\n" +
|
||||
"\n" +
|
||||
"reviewedBy\x18\a \x01(\x03R\n" +
|
||||
"reviewedBy\x12\x1e\n" +
|
||||
"\n" +
|
||||
"reviewedAt\x18\b \x01(\x03R\n" +
|
||||
"reviewedAt\x12\x1c\n" +
|
||||
"\tcreatedAt\x18\t \x01(\x03R\tcreatedAt\x12\x1c\n" +
|
||||
"\tupdatedAt\x18\n" +
|
||||
" \x01(\x03R\tupdatedAt\"\x1d\n" +
|
||||
"\x1bUpdateUserVerificationsResp\")\n" +
|
||||
"\x17DelUserVerificationsReq\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\"\x1a\n" +
|
||||
"\x18DelUserVerificationsResp\"-\n" +
|
||||
"\x1bGetUserVerificationsByIdReq\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\"c\n" +
|
||||
"\x1cGetUserVerificationsByIdResp\x12C\n" +
|
||||
"\x11userVerifications\x18\x01 \x01(\v2\x15.pb.UserVerificationsR\x11userVerifications\"\xd8\x02\n" +
|
||||
"\x1aSearchUserVerificationsReq\x12\x12\n" +
|
||||
"\x04page\x18\x01 \x01(\x03R\x04page\x12\x14\n" +
|
||||
"\x05limit\x18\x02 \x01(\x03R\x05limit\x12\x0e\n" +
|
||||
"\x02id\x18\x03 \x01(\x03R\x02id\x12\x16\n" +
|
||||
"\x06userId\x18\x04 \x01(\x03R\x06userId\x12\x12\n" +
|
||||
"\x04role\x18\x05 \x01(\tR\x04role\x12\x16\n" +
|
||||
"\x06status\x18\x06 \x01(\tR\x06status\x12\x1c\n" +
|
||||
"\tmaterials\x18\a \x01(\tR\tmaterials\x12\"\n" +
|
||||
"\frejectReason\x18\b \x01(\tR\frejectReason\x12\x1e\n" +
|
||||
"\n" +
|
||||
"reviewedBy\x18\t \x01(\x03R\n" +
|
||||
"reviewedBy\x12\x1e\n" +
|
||||
"\n" +
|
||||
"reviewedAt\x18\n" +
|
||||
" \x01(\x03R\n" +
|
||||
"reviewedAt\x12\x1c\n" +
|
||||
"\tcreatedAt\x18\v \x01(\x03R\tcreatedAt\x12\x1c\n" +
|
||||
"\tupdatedAt\x18\f \x01(\x03R\tupdatedAt\"b\n" +
|
||||
"\x1bSearchUserVerificationsResp\x12C\n" +
|
||||
"\x11userVerifications\x18\x01 \x03(\v2\x15.pb.UserVerificationsR\x11userVerifications2\xd1\x03\n" +
|
||||
"\x12user_verifications\x12Q\n" +
|
||||
"\x14AddUserVerifications\x12\x1b.pb.AddUserVerificationsReq\x1a\x1c.pb.AddUserVerificationsResp\x12Z\n" +
|
||||
"\x17UpdateUserVerifications\x12\x1e.pb.UpdateUserVerificationsReq\x1a\x1f.pb.UpdateUserVerificationsResp\x12Q\n" +
|
||||
"\x14DelUserVerifications\x12\x1b.pb.DelUserVerificationsReq\x1a\x1c.pb.DelUserVerificationsResp\x12]\n" +
|
||||
"\x18GetUserVerificationsById\x12\x1f.pb.GetUserVerificationsByIdReq\x1a .pb.GetUserVerificationsByIdResp\x12Z\n" +
|
||||
"\x17SearchUserVerifications\x12\x1e.pb.SearchUserVerificationsReq\x1a\x1f.pb.SearchUserVerificationsRespB\x06Z\x04./pbb\x06proto3"
|
||||
|
||||
var (
|
||||
file_user_verifications_proto_rawDescOnce sync.Once
|
||||
file_user_verifications_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_user_verifications_proto_rawDescGZIP() []byte {
|
||||
file_user_verifications_proto_rawDescOnce.Do(func() {
|
||||
file_user_verifications_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_user_verifications_proto_rawDesc), len(file_user_verifications_proto_rawDesc)))
|
||||
})
|
||||
return file_user_verifications_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_user_verifications_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_user_verifications_proto_goTypes = []any{
|
||||
(*UserVerifications)(nil), // 0: pb.UserVerifications
|
||||
(*AddUserVerificationsReq)(nil), // 1: pb.AddUserVerificationsReq
|
||||
(*AddUserVerificationsResp)(nil), // 2: pb.AddUserVerificationsResp
|
||||
(*UpdateUserVerificationsReq)(nil), // 3: pb.UpdateUserVerificationsReq
|
||||
(*UpdateUserVerificationsResp)(nil), // 4: pb.UpdateUserVerificationsResp
|
||||
(*DelUserVerificationsReq)(nil), // 5: pb.DelUserVerificationsReq
|
||||
(*DelUserVerificationsResp)(nil), // 6: pb.DelUserVerificationsResp
|
||||
(*GetUserVerificationsByIdReq)(nil), // 7: pb.GetUserVerificationsByIdReq
|
||||
(*GetUserVerificationsByIdResp)(nil), // 8: pb.GetUserVerificationsByIdResp
|
||||
(*SearchUserVerificationsReq)(nil), // 9: pb.SearchUserVerificationsReq
|
||||
(*SearchUserVerificationsResp)(nil), // 10: pb.SearchUserVerificationsResp
|
||||
}
|
||||
var file_user_verifications_proto_depIdxs = []int32{
|
||||
0, // 0: pb.GetUserVerificationsByIdResp.userVerifications:type_name -> pb.UserVerifications
|
||||
0, // 1: pb.SearchUserVerificationsResp.userVerifications:type_name -> pb.UserVerifications
|
||||
1, // 2: pb.user_verifications.AddUserVerifications:input_type -> pb.AddUserVerificationsReq
|
||||
3, // 3: pb.user_verifications.UpdateUserVerifications:input_type -> pb.UpdateUserVerificationsReq
|
||||
5, // 4: pb.user_verifications.DelUserVerifications:input_type -> pb.DelUserVerificationsReq
|
||||
7, // 5: pb.user_verifications.GetUserVerificationsById:input_type -> pb.GetUserVerificationsByIdReq
|
||||
9, // 6: pb.user_verifications.SearchUserVerifications:input_type -> pb.SearchUserVerificationsReq
|
||||
2, // 7: pb.user_verifications.AddUserVerifications:output_type -> pb.AddUserVerificationsResp
|
||||
4, // 8: pb.user_verifications.UpdateUserVerifications:output_type -> pb.UpdateUserVerificationsResp
|
||||
6, // 9: pb.user_verifications.DelUserVerifications:output_type -> pb.DelUserVerificationsResp
|
||||
8, // 10: pb.user_verifications.GetUserVerificationsById:output_type -> pb.GetUserVerificationsByIdResp
|
||||
10, // 11: pb.user_verifications.SearchUserVerifications:output_type -> pb.SearchUserVerificationsResp
|
||||
7, // [7:12] is the sub-list for method output_type
|
||||
2, // [2:7] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_user_verifications_proto_init() }
|
||||
func file_user_verifications_proto_init() {
|
||||
if File_user_verifications_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_user_verifications_proto_rawDesc), len(file_user_verifications_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_user_verifications_proto_goTypes,
|
||||
DependencyIndexes: file_user_verifications_proto_depIdxs,
|
||||
MessageInfos: file_user_verifications_proto_msgTypes,
|
||||
}.Build()
|
||||
File_user_verifications_proto = out.File
|
||||
file_user_verifications_proto_goTypes = nil
|
||||
file_user_verifications_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc v5.29.6
|
||||
// source: user_verifications.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
UserVerifications_AddUserVerifications_FullMethodName = "/pb.user_verifications/AddUserVerifications"
|
||||
UserVerifications_UpdateUserVerifications_FullMethodName = "/pb.user_verifications/UpdateUserVerifications"
|
||||
UserVerifications_DelUserVerifications_FullMethodName = "/pb.user_verifications/DelUserVerifications"
|
||||
UserVerifications_GetUserVerificationsById_FullMethodName = "/pb.user_verifications/GetUserVerificationsById"
|
||||
UserVerifications_SearchUserVerifications_FullMethodName = "/pb.user_verifications/SearchUserVerifications"
|
||||
)
|
||||
|
||||
// UserVerificationsClient is the client API for UserVerifications service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type UserVerificationsClient interface {
|
||||
// -----------------------userVerifications-----------------------
|
||||
AddUserVerifications(ctx context.Context, in *AddUserVerificationsReq, opts ...grpc.CallOption) (*AddUserVerificationsResp, error)
|
||||
UpdateUserVerifications(ctx context.Context, in *UpdateUserVerificationsReq, opts ...grpc.CallOption) (*UpdateUserVerificationsResp, error)
|
||||
DelUserVerifications(ctx context.Context, in *DelUserVerificationsReq, opts ...grpc.CallOption) (*DelUserVerificationsResp, error)
|
||||
GetUserVerificationsById(ctx context.Context, in *GetUserVerificationsByIdReq, opts ...grpc.CallOption) (*GetUserVerificationsByIdResp, error)
|
||||
SearchUserVerifications(ctx context.Context, in *SearchUserVerificationsReq, opts ...grpc.CallOption) (*SearchUserVerificationsResp, error)
|
||||
}
|
||||
|
||||
type userVerificationsClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewUserVerificationsClient(cc grpc.ClientConnInterface) UserVerificationsClient {
|
||||
return &userVerificationsClient{cc}
|
||||
}
|
||||
|
||||
func (c *userVerificationsClient) AddUserVerifications(ctx context.Context, in *AddUserVerificationsReq, opts ...grpc.CallOption) (*AddUserVerificationsResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AddUserVerificationsResp)
|
||||
err := c.cc.Invoke(ctx, UserVerifications_AddUserVerifications_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userVerificationsClient) UpdateUserVerifications(ctx context.Context, in *UpdateUserVerificationsReq, opts ...grpc.CallOption) (*UpdateUserVerificationsResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdateUserVerificationsResp)
|
||||
err := c.cc.Invoke(ctx, UserVerifications_UpdateUserVerifications_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userVerificationsClient) DelUserVerifications(ctx context.Context, in *DelUserVerificationsReq, opts ...grpc.CallOption) (*DelUserVerificationsResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DelUserVerificationsResp)
|
||||
err := c.cc.Invoke(ctx, UserVerifications_DelUserVerifications_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userVerificationsClient) GetUserVerificationsById(ctx context.Context, in *GetUserVerificationsByIdReq, opts ...grpc.CallOption) (*GetUserVerificationsByIdResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetUserVerificationsByIdResp)
|
||||
err := c.cc.Invoke(ctx, UserVerifications_GetUserVerificationsById_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userVerificationsClient) SearchUserVerifications(ctx context.Context, in *SearchUserVerificationsReq, opts ...grpc.CallOption) (*SearchUserVerificationsResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SearchUserVerificationsResp)
|
||||
err := c.cc.Invoke(ctx, UserVerifications_SearchUserVerifications_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// UserVerificationsServer is the server API for UserVerifications service.
|
||||
// All implementations must embed UnimplementedUserVerificationsServer
|
||||
// for forward compatibility.
|
||||
type UserVerificationsServer interface {
|
||||
// -----------------------userVerifications-----------------------
|
||||
AddUserVerifications(context.Context, *AddUserVerificationsReq) (*AddUserVerificationsResp, error)
|
||||
UpdateUserVerifications(context.Context, *UpdateUserVerificationsReq) (*UpdateUserVerificationsResp, error)
|
||||
DelUserVerifications(context.Context, *DelUserVerificationsReq) (*DelUserVerificationsResp, error)
|
||||
GetUserVerificationsById(context.Context, *GetUserVerificationsByIdReq) (*GetUserVerificationsByIdResp, error)
|
||||
SearchUserVerifications(context.Context, *SearchUserVerificationsReq) (*SearchUserVerificationsResp, error)
|
||||
mustEmbedUnimplementedUserVerificationsServer()
|
||||
}
|
||||
|
||||
// UnimplementedUserVerificationsServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedUserVerificationsServer struct{}
|
||||
|
||||
func (UnimplementedUserVerificationsServer) AddUserVerifications(context.Context, *AddUserVerificationsReq) (*AddUserVerificationsResp, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method AddUserVerifications not implemented")
|
||||
}
|
||||
func (UnimplementedUserVerificationsServer) UpdateUserVerifications(context.Context, *UpdateUserVerificationsReq) (*UpdateUserVerificationsResp, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UpdateUserVerifications not implemented")
|
||||
}
|
||||
func (UnimplementedUserVerificationsServer) DelUserVerifications(context.Context, *DelUserVerificationsReq) (*DelUserVerificationsResp, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method DelUserVerifications not implemented")
|
||||
}
|
||||
func (UnimplementedUserVerificationsServer) GetUserVerificationsById(context.Context, *GetUserVerificationsByIdReq) (*GetUserVerificationsByIdResp, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetUserVerificationsById not implemented")
|
||||
}
|
||||
func (UnimplementedUserVerificationsServer) SearchUserVerifications(context.Context, *SearchUserVerificationsReq) (*SearchUserVerificationsResp, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SearchUserVerifications not implemented")
|
||||
}
|
||||
func (UnimplementedUserVerificationsServer) mustEmbedUnimplementedUserVerificationsServer() {}
|
||||
func (UnimplementedUserVerificationsServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeUserVerificationsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to UserVerificationsServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeUserVerificationsServer interface {
|
||||
mustEmbedUnimplementedUserVerificationsServer()
|
||||
}
|
||||
|
||||
func RegisterUserVerificationsServer(s grpc.ServiceRegistrar, srv UserVerificationsServer) {
|
||||
// If the following call panics, it indicates UnimplementedUserVerificationsServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&UserVerifications_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _UserVerifications_AddUserVerifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddUserVerificationsReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserVerificationsServer).AddUserVerifications(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: UserVerifications_AddUserVerifications_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserVerificationsServer).AddUserVerifications(ctx, req.(*AddUserVerificationsReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserVerifications_UpdateUserVerifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateUserVerificationsReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserVerificationsServer).UpdateUserVerifications(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: UserVerifications_UpdateUserVerifications_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserVerificationsServer).UpdateUserVerifications(ctx, req.(*UpdateUserVerificationsReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserVerifications_DelUserVerifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DelUserVerificationsReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserVerificationsServer).DelUserVerifications(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: UserVerifications_DelUserVerifications_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserVerificationsServer).DelUserVerifications(ctx, req.(*DelUserVerificationsReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserVerifications_GetUserVerificationsById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetUserVerificationsByIdReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserVerificationsServer).GetUserVerificationsById(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: UserVerifications_GetUserVerificationsById_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserVerificationsServer).GetUserVerificationsById(ctx, req.(*GetUserVerificationsByIdReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserVerifications_SearchUserVerifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SearchUserVerificationsReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserVerificationsServer).SearchUserVerifications(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: UserVerifications_SearchUserVerifications_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserVerificationsServer).SearchUserVerifications(ctx, req.(*SearchUserVerificationsReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// UserVerifications_ServiceDesc is the grpc.ServiceDesc for UserVerifications service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var UserVerifications_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pb.user_verifications",
|
||||
HandlerType: (*UserVerificationsServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AddUserVerifications",
|
||||
Handler: _UserVerifications_AddUserVerifications_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateUserVerifications",
|
||||
Handler: _UserVerifications_UpdateUserVerifications_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DelUserVerifications",
|
||||
Handler: _UserVerifications_DelUserVerifications_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetUserVerificationsById",
|
||||
Handler: _UserVerifications_GetUserVerificationsById_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SearchUserVerifications",
|
||||
Handler: _UserVerifications_SearchUserVerifications_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "user_verifications.proto",
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.9.2
|
||||
// Source: user_verifications.proto
|
||||
|
||||
package userverifications
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"juwan-backend/app/user_verifications/rpc/pb"
|
||||
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type (
|
||||
AddUserVerificationsReq = pb.AddUserVerificationsReq
|
||||
AddUserVerificationsResp = pb.AddUserVerificationsResp
|
||||
DelUserVerificationsReq = pb.DelUserVerificationsReq
|
||||
DelUserVerificationsResp = pb.DelUserVerificationsResp
|
||||
GetUserVerificationsByIdReq = pb.GetUserVerificationsByIdReq
|
||||
GetUserVerificationsByIdResp = pb.GetUserVerificationsByIdResp
|
||||
SearchUserVerificationsReq = pb.SearchUserVerificationsReq
|
||||
SearchUserVerificationsResp = pb.SearchUserVerificationsResp
|
||||
UpdateUserVerificationsReq = pb.UpdateUserVerificationsReq
|
||||
UpdateUserVerificationsResp = pb.UpdateUserVerificationsResp
|
||||
UserVerifications = pb.UserVerifications
|
||||
|
||||
UserVerificationsZrpcClient interface {
|
||||
// -----------------------userVerifications-----------------------
|
||||
AddUserVerifications(ctx context.Context, in *AddUserVerificationsReq, opts ...grpc.CallOption) (*AddUserVerificationsResp, error)
|
||||
UpdateUserVerifications(ctx context.Context, in *UpdateUserVerificationsReq, opts ...grpc.CallOption) (*UpdateUserVerificationsResp, error)
|
||||
DelUserVerifications(ctx context.Context, in *DelUserVerificationsReq, opts ...grpc.CallOption) (*DelUserVerificationsResp, error)
|
||||
GetUserVerificationsById(ctx context.Context, in *GetUserVerificationsByIdReq, opts ...grpc.CallOption) (*GetUserVerificationsByIdResp, error)
|
||||
SearchUserVerifications(ctx context.Context, in *SearchUserVerificationsReq, opts ...grpc.CallOption) (*SearchUserVerificationsResp, error)
|
||||
}
|
||||
|
||||
defaultUserVerificationsZrpcClient struct {
|
||||
cli zrpc.Client
|
||||
}
|
||||
)
|
||||
|
||||
func NewUserVerificationsZrpcClient(cli zrpc.Client) UserVerificationsZrpcClient {
|
||||
return &defaultUserVerificationsZrpcClient{
|
||||
cli: cli,
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------userVerifications-----------------------
|
||||
func (m *defaultUserVerificationsZrpcClient) AddUserVerifications(ctx context.Context, in *AddUserVerificationsReq, opts ...grpc.CallOption) (*AddUserVerificationsResp, error) {
|
||||
client := pb.NewUserVerificationsClient(m.cli.Conn())
|
||||
return client.AddUserVerifications(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultUserVerificationsZrpcClient) UpdateUserVerifications(ctx context.Context, in *UpdateUserVerificationsReq, opts ...grpc.CallOption) (*UpdateUserVerificationsResp, error) {
|
||||
client := pb.NewUserVerificationsClient(m.cli.Conn())
|
||||
return client.UpdateUserVerifications(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultUserVerificationsZrpcClient) DelUserVerifications(ctx context.Context, in *DelUserVerificationsReq, opts ...grpc.CallOption) (*DelUserVerificationsResp, error) {
|
||||
client := pb.NewUserVerificationsClient(m.cli.Conn())
|
||||
return client.DelUserVerifications(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultUserVerificationsZrpcClient) GetUserVerificationsById(ctx context.Context, in *GetUserVerificationsByIdReq, opts ...grpc.CallOption) (*GetUserVerificationsByIdResp, error) {
|
||||
client := pb.NewUserVerificationsClient(m.cli.Conn())
|
||||
return client.GetUserVerificationsById(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultUserVerificationsZrpcClient) SearchUserVerifications(ctx context.Context, in *SearchUserVerificationsReq, opts ...grpc.CallOption) (*SearchUserVerificationsResp, error) {
|
||||
client := pb.NewUserVerificationsClient(m.cli.Conn())
|
||||
return client.SearchUserVerifications(ctx, in, opts...)
|
||||
}
|
||||
Reference in New Issue
Block a user