v1

package
v0.0.0-...-96f2668 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthService_Login_FullMethodName    = "/admin.interface.v1.AuthService/Login"
	AuthService_Logout_FullMethodName   = "/admin.interface.v1.AuthService/Logout"
	AuthService_Register_FullMethodName = "/admin.interface.v1.AuthService/Register"
)
View Source
const (
	DeptService_ListDept_FullMethodName   = "/admin.interface.v1.DeptService/ListDept"
	DeptService_GetDept_FullMethodName    = "/admin.interface.v1.DeptService/GetDept"
	DeptService_CreateDept_FullMethodName = "/admin.interface.v1.DeptService/CreateDept"
	DeptService_UpdateDept_FullMethodName = "/admin.interface.v1.DeptService/UpdateDept"
	DeptService_DeleteDept_FullMethodName = "/admin.interface.v1.DeptService/DeleteDept"
)
View Source
const (
	MenuService_ListMenu_FullMethodName   = "/admin.interface.v1.MenuService/ListMenu"
	MenuService_GetMenu_FullMethodName    = "/admin.interface.v1.MenuService/GetMenu"
	MenuService_CreateMenu_FullMethodName = "/admin.interface.v1.MenuService/CreateMenu"
	MenuService_UpdateMenu_FullMethodName = "/admin.interface.v1.MenuService/UpdateMenu"
	MenuService_DeleteMenu_FullMethodName = "/admin.interface.v1.MenuService/DeleteMenu"
)
View Source
const (
	PostService_ListPost_FullMethodName   = "/admin.interface.v1.PostService/ListPost"
	PostService_GetPost_FullMethodName    = "/admin.interface.v1.PostService/GetPost"
	PostService_CreatePost_FullMethodName = "/admin.interface.v1.PostService/CreatePost"
	PostService_UpdatePost_FullMethodName = "/admin.interface.v1.PostService/UpdatePost"
	PostService_DeletePost_FullMethodName = "/admin.interface.v1.PostService/DeletePost"
)
View Source
const (
	RoleService_ListRole_FullMethodName   = "/admin.interface.v1.RoleService/ListRole"
	RoleService_GetRole_FullMethodName    = "/admin.interface.v1.RoleService/GetRole"
	RoleService_CreateRole_FullMethodName = "/admin.interface.v1.RoleService/CreateRole"
	RoleService_UpdateRole_FullMethodName = "/admin.interface.v1.RoleService/UpdateRole"
	RoleService_DeleteRole_FullMethodName = "/admin.interface.v1.RoleService/DeleteRole"
)
View Source
const (
	UserService_ListUser_FullMethodName   = "/admin.interface.v1.UserService/ListUser"
	UserService_GetUser_FullMethodName    = "/admin.interface.v1.UserService/GetUser"
	UserService_CreateUser_FullMethodName = "/admin.interface.v1.UserService/CreateUser"
	UserService_UpdateUser_FullMethodName = "/admin.interface.v1.UserService/UpdateUser"
	UserService_DeleteUser_FullMethodName = "/admin.interface.v1.UserService/DeleteUser"
)
View Source
const OperationAuthServiceLogin = "/admin.interface.v1.AuthService/Login"
View Source
const OperationAuthServiceLogout = "/admin.interface.v1.AuthService/Logout"
View Source
const OperationAuthServiceRegister = "/admin.interface.v1.AuthService/Register"
View Source
const OperationDeptServiceCreateDept = "/admin.interface.v1.DeptService/CreateDept"
View Source
const OperationDeptServiceDeleteDept = "/admin.interface.v1.DeptService/DeleteDept"
View Source
const OperationDeptServiceGetDept = "/admin.interface.v1.DeptService/GetDept"
View Source
const OperationDeptServiceListDept = "/admin.interface.v1.DeptService/ListDept"
View Source
const OperationDeptServiceUpdateDept = "/admin.interface.v1.DeptService/UpdateDept"
View Source
const OperationMenuServiceCreateMenu = "/admin.interface.v1.MenuService/CreateMenu"
View Source
const OperationMenuServiceDeleteMenu = "/admin.interface.v1.MenuService/DeleteMenu"
View Source
const OperationMenuServiceGetMenu = "/admin.interface.v1.MenuService/GetMenu"
View Source
const OperationMenuServiceListMenu = "/admin.interface.v1.MenuService/ListMenu"
View Source
const OperationMenuServiceUpdateMenu = "/admin.interface.v1.MenuService/UpdateMenu"
View Source
const OperationPostServiceCreatePost = "/admin.interface.v1.PostService/CreatePost"
View Source
const OperationPostServiceDeletePost = "/admin.interface.v1.PostService/DeletePost"
View Source
const OperationPostServiceGetPost = "/admin.interface.v1.PostService/GetPost"
View Source
const OperationPostServiceListPost = "/admin.interface.v1.PostService/ListPost"
View Source
const OperationPostServiceUpdatePost = "/admin.interface.v1.PostService/UpdatePost"
View Source
const OperationRoleServiceCreateRole = "/admin.interface.v1.RoleService/CreateRole"
View Source
const OperationRoleServiceDeleteRole = "/admin.interface.v1.RoleService/DeleteRole"
View Source
const OperationRoleServiceGetRole = "/admin.interface.v1.RoleService/GetRole"
View Source
const OperationRoleServiceListRole = "/admin.interface.v1.RoleService/ListRole"
View Source
const OperationRoleServiceUpdateRole = "/admin.interface.v1.RoleService/UpdateRole"
View Source
const OperationUserServiceCreateUser = "/admin.interface.v1.UserService/CreateUser"
View Source
const OperationUserServiceDeleteUser = "/admin.interface.v1.UserService/DeleteUser"
View Source
const OperationUserServiceGetUser = "/admin.interface.v1.UserService/GetUser"
View Source
const OperationUserServiceListUser = "/admin.interface.v1.UserService/ListUser"
View Source
const OperationUserServiceUpdateUser = "/admin.interface.v1.UserService/UpdateUser"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0:  "BAD_REQUEST",
		1:  "NOT_LOGGED_IN",
		2:  "ACCESS_FORBIDDEN",
		3:  "RESOURCE_NOT_FOUND",
		4:  "METHOD_NOT_ALLOWED",
		5:  "REQUEST_TIMEOUT",
		10: "INTERNAL_SERVER_ERROR",
		11: "NOT_IMPLEMENTED",
		12: "NETWORK_ERROR",
		13: "SERVICE_UNAVAILABLE",
		14: "NETWORK_TIMEOUT",
		15: "REQUEST_NOT_SUPPORT",
		30: "AUTH_TOKEN_EXPIRED",
		31: "AUTH_INVALID_TOKEN",
		32: "AUTH_TOKEN_NOT_EXIST",
		50: "USER_NOT_FOUND",
		51: "USER_NOT_EXIST",
		52: "USER_INCORRECT_PASSWORD",
		53: "USER_FREEZE",
		54: "USER_INVALID_ID",
		55: "USER_INVALID_PASSWORD",
	}
	ErrorReason_value = map[string]int32{
		"BAD_REQUEST":             0,
		"NOT_LOGGED_IN":           1,
		"ACCESS_FORBIDDEN":        2,
		"RESOURCE_NOT_FOUND":      3,
		"METHOD_NOT_ALLOWED":      4,
		"REQUEST_TIMEOUT":         5,
		"INTERNAL_SERVER_ERROR":   10,
		"NOT_IMPLEMENTED":         11,
		"NETWORK_ERROR":           12,
		"SERVICE_UNAVAILABLE":     13,
		"NETWORK_TIMEOUT":         14,
		"REQUEST_NOT_SUPPORT":     15,
		"AUTH_TOKEN_EXPIRED":      30,
		"AUTH_INVALID_TOKEN":      31,
		"AUTH_TOKEN_NOT_EXIST":    32,
		"USER_NOT_FOUND":          50,
		"USER_NOT_EXIST":          51,
		"USER_INCORRECT_PASSWORD": 52,
		"USER_FREEZE":             53,
		"USER_INVALID_ID":         54,
		"USER_INVALID_PASSWORD":   55,
	}
)

Enum value maps for ErrorReason.

View Source
var (
	GrandType_name = map[int32]string{
		0: "GRAND_TYPE_UNSPECIFIED",
		1: "GRAND_TYPE_PASSWORD",
		2: "GRAND_TYPE_CODE",
	}
	GrandType_value = map[string]int32{
		"GRAND_TYPE_UNSPECIFIED": 0,
		"GRAND_TYPE_PASSWORD":    1,
		"GRAND_TYPE_CODE":        2,
	}
)

Enum value maps for GrandType.

View Source
var AuthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "admin.interface.v1.AuthService",
	HandlerType: (*AuthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _AuthService_Login_Handler,
		},
		{
			MethodName: "Logout",
			Handler:    _AuthService_Logout_Handler,
		},
		{
			MethodName: "Register",
			Handler:    _AuthService_Register_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "admin/interface/v1/i_auth.proto",
}

AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var DeptService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "admin.interface.v1.DeptService",
	HandlerType: (*DeptServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListDept",
			Handler:    _DeptService_ListDept_Handler,
		},
		{
			MethodName: "GetDept",
			Handler:    _DeptService_GetDept_Handler,
		},
		{
			MethodName: "CreateDept",
			Handler:    _DeptService_CreateDept_Handler,
		},
		{
			MethodName: "UpdateDept",
			Handler:    _DeptService_UpdateDept_Handler,
		},
		{
			MethodName: "DeleteDept",
			Handler:    _DeptService_DeleteDept_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "admin/interface/v1/i_dept.proto",
}

DeptService_ServiceDesc is the grpc.ServiceDesc for DeptService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_admin_interface_v1_error_reason_proto protoreflect.FileDescriptor
View Source
var File_admin_interface_v1_i_auth_proto protoreflect.FileDescriptor
View Source
var File_admin_interface_v1_i_dept_proto protoreflect.FileDescriptor
View Source
var File_admin_interface_v1_i_menu_proto protoreflect.FileDescriptor
View Source
var File_admin_interface_v1_i_post_proto protoreflect.FileDescriptor
View Source
var File_admin_interface_v1_i_role_proto protoreflect.FileDescriptor
View Source
var File_admin_interface_v1_i_user_proto protoreflect.FileDescriptor
View Source
var MenuService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "admin.interface.v1.MenuService",
	HandlerType: (*MenuServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListMenu",
			Handler:    _MenuService_ListMenu_Handler,
		},
		{
			MethodName: "GetMenu",
			Handler:    _MenuService_GetMenu_Handler,
		},
		{
			MethodName: "CreateMenu",
			Handler:    _MenuService_CreateMenu_Handler,
		},
		{
			MethodName: "UpdateMenu",
			Handler:    _MenuService_UpdateMenu_Handler,
		},
		{
			MethodName: "DeleteMenu",
			Handler:    _MenuService_DeleteMenu_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "admin/interface/v1/i_menu.proto",
}

MenuService_ServiceDesc is the grpc.ServiceDesc for MenuService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var PostService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "admin.interface.v1.PostService",
	HandlerType: (*PostServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListPost",
			Handler:    _PostService_ListPost_Handler,
		},
		{
			MethodName: "GetPost",
			Handler:    _PostService_GetPost_Handler,
		},
		{
			MethodName: "CreatePost",
			Handler:    _PostService_CreatePost_Handler,
		},
		{
			MethodName: "UpdatePost",
			Handler:    _PostService_UpdatePost_Handler,
		},
		{
			MethodName: "DeletePost",
			Handler:    _PostService_DeletePost_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "admin/interface/v1/i_post.proto",
}

PostService_ServiceDesc is the grpc.ServiceDesc for PostService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var RoleService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "admin.interface.v1.RoleService",
	HandlerType: (*RoleServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListRole",
			Handler:    _RoleService_ListRole_Handler,
		},
		{
			MethodName: "GetRole",
			Handler:    _RoleService_GetRole_Handler,
		},
		{
			MethodName: "CreateRole",
			Handler:    _RoleService_CreateRole_Handler,
		},
		{
			MethodName: "UpdateRole",
			Handler:    _RoleService_UpdateRole_Handler,
		},
		{
			MethodName: "DeleteRole",
			Handler:    _RoleService_DeleteRole_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "admin/interface/v1/i_role.proto",
}

RoleService_ServiceDesc is the grpc.ServiceDesc for RoleService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "admin.interface.v1.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListUser",
			Handler:    _UserService_ListUser_Handler,
		},
		{
			MethodName: "GetUser",
			Handler:    _UserService_GetUser_Handler,
		},
		{
			MethodName: "CreateUser",
			Handler:    _UserService_CreateUser_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _UserService_UpdateUser_Handler,
		},
		{
			MethodName: "DeleteUser",
			Handler:    _UserService_DeleteUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "admin/interface/v1/i_user.proto",
}

UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func ErrorAccessForbidden

func ErrorAccessForbidden(format string, args ...interface{}) *errors.Error

403

func ErrorAuthInvalidToken

func ErrorAuthInvalidToken(format string, args ...interface{}) *errors.Error

token无效

func ErrorAuthTokenExpired

func ErrorAuthTokenExpired(format string, args ...interface{}) *errors.Error

认证相关

func ErrorAuthTokenNotExist

func ErrorAuthTokenNotExist(format string, args ...interface{}) *errors.Error

token不存在

func ErrorBadRequest

func ErrorBadRequest(format string, args ...interface{}) *errors.Error

400

func ErrorInternalServerError

func ErrorInternalServerError(format string, args ...interface{}) *errors.Error

500

func ErrorMethodNotAllowed

func ErrorMethodNotAllowed(format string, args ...interface{}) *errors.Error

405

func ErrorNetworkError

func ErrorNetworkError(format string, args ...interface{}) *errors.Error

502

func ErrorNetworkTimeout

func ErrorNetworkTimeout(format string, args ...interface{}) *errors.Error

504

func ErrorNotImplemented

func ErrorNotImplemented(format string, args ...interface{}) *errors.Error

501

func ErrorNotLoggedIn

func ErrorNotLoggedIn(format string, args ...interface{}) *errors.Error

401

func ErrorRequestNotSupport

func ErrorRequestNotSupport(format string, args ...interface{}) *errors.Error

505

func ErrorRequestTimeout

func ErrorRequestTimeout(format string, args ...interface{}) *errors.Error

408

func ErrorResourceNotFound

func ErrorResourceNotFound(format string, args ...interface{}) *errors.Error

404

func ErrorServiceUnavailable

func ErrorServiceUnavailable(format string, args ...interface{}) *errors.Error

503

func ErrorUserFreeze

func ErrorUserFreeze(format string, args ...interface{}) *errors.Error

用户冻结

func ErrorUserIncorrectPassword

func ErrorUserIncorrectPassword(format string, args ...interface{}) *errors.Error

密码错误

func ErrorUserInvalidId

func ErrorUserInvalidId(format string, args ...interface{}) *errors.Error

用户ID无效

func ErrorUserInvalidPassword

func ErrorUserInvalidPassword(format string, args ...interface{}) *errors.Error

密码无效

func ErrorUserNotExist

func ErrorUserNotExist(format string, args ...interface{}) *errors.Error

用户不存在

func ErrorUserNotFound

func ErrorUserNotFound(format string, args ...interface{}) *errors.Error

用户相关错误

func IsAccessForbidden

func IsAccessForbidden(err error) bool

403

func IsAuthInvalidToken

func IsAuthInvalidToken(err error) bool

token无效

func IsAuthTokenExpired

func IsAuthTokenExpired(err error) bool

认证相关

func IsAuthTokenNotExist

func IsAuthTokenNotExist(err error) bool

token不存在

func IsBadRequest

func IsBadRequest(err error) bool

400

func IsInternalServerError

func IsInternalServerError(err error) bool

500

func IsMethodNotAllowed

func IsMethodNotAllowed(err error) bool

405

func IsNetworkError

func IsNetworkError(err error) bool

502

func IsNetworkTimeout

func IsNetworkTimeout(err error) bool

504

func IsNotImplemented

func IsNotImplemented(err error) bool

501

func IsNotLoggedIn

func IsNotLoggedIn(err error) bool

401

func IsRequestNotSupport

func IsRequestNotSupport(err error) bool

505

func IsRequestTimeout

func IsRequestTimeout(err error) bool

408

func IsResourceNotFound

func IsResourceNotFound(err error) bool

404

func IsServiceUnavailable

func IsServiceUnavailable(err error) bool

503

func IsUserFreeze

func IsUserFreeze(err error) bool

用户冻结

func IsUserIncorrectPassword

func IsUserIncorrectPassword(err error) bool

密码错误

func IsUserInvalidId

func IsUserInvalidId(err error) bool

用户ID无效

func IsUserInvalidPassword

func IsUserInvalidPassword(err error) bool

密码无效

func IsUserNotExist

func IsUserNotExist(err error) bool

用户不存在

func IsUserNotFound

func IsUserNotFound(err error) bool

用户相关错误

func RegisterAuthServiceHTTPServer

func RegisterAuthServiceHTTPServer(s *http.Server, srv AuthServiceHTTPServer)

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)

func RegisterDeptServiceHTTPServer

func RegisterDeptServiceHTTPServer(s *http.Server, srv DeptServiceHTTPServer)

func RegisterDeptServiceServer

func RegisterDeptServiceServer(s grpc.ServiceRegistrar, srv DeptServiceServer)

func RegisterMenuServiceHTTPServer

func RegisterMenuServiceHTTPServer(s *http.Server, srv MenuServiceHTTPServer)

func RegisterMenuServiceServer

func RegisterMenuServiceServer(s grpc.ServiceRegistrar, srv MenuServiceServer)

func RegisterPostServiceHTTPServer

func RegisterPostServiceHTTPServer(s *http.Server, srv PostServiceHTTPServer)

func RegisterPostServiceServer

func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer)

func RegisterRoleServiceHTTPServer

func RegisterRoleServiceHTTPServer(s *http.Server, srv RoleServiceHTTPServer)

func RegisterRoleServiceServer

func RegisterRoleServiceServer(s grpc.ServiceRegistrar, srv RoleServiceServer)

func RegisterUserServiceHTTPServer

func RegisterUserServiceHTTPServer(s *http.Server, srv UserServiceHTTPServer)

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type AuthServiceClient

type AuthServiceClient interface {
	// 后台登陆
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	// 后台登出
	Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
	// 注册
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
}

AuthServiceClient is the client API for AuthService 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 AuthServiceHTTPClient

type AuthServiceHTTPClient interface {
	Login(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *LoginResponse, err error)
	Logout(ctx context.Context, req *LogoutRequest, opts ...http.CallOption) (rsp *LogoutResponse, err error)
	Register(ctx context.Context, req *RegisterRequest, opts ...http.CallOption) (rsp *RegisterResponse, err error)
}

func NewAuthServiceHTTPClient

func NewAuthServiceHTTPClient(client *http.Client) AuthServiceHTTPClient

type AuthServiceHTTPClientImpl

type AuthServiceHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*AuthServiceHTTPClientImpl) Login

func (*AuthServiceHTTPClientImpl) Logout

func (*AuthServiceHTTPClientImpl) Register

type AuthServiceHTTPServer

type AuthServiceHTTPServer interface {
	// Login 后台登陆
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	// Logout 后台登出
	Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
	// Register 注册
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
}

type AuthServiceServer

type AuthServiceServer interface {
	// 后台登陆
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	// 后台登出
	Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
	// 注册
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
	// contains filtered or unexported methods
}

AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility

type DeptServiceClient

type DeptServiceClient interface {
	// 获取部门列表
	ListDept(ctx context.Context, in *pagination.PagingRequest, opts ...grpc.CallOption) (*v1.ListDeptResponse, error)
	// 获取部门数据
	GetDept(ctx context.Context, in *v1.GetDeptRequest, opts ...grpc.CallOption) (*v1.Dept, error)
	// 创建部门
	CreateDept(ctx context.Context, in *v1.CreateDeptRequest, opts ...grpc.CallOption) (*v1.CreateDeptResponse, error)
	// 更新部门
	UpdateDept(ctx context.Context, in *v1.UpdateDeptRequest, opts ...grpc.CallOption) (*v1.UpdateDeptResponse, error)
	// 删除部门
	DeleteDept(ctx context.Context, in *v1.DeleteDeptRequest, opts ...grpc.CallOption) (*v1.DeleteDeptResponse, error)
}

DeptServiceClient is the client API for DeptService 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 DeptServiceHTTPClient

type DeptServiceHTTPClient interface {
	CreateDept(ctx context.Context, req *v1.CreateDeptRequest, opts ...http.CallOption) (rsp *v1.CreateDeptResponse, err error)
	DeleteDept(ctx context.Context, req *v1.DeleteDeptRequest, opts ...http.CallOption) (rsp *v1.DeleteDeptResponse, err error)
	GetDept(ctx context.Context, req *v1.GetDeptRequest, opts ...http.CallOption) (rsp *v1.Dept, err error)
	ListDept(ctx context.Context, req *pagination.PagingRequest, opts ...http.CallOption) (rsp *v1.ListDeptResponse, err error)
	UpdateDept(ctx context.Context, req *v1.UpdateDeptRequest, opts ...http.CallOption) (rsp *v1.UpdateDeptResponse, err error)
}

func NewDeptServiceHTTPClient

func NewDeptServiceHTTPClient(client *http.Client) DeptServiceHTTPClient

type DeptServiceHTTPClientImpl

type DeptServiceHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*DeptServiceHTTPClientImpl) CreateDept

func (*DeptServiceHTTPClientImpl) DeleteDept

func (*DeptServiceHTTPClientImpl) GetDept

func (*DeptServiceHTTPClientImpl) ListDept

func (*DeptServiceHTTPClientImpl) UpdateDept

type DeptServiceHTTPServer

type DeptServiceHTTPServer interface {
	// CreateDept 创建部门
	CreateDept(context.Context, *v1.CreateDeptRequest) (*v1.CreateDeptResponse, error)
	// DeleteDept 删除部门
	DeleteDept(context.Context, *v1.DeleteDeptRequest) (*v1.DeleteDeptResponse, error)
	// GetDept 获取部门数据
	GetDept(context.Context, *v1.GetDeptRequest) (*v1.Dept, error)
	// ListDept 获取部门列表
	ListDept(context.Context, *pagination.PagingRequest) (*v1.ListDeptResponse, error)
	// UpdateDept 更新部门
	UpdateDept(context.Context, *v1.UpdateDeptRequest) (*v1.UpdateDeptResponse, error)
}

type DeptServiceServer

type DeptServiceServer interface {
	// 获取部门列表
	ListDept(context.Context, *pagination.PagingRequest) (*v1.ListDeptResponse, error)
	// 获取部门数据
	GetDept(context.Context, *v1.GetDeptRequest) (*v1.Dept, error)
	// 创建部门
	CreateDept(context.Context, *v1.CreateDeptRequest) (*v1.CreateDeptResponse, error)
	// 更新部门
	UpdateDept(context.Context, *v1.UpdateDeptRequest) (*v1.UpdateDeptResponse, error)
	// 删除部门
	DeleteDept(context.Context, *v1.DeleteDeptRequest) (*v1.DeleteDeptResponse, error)
	// contains filtered or unexported methods
}

DeptServiceServer is the server API for DeptService service. All implementations must embed UnimplementedDeptServiceServer for forward compatibility

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_BAD_REQUEST           ErrorReason = 0  // 400
	ErrorReason_NOT_LOGGED_IN         ErrorReason = 1  // 401
	ErrorReason_ACCESS_FORBIDDEN      ErrorReason = 2  // 403
	ErrorReason_RESOURCE_NOT_FOUND    ErrorReason = 3  // 404
	ErrorReason_METHOD_NOT_ALLOWED    ErrorReason = 4  // 405
	ErrorReason_REQUEST_TIMEOUT       ErrorReason = 5  // 408
	ErrorReason_INTERNAL_SERVER_ERROR ErrorReason = 10 // 500
	ErrorReason_NOT_IMPLEMENTED       ErrorReason = 11 // 501
	ErrorReason_NETWORK_ERROR         ErrorReason = 12 // 502
	ErrorReason_SERVICE_UNAVAILABLE   ErrorReason = 13 // 503
	ErrorReason_NETWORK_TIMEOUT       ErrorReason = 14 // 504
	ErrorReason_REQUEST_NOT_SUPPORT   ErrorReason = 15 // 505
	// 认证相关
	ErrorReason_AUTH_TOKEN_EXPIRED   ErrorReason = 30 // token过期
	ErrorReason_AUTH_INVALID_TOKEN   ErrorReason = 31 // token无效
	ErrorReason_AUTH_TOKEN_NOT_EXIST ErrorReason = 32 // token不存在
	// 用户相关错误
	ErrorReason_USER_NOT_FOUND          ErrorReason = 50
	ErrorReason_USER_NOT_EXIST          ErrorReason = 51 // 用户不存在
	ErrorReason_USER_INCORRECT_PASSWORD ErrorReason = 52 // 密码错误
	ErrorReason_USER_FREEZE             ErrorReason = 53 // 用户冻结
	ErrorReason_USER_INVALID_ID         ErrorReason = 54 // 用户ID无效
	ErrorReason_USER_INVALID_PASSWORD   ErrorReason = 55 // 密码无效
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

func (ErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type GrandType

type GrandType int32

授权类型

const (
	GrandType_GRAND_TYPE_UNSPECIFIED GrandType = 0 // 未指定
	GrandType_GRAND_TYPE_PASSWORD    GrandType = 1 // 密码
	GrandType_GRAND_TYPE_CODE        GrandType = 2 // 验证码
)

func (GrandType) Descriptor

func (GrandType) Descriptor() protoreflect.EnumDescriptor

func (GrandType) Enum

func (x GrandType) Enum() *GrandType

func (GrandType) EnumDescriptor deprecated

func (GrandType) EnumDescriptor() ([]byte, []int)

Deprecated: Use GrandType.Descriptor instead.

func (GrandType) Number

func (x GrandType) Number() protoreflect.EnumNumber

func (GrandType) String

func (x GrandType) String() string

func (GrandType) Type

type LoginRequest

type LoginRequest struct {
	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`                                   // 账号
	Password  string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`                           // 密码
	GrandType *int32 `protobuf:"varint,3,opt,name=grand_type,json=grandType,proto3,oneof" json:"grand_type,omitempty"` // 授权类型,一直为:password
	// contains filtered or unexported fields
}

用户后台登陆 - 请求

func (*LoginRequest) Descriptor deprecated

func (*LoginRequest) Descriptor() ([]byte, []int)

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetGrandType

func (x *LoginRequest) GetGrandType() int32

func (*LoginRequest) GetName

func (x *LoginRequest) GetName() string

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

func (x *LoginRequest) ProtoReflect() protoreflect.Message

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

func (*LoginRequest) Validate

func (m *LoginRequest) Validate() error

Validate checks the field values on LoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*LoginRequest) ValidateAll

func (m *LoginRequest) ValidateAll() error

ValidateAll checks the field values on LoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LoginRequestMultiError, or nil if none found.

type LoginRequestMultiError

type LoginRequestMultiError []error

LoginRequestMultiError is an error wrapping multiple validation errors returned by LoginRequest.ValidateAll() if the designated constraints aren't met.

func (LoginRequestMultiError) AllErrors

func (m LoginRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoginRequestMultiError) Error

func (m LoginRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type LoginRequestValidationError

type LoginRequestValidationError struct {
	// contains filtered or unexported fields
}

LoginRequestValidationError is the validation error returned by LoginRequest.Validate if the designated constraints aren't met.

func (LoginRequestValidationError) Cause

Cause function returns cause value.

func (LoginRequestValidationError) Error

Error satisfies the builtin error interface

func (LoginRequestValidationError) ErrorName

func (e LoginRequestValidationError) ErrorName() string

ErrorName returns error name.

func (LoginRequestValidationError) Field

Field function returns field value.

func (LoginRequestValidationError) Key

Key function returns key value.

func (LoginRequestValidationError) Reason

Reason function returns reason value.

type LoginResponse

type LoginResponse struct {
	Id           uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                        // 用户ID
	Name         string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`                                     // 用户名
	TokenType    string `protobuf:"bytes,3,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"`          // 令牌类型
	AccessToken  string `protobuf:"bytes,4,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`    // 访问令牌
	RefreshToken string `protobuf:"bytes,5,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` // 刷新令牌
	// contains filtered or unexported fields
}

用户后台登陆 - 回应

func (*LoginResponse) Descriptor deprecated

func (*LoginResponse) Descriptor() ([]byte, []int)

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetAccessToken

func (x *LoginResponse) GetAccessToken() string

func (*LoginResponse) GetId

func (x *LoginResponse) GetId() uint32

func (*LoginResponse) GetName

func (x *LoginResponse) GetName() string

func (*LoginResponse) GetRefreshToken

func (x *LoginResponse) GetRefreshToken() string

func (*LoginResponse) GetTokenType

func (x *LoginResponse) GetTokenType() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

func (x *LoginResponse) ProtoReflect() protoreflect.Message

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

func (*LoginResponse) Validate

func (m *LoginResponse) Validate() error

Validate checks the field values on LoginResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*LoginResponse) ValidateAll

func (m *LoginResponse) ValidateAll() error

ValidateAll checks the field values on LoginResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LoginResponseMultiError, or nil if none found.

type LoginResponseMultiError

type LoginResponseMultiError []error

LoginResponseMultiError is an error wrapping multiple validation errors returned by LoginResponse.ValidateAll() if the designated constraints aren't met.

func (LoginResponseMultiError) AllErrors

func (m LoginResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoginResponseMultiError) Error

func (m LoginResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type LoginResponseValidationError

type LoginResponseValidationError struct {
	// contains filtered or unexported fields
}

LoginResponseValidationError is the validation error returned by LoginResponse.Validate if the designated constraints aren't met.

func (LoginResponseValidationError) Cause

Cause function returns cause value.

func (LoginResponseValidationError) Error

Error satisfies the builtin error interface

func (LoginResponseValidationError) ErrorName

func (e LoginResponseValidationError) ErrorName() string

ErrorName returns error name.

func (LoginResponseValidationError) Field

Field function returns field value.

func (LoginResponseValidationError) Key

Key function returns key value.

func (LoginResponseValidationError) Reason

Reason function returns reason value.

type LogoutRequest

type LogoutRequest struct {
	// contains filtered or unexported fields
}

用户后台登出 - 请求

func (*LogoutRequest) Descriptor deprecated

func (*LogoutRequest) Descriptor() ([]byte, []int)

Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.

func (*LogoutRequest) ProtoMessage

func (*LogoutRequest) ProtoMessage()

func (*LogoutRequest) ProtoReflect

func (x *LogoutRequest) ProtoReflect() protoreflect.Message

func (*LogoutRequest) Reset

func (x *LogoutRequest) Reset()

func (*LogoutRequest) String

func (x *LogoutRequest) String() string

func (*LogoutRequest) Validate

func (m *LogoutRequest) Validate() error

Validate checks the field values on LogoutRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*LogoutRequest) ValidateAll

func (m *LogoutRequest) ValidateAll() error

ValidateAll checks the field values on LogoutRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LogoutRequestMultiError, or nil if none found.

type LogoutRequestMultiError

type LogoutRequestMultiError []error

LogoutRequestMultiError is an error wrapping multiple validation errors returned by LogoutRequest.ValidateAll() if the designated constraints aren't met.

func (LogoutRequestMultiError) AllErrors

func (m LogoutRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LogoutRequestMultiError) Error

func (m LogoutRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type LogoutRequestValidationError

type LogoutRequestValidationError struct {
	// contains filtered or unexported fields
}

LogoutRequestValidationError is the validation error returned by LogoutRequest.Validate if the designated constraints aren't met.

func (LogoutRequestValidationError) Cause

Cause function returns cause value.

func (LogoutRequestValidationError) Error

Error satisfies the builtin error interface

func (LogoutRequestValidationError) ErrorName

func (e LogoutRequestValidationError) ErrorName() string

ErrorName returns error name.

func (LogoutRequestValidationError) Field

Field function returns field value.

func (LogoutRequestValidationError) Key

Key function returns key value.

func (LogoutRequestValidationError) Reason

Reason function returns reason value.

type LogoutResponse

type LogoutResponse struct {
	// contains filtered or unexported fields
}

用户后台登出 - 回应

func (*LogoutResponse) Descriptor deprecated

func (*LogoutResponse) Descriptor() ([]byte, []int)

Deprecated: Use LogoutResponse.ProtoReflect.Descriptor instead.

func (*LogoutResponse) ProtoMessage

func (*LogoutResponse) ProtoMessage()

func (*LogoutResponse) ProtoReflect

func (x *LogoutResponse) ProtoReflect() protoreflect.Message

func (*LogoutResponse) Reset

func (x *LogoutResponse) Reset()

func (*LogoutResponse) String

func (x *LogoutResponse) String() string

func (*LogoutResponse) Validate

func (m *LogoutResponse) Validate() error

Validate checks the field values on LogoutResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*LogoutResponse) ValidateAll

func (m *LogoutResponse) ValidateAll() error

ValidateAll checks the field values on LogoutResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LogoutResponseMultiError, or nil if none found.

type LogoutResponseMultiError

type LogoutResponseMultiError []error

LogoutResponseMultiError is an error wrapping multiple validation errors returned by LogoutResponse.ValidateAll() if the designated constraints aren't met.

func (LogoutResponseMultiError) AllErrors

func (m LogoutResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LogoutResponseMultiError) Error

func (m LogoutResponseMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type LogoutResponseValidationError

type LogoutResponseValidationError struct {
	// contains filtered or unexported fields
}

LogoutResponseValidationError is the validation error returned by LogoutResponse.Validate if the designated constraints aren't met.

func (LogoutResponseValidationError) Cause

Cause function returns cause value.

func (LogoutResponseValidationError) Error

Error satisfies the builtin error interface

func (LogoutResponseValidationError) ErrorName

func (e LogoutResponseValidationError) ErrorName() string

ErrorName returns error name.

func (LogoutResponseValidationError) Field

Field function returns field value.

func (LogoutResponseValidationError) Key

Key function returns key value.

func (LogoutResponseValidationError) Reason

Reason function returns reason value.

type MenuServiceClient interface {
	// 获取菜单列表
	ListMenu(ctx context.Context, in *pagination.PagingRequest, opts ...grpc.CallOption) (*v1.ListMenuResponse, error)
	// 获取菜单数据
	GetMenu(ctx context.Context, in *v1.GetMenuRequest, opts ...grpc.CallOption) (*v1.Menu, error)
	// 创建菜单
	CreateMenu(ctx context.Context, in *v1.CreateMenuRequest, opts ...grpc.CallOption) (*v1.CreateMenuResponse, error)
	// 更新菜单
	UpdateMenu(ctx context.Context, in *v1.UpdateMenuRequest, opts ...grpc.CallOption) (*v1.UpdateMenuResponse, error)
	// 删除菜单
	DeleteMenu(ctx context.Context, in *v1.DeleteMenuRequest, opts ...grpc.CallOption) (*v1.DeleteMenuResponse, error)
}

MenuServiceClient is the client API for MenuService 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 MenuServiceHTTPClient interface {
	CreateMenu(ctx context.Context, req *v1.CreateMenuRequest, opts ...http.CallOption) (rsp *v1.CreateMenuResponse, err error)
	DeleteMenu(ctx context.Context, req *v1.DeleteMenuRequest, opts ...http.CallOption) (rsp *v1.DeleteMenuResponse, err error)
	GetMenu(ctx context.Context, req *v1.GetMenuRequest, opts ...http.CallOption) (rsp *v1.Menu, err error)
	ListMenu(ctx context.Context, req *pagination.PagingRequest, opts ...http.CallOption) (rsp *v1.ListMenuResponse, err error)
	UpdateMenu(ctx context.Context, req *v1.UpdateMenuRequest, opts ...http.CallOption) (rsp *v1.UpdateMenuResponse, err error)
}

func NewMenuServiceHTTPClient

func NewMenuServiceHTTPClient(client *http.Client) MenuServiceHTTPClient
type MenuServiceHTTPClientImpl struct {
	// contains filtered or unexported fields
}
type MenuServiceHTTPServer interface {
	// CreateMenu 创建菜单
	CreateMenu(context.Context, *v1.CreateMenuRequest) (*v1.CreateMenuResponse, error)
	// DeleteMenu 删除菜单
	DeleteMenu(context.Context, *v1.DeleteMenuRequest) (*v1.DeleteMenuResponse, error)
	// GetMenu 获取菜单数据
	GetMenu(context.Context, *v1.GetMenuRequest) (*v1.Menu, error)
	// ListMenu 获取菜单列表
	ListMenu(context.Context, *pagination.PagingRequest) (*v1.ListMenuResponse, error)
	// UpdateMenu 更新菜单
	UpdateMenu(context.Context, *v1.UpdateMenuRequest) (*v1.UpdateMenuResponse, error)
}
type MenuServiceServer interface {
	// 获取菜单列表
	ListMenu(context.Context, *pagination.PagingRequest) (*v1.ListMenuResponse, error)
	// 获取菜单数据
	GetMenu(context.Context, *v1.GetMenuRequest) (*v1.Menu, error)
	// 创建菜单
	CreateMenu(context.Context, *v1.CreateMenuRequest) (*v1.CreateMenuResponse, error)
	// 更新菜单
	UpdateMenu(context.Context, *v1.UpdateMenuRequest) (*v1.UpdateMenuResponse, error)
	// 删除菜单
	DeleteMenu(context.Context, *v1.DeleteMenuRequest) (*v1.DeleteMenuResponse, error)
	// contains filtered or unexported methods
}

MenuServiceServer is the server API for MenuService service. All implementations must embed UnimplementedMenuServiceServer for forward compatibility

type PostServiceClient

type PostServiceClient interface {
	// 获取岗位列表
	ListPost(ctx context.Context, in *pagination.PagingRequest, opts ...grpc.CallOption) (*v1.ListPostResponse, error)
	// 获取岗位数据
	GetPost(ctx context.Context, in *v1.GetPostRequest, opts ...grpc.CallOption) (*v1.Post, error)
	// 创建岗位
	CreatePost(ctx context.Context, in *v1.CreatePostRequest, opts ...grpc.CallOption) (*v1.CreatePostResponse, error)
	// 更新岗位
	UpdatePost(ctx context.Context, in *v1.UpdatePostRequest, opts ...grpc.CallOption) (*v1.UpdatePostResponse, error)
	// 删除岗位
	DeletePost(ctx context.Context, in *v1.DeletePostRequest, opts ...grpc.CallOption) (*v1.DeletePostResponse, error)
}

PostServiceClient is the client API for PostService 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 PostServiceHTTPClient

type PostServiceHTTPClient interface {
	CreatePost(ctx context.Context, req *v1.CreatePostRequest, opts ...http.CallOption) (rsp *v1.CreatePostResponse, err error)
	DeletePost(ctx context.Context, req *v1.DeletePostRequest, opts ...http.CallOption) (rsp *v1.DeletePostResponse, err error)
	GetPost(ctx context.Context, req *v1.GetPostRequest, opts ...http.CallOption) (rsp *v1.Post, err error)
	ListPost(ctx context.Context, req *pagination.PagingRequest, opts ...http.CallOption) (rsp *v1.ListPostResponse, err error)
	UpdatePost(ctx context.Context, req *v1.UpdatePostRequest, opts ...http.CallOption) (rsp *v1.UpdatePostResponse, err error)
}

func NewPostServiceHTTPClient

func NewPostServiceHTTPClient(client *http.Client) PostServiceHTTPClient

type PostServiceHTTPClientImpl

type PostServiceHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*PostServiceHTTPClientImpl) CreatePost

func (*PostServiceHTTPClientImpl) DeletePost

func (*PostServiceHTTPClientImpl) GetPost

func (*PostServiceHTTPClientImpl) ListPost

func (*PostServiceHTTPClientImpl) UpdatePost

type PostServiceHTTPServer

type PostServiceHTTPServer interface {
	// CreatePost 创建岗位
	CreatePost(context.Context, *v1.CreatePostRequest) (*v1.CreatePostResponse, error)
	// DeletePost 删除岗位
	DeletePost(context.Context, *v1.DeletePostRequest) (*v1.DeletePostResponse, error)
	// GetPost 获取岗位数据
	GetPost(context.Context, *v1.GetPostRequest) (*v1.Post, error)
	// ListPost 获取岗位列表
	ListPost(context.Context, *pagination.PagingRequest) (*v1.ListPostResponse, error)
	// UpdatePost 更新岗位
	UpdatePost(context.Context, *v1.UpdatePostRequest) (*v1.UpdatePostResponse, error)
}

type PostServiceServer

type PostServiceServer interface {
	// 获取岗位列表
	ListPost(context.Context, *pagination.PagingRequest) (*v1.ListPostResponse, error)
	// 获取岗位数据
	GetPost(context.Context, *v1.GetPostRequest) (*v1.Post, error)
	// 创建岗位
	CreatePost(context.Context, *v1.CreatePostRequest) (*v1.CreatePostResponse, error)
	// 更新岗位
	UpdatePost(context.Context, *v1.UpdatePostRequest) (*v1.UpdatePostResponse, error)
	// 删除岗位
	DeletePost(context.Context, *v1.DeletePostRequest) (*v1.DeletePostResponse, error)
	// contains filtered or unexported methods
}

PostServiceServer is the server API for PostService service. All implementations must embed UnimplementedPostServiceServer for forward compatibility

type RegisterRequest

type RegisterRequest struct {

	// 请求体
	Auth   *RegisterRequest_Auth `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"`
	Domain string                `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
	// contains filtered or unexported fields
}

请求 - 注册

func (*RegisterRequest) Descriptor deprecated

func (*RegisterRequest) Descriptor() ([]byte, []int)

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetAuth

func (x *RegisterRequest) GetAuth() *RegisterRequest_Auth

func (*RegisterRequest) GetDomain

func (x *RegisterRequest) GetDomain() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

func (x *RegisterRequest) ProtoReflect() protoreflect.Message

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

func (*RegisterRequest) Validate

func (m *RegisterRequest) Validate() error

Validate checks the field values on RegisterRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RegisterRequest) ValidateAll

func (m *RegisterRequest) ValidateAll() error

ValidateAll checks the field values on RegisterRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterRequestMultiError, or nil if none found.

type RegisterRequestMultiError

type RegisterRequestMultiError []error

RegisterRequestMultiError is an error wrapping multiple validation errors returned by RegisterRequest.ValidateAll() if the designated constraints aren't met.

func (RegisterRequestMultiError) AllErrors

func (m RegisterRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RegisterRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RegisterRequestValidationError

type RegisterRequestValidationError struct {
	// contains filtered or unexported fields
}

RegisterRequestValidationError is the validation error returned by RegisterRequest.Validate if the designated constraints aren't met.

func (RegisterRequestValidationError) Cause

Cause function returns cause value.

func (RegisterRequestValidationError) Error

Error satisfies the builtin error interface

func (RegisterRequestValidationError) ErrorName

func (e RegisterRequestValidationError) ErrorName() string

ErrorName returns error name.

func (RegisterRequestValidationError) Field

Field function returns field value.

func (RegisterRequestValidationError) Key

Key function returns key value.

func (RegisterRequestValidationError) Reason

Reason function returns reason value.

type RegisterRequest_Auth

type RegisterRequest_Auth struct {

	// 用户名
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// 密码
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// 电话
	Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"`
	// 授权类型,一直为:password
	GrandType *int32 `protobuf:"varint,4,opt,name=grand_type,json=grandType,proto3,oneof" json:"grand_type,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest_Auth) Descriptor deprecated

func (*RegisterRequest_Auth) Descriptor() ([]byte, []int)

Deprecated: Use RegisterRequest_Auth.ProtoReflect.Descriptor instead.

func (*RegisterRequest_Auth) GetGrandType

func (x *RegisterRequest_Auth) GetGrandType() int32

func (*RegisterRequest_Auth) GetName

func (x *RegisterRequest_Auth) GetName() string

func (*RegisterRequest_Auth) GetPassword

func (x *RegisterRequest_Auth) GetPassword() string

func (*RegisterRequest_Auth) GetPhone

func (x *RegisterRequest_Auth) GetPhone() string

func (*RegisterRequest_Auth) ProtoMessage

func (*RegisterRequest_Auth) ProtoMessage()

func (*RegisterRequest_Auth) ProtoReflect

func (x *RegisterRequest_Auth) ProtoReflect() protoreflect.Message

func (*RegisterRequest_Auth) Reset

func (x *RegisterRequest_Auth) Reset()

func (*RegisterRequest_Auth) String

func (x *RegisterRequest_Auth) String() string

func (*RegisterRequest_Auth) Validate

func (m *RegisterRequest_Auth) Validate() error

Validate checks the field values on RegisterRequest_Auth with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RegisterRequest_Auth) ValidateAll

func (m *RegisterRequest_Auth) ValidateAll() error

ValidateAll checks the field values on RegisterRequest_Auth with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterRequest_AuthMultiError, or nil if none found.

type RegisterRequest_AuthMultiError

type RegisterRequest_AuthMultiError []error

RegisterRequest_AuthMultiError is an error wrapping multiple validation errors returned by RegisterRequest_Auth.ValidateAll() if the designated constraints aren't met.

func (RegisterRequest_AuthMultiError) AllErrors

func (m RegisterRequest_AuthMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RegisterRequest_AuthMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RegisterRequest_AuthValidationError

type RegisterRequest_AuthValidationError struct {
	// contains filtered or unexported fields
}

RegisterRequest_AuthValidationError is the validation error returned by RegisterRequest_Auth.Validate if the designated constraints aren't met.

func (RegisterRequest_AuthValidationError) Cause

Cause function returns cause value.

func (RegisterRequest_AuthValidationError) Error

Error satisfies the builtin error interface

func (RegisterRequest_AuthValidationError) ErrorName

ErrorName returns error name.

func (RegisterRequest_AuthValidationError) Field

Field function returns field value.

func (RegisterRequest_AuthValidationError) Key

Key function returns key value.

func (RegisterRequest_AuthValidationError) Reason

Reason function returns reason value.

type RegisterResponse

type RegisterResponse struct {
	Code    int32      `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string     `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Result  *anypb.Any `protobuf:"bytes,3,opt,name=result,proto3,oneof" json:"result,omitempty"`
	Type    string     `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

回应 - 注册

func (*RegisterResponse) Descriptor deprecated

func (*RegisterResponse) Descriptor() ([]byte, []int)

Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.

func (*RegisterResponse) GetCode

func (x *RegisterResponse) GetCode() int32

func (*RegisterResponse) GetMessage

func (x *RegisterResponse) GetMessage() string

func (*RegisterResponse) GetResult

func (x *RegisterResponse) GetResult() *anypb.Any

func (*RegisterResponse) GetType

func (x *RegisterResponse) GetType() string

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) ProtoReflect

func (x *RegisterResponse) ProtoReflect() protoreflect.Message

func (*RegisterResponse) Reset

func (x *RegisterResponse) Reset()

func (*RegisterResponse) String

func (x *RegisterResponse) String() string

func (*RegisterResponse) Validate

func (m *RegisterResponse) Validate() error

Validate checks the field values on RegisterResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RegisterResponse) ValidateAll

func (m *RegisterResponse) ValidateAll() error

ValidateAll checks the field values on RegisterResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RegisterResponseMultiError, or nil if none found.

type RegisterResponseMultiError

type RegisterResponseMultiError []error

RegisterResponseMultiError is an error wrapping multiple validation errors returned by RegisterResponse.ValidateAll() if the designated constraints aren't met.

func (RegisterResponseMultiError) AllErrors

func (m RegisterResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RegisterResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RegisterResponseValidationError

type RegisterResponseValidationError struct {
	// contains filtered or unexported fields
}

RegisterResponseValidationError is the validation error returned by RegisterResponse.Validate if the designated constraints aren't met.

func (RegisterResponseValidationError) Cause

Cause function returns cause value.

func (RegisterResponseValidationError) Error

Error satisfies the builtin error interface

func (RegisterResponseValidationError) ErrorName

ErrorName returns error name.

func (RegisterResponseValidationError) Field

Field function returns field value.

func (RegisterResponseValidationError) Key

Key function returns key value.

func (RegisterResponseValidationError) Reason

Reason function returns reason value.

type RoleServiceClient

type RoleServiceClient interface {
	// 获取角色列表
	ListRole(ctx context.Context, in *pagination.PagingRequest, opts ...grpc.CallOption) (*v1.ListRoleResponse, error)
	// 获取角色数据
	GetRole(ctx context.Context, in *v1.GetRoleRequest, opts ...grpc.CallOption) (*v1.Role, error)
	// 创建角色
	CreateRole(ctx context.Context, in *v1.CreateRoleRequest, opts ...grpc.CallOption) (*v1.CreateRoleResponse, error)
	// 更新角色
	UpdateRole(ctx context.Context, in *v1.UpdateRoleRequest, opts ...grpc.CallOption) (*v1.UpdateRoleResponse, error)
	// 删除角色
	DeleteRole(ctx context.Context, in *v1.DeleteRoleRequest, opts ...grpc.CallOption) (*v1.DeleteRoleResponse, error)
}

RoleServiceClient is the client API for RoleService 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 RoleServiceHTTPClient

type RoleServiceHTTPClient interface {
	CreateRole(ctx context.Context, req *v1.CreateRoleRequest, opts ...http.CallOption) (rsp *v1.CreateRoleResponse, err error)
	DeleteRole(ctx context.Context, req *v1.DeleteRoleRequest, opts ...http.CallOption) (rsp *v1.DeleteRoleResponse, err error)
	GetRole(ctx context.Context, req *v1.GetRoleRequest, opts ...http.CallOption) (rsp *v1.Role, err error)
	ListRole(ctx context.Context, req *pagination.PagingRequest, opts ...http.CallOption) (rsp *v1.ListRoleResponse, err error)
	UpdateRole(ctx context.Context, req *v1.UpdateRoleRequest, opts ...http.CallOption) (rsp *v1.UpdateRoleResponse, err error)
}

func NewRoleServiceHTTPClient

func NewRoleServiceHTTPClient(client *http.Client) RoleServiceHTTPClient

type RoleServiceHTTPClientImpl

type RoleServiceHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*RoleServiceHTTPClientImpl) CreateRole

func (*RoleServiceHTTPClientImpl) DeleteRole

func (*RoleServiceHTTPClientImpl) GetRole

func (*RoleServiceHTTPClientImpl) ListRole

func (*RoleServiceHTTPClientImpl) UpdateRole

type RoleServiceHTTPServer

type RoleServiceHTTPServer interface {
	// CreateRole 创建角色
	CreateRole(context.Context, *v1.CreateRoleRequest) (*v1.CreateRoleResponse, error)
	// DeleteRole 删除角色
	DeleteRole(context.Context, *v1.DeleteRoleRequest) (*v1.DeleteRoleResponse, error)
	// GetRole 获取角色数据
	GetRole(context.Context, *v1.GetRoleRequest) (*v1.Role, error)
	// ListRole 获取角色列表
	ListRole(context.Context, *pagination.PagingRequest) (*v1.ListRoleResponse, error)
	// UpdateRole 更新角色
	UpdateRole(context.Context, *v1.UpdateRoleRequest) (*v1.UpdateRoleResponse, error)
}

type RoleServiceServer

type RoleServiceServer interface {
	// 获取角色列表
	ListRole(context.Context, *pagination.PagingRequest) (*v1.ListRoleResponse, error)
	// 获取角色数据
	GetRole(context.Context, *v1.GetRoleRequest) (*v1.Role, error)
	// 创建角色
	CreateRole(context.Context, *v1.CreateRoleRequest) (*v1.CreateRoleResponse, error)
	// 更新角色
	UpdateRole(context.Context, *v1.UpdateRoleRequest) (*v1.UpdateRoleResponse, error)
	// 删除角色
	DeleteRole(context.Context, *v1.DeleteRoleRequest) (*v1.DeleteRoleResponse, error)
	// contains filtered or unexported methods
}

RoleServiceServer is the server API for RoleService service. All implementations must embed UnimplementedRoleServiceServer for forward compatibility

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServiceServer) Login

func (UnimplementedAuthServiceServer) Logout

func (UnimplementedAuthServiceServer) Register

type UnimplementedDeptServiceServer

type UnimplementedDeptServiceServer struct {
}

UnimplementedDeptServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDeptServiceServer) CreateDept

func (UnimplementedDeptServiceServer) DeleteDept

func (UnimplementedDeptServiceServer) GetDept

func (UnimplementedDeptServiceServer) ListDept

func (UnimplementedDeptServiceServer) UpdateDept

type UnimplementedMenuServiceServer

type UnimplementedMenuServiceServer struct {
}

UnimplementedMenuServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMenuServiceServer) CreateMenu

func (UnimplementedMenuServiceServer) DeleteMenu

func (UnimplementedMenuServiceServer) GetMenu

func (UnimplementedMenuServiceServer) ListMenu

func (UnimplementedMenuServiceServer) UpdateMenu

type UnimplementedPostServiceServer

type UnimplementedPostServiceServer struct {
}

UnimplementedPostServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPostServiceServer) CreatePost

func (UnimplementedPostServiceServer) DeletePost

func (UnimplementedPostServiceServer) GetPost

func (UnimplementedPostServiceServer) ListPost

func (UnimplementedPostServiceServer) UpdatePost

type UnimplementedRoleServiceServer

type UnimplementedRoleServiceServer struct {
}

UnimplementedRoleServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedRoleServiceServer) CreateRole

func (UnimplementedRoleServiceServer) DeleteRole

func (UnimplementedRoleServiceServer) GetRole

func (UnimplementedRoleServiceServer) ListRole

func (UnimplementedRoleServiceServer) UpdateRole

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) CreateUser

func (UnimplementedUserServiceServer) DeleteUser

func (UnimplementedUserServiceServer) GetUser

func (UnimplementedUserServiceServer) ListUser

func (UnimplementedUserServiceServer) UpdateUser

type UnsafeAuthServiceServer

type UnsafeAuthServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServiceServer will result in compilation errors.

type UnsafeDeptServiceServer

type UnsafeDeptServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDeptServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DeptServiceServer will result in compilation errors.

type UnsafeMenuServiceServer

type UnsafeMenuServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeMenuServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MenuServiceServer will result in compilation errors.

type UnsafePostServiceServer

type UnsafePostServiceServer interface {
	// contains filtered or unexported methods
}

UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PostServiceServer will result in compilation errors.

type UnsafeRoleServiceServer

type UnsafeRoleServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeRoleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RoleServiceServer will result in compilation errors.

type UnsafeUserServiceServer

type UnsafeUserServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.

type UserServiceClient

type UserServiceClient interface {
	// 获取用户列表
	ListUser(ctx context.Context, in *pagination.PagingRequest, opts ...grpc.CallOption) (*v1.ListUserResponse, error)
	// 获取用户数据
	GetUser(ctx context.Context, in *v1.GetUserRequest, opts ...grpc.CallOption) (*v1.User, error)
	// 创建用户
	CreateUser(ctx context.Context, in *v1.CreateUserRequest, opts ...grpc.CallOption) (*v1.CreateUserResponse, error)
	// 更新用户
	UpdateUser(ctx context.Context, in *v1.UpdateUserRequest, opts ...grpc.CallOption) (*v1.UpdateUserResponse, error)
	// 删除用户
	DeleteUser(ctx context.Context, in *v1.DeleteUserRequest, opts ...grpc.CallOption) (*v1.DeleteUserResponse, error)
}

UserServiceClient is the client API for UserService 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 UserServiceHTTPClient

type UserServiceHTTPClient interface {
	CreateUser(ctx context.Context, req *v1.CreateUserRequest, opts ...http.CallOption) (rsp *v1.CreateUserResponse, err error)
	DeleteUser(ctx context.Context, req *v1.DeleteUserRequest, opts ...http.CallOption) (rsp *v1.DeleteUserResponse, err error)
	GetUser(ctx context.Context, req *v1.GetUserRequest, opts ...http.CallOption) (rsp *v1.User, err error)
	ListUser(ctx context.Context, req *pagination.PagingRequest, opts ...http.CallOption) (rsp *v1.ListUserResponse, err error)
	UpdateUser(ctx context.Context, req *v1.UpdateUserRequest, opts ...http.CallOption) (rsp *v1.UpdateUserResponse, err error)
}

func NewUserServiceHTTPClient

func NewUserServiceHTTPClient(client *http.Client) UserServiceHTTPClient

type UserServiceHTTPClientImpl

type UserServiceHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*UserServiceHTTPClientImpl) CreateUser

func (*UserServiceHTTPClientImpl) DeleteUser

func (*UserServiceHTTPClientImpl) GetUser

func (*UserServiceHTTPClientImpl) ListUser

func (*UserServiceHTTPClientImpl) UpdateUser

type UserServiceHTTPServer

type UserServiceHTTPServer interface {
	// CreateUser 创建用户
	CreateUser(context.Context, *v1.CreateUserRequest) (*v1.CreateUserResponse, error)
	// DeleteUser 删除用户
	DeleteUser(context.Context, *v1.DeleteUserRequest) (*v1.DeleteUserResponse, error)
	// GetUser 获取用户数据
	GetUser(context.Context, *v1.GetUserRequest) (*v1.User, error)
	// ListUser 获取用户列表
	ListUser(context.Context, *pagination.PagingRequest) (*v1.ListUserResponse, error)
	// UpdateUser 更新用户
	UpdateUser(context.Context, *v1.UpdateUserRequest) (*v1.UpdateUserResponse, error)
}

type UserServiceServer

type UserServiceServer interface {
	// 获取用户列表
	ListUser(context.Context, *pagination.PagingRequest) (*v1.ListUserResponse, error)
	// 获取用户数据
	GetUser(context.Context, *v1.GetUserRequest) (*v1.User, error)
	// 创建用户
	CreateUser(context.Context, *v1.CreateUserRequest) (*v1.CreateUserResponse, error)
	// 更新用户
	UpdateUser(context.Context, *v1.UpdateUserRequest) (*v1.UpdateUserResponse, error)
	// 删除用户
	DeleteUser(context.Context, *v1.DeleteUserRequest) (*v1.DeleteUserResponse, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL