13 Star 33 Fork 26

go-course / go11

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model.pb.go 9.09 KB
一键复制 编辑 原始数据 按行查看 历史
Mr.Yu 提交于 2023-08-05 16:58 . 补充分布式鉴权
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.21.12
// source: mcenter/apps/token/pb/model.proto
package token
import (
role "gitee.com/go-course/go11/devcloud-mini/mcenter/apps/role"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
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)
)
type Token struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 访问令牌
// @gotags: json:"access_token" bson:"access_token"
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token" bson:"access_token"`
// 刷新Token
// @gotags: json:"refresh_token" bson:"refresh_token"
RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token" bson:"refresh_token"`
// 令牌颁发时间
// @gotags: json:"issue_at" bson:"issue_at"
IssueAt int64 `protobuf:"varint,3,opt,name=issue_at,json=issueAt,proto3" json:"issue_at" bson:"issue_at"`
// 多少秒后过期
// @gotags: json:"access_token_expired_second" bson:"access_token_expired_second"
AccessTokenExpiredSecond int64 `protobuf:"varint,4,opt,name=access_token_expired_second,json=accessTokenExpiredSecond,proto3" json:"access_token_expired_second" bson:"access_token_expired_second"`
// 多少秒后过期
// @gotags: json:"refresh_token_expired_second" bson:"refresh_token_expired_second"
RefreshTokenExpiredSecond int64 `protobuf:"varint,6,opt,name=refresh_token_expired_second,json=refreshTokenExpiredSecond,proto3" json:"refresh_token_expired_second" bson:"refresh_token_expired_second"`
// 颁发的用户
// @gotags: json:"username" bson:"username"
Username string `protobuf:"bytes,5,opt,name=username,proto3" json:"username" bson:"username"`
// 用户的角色
// @gotags: json:"roles" bson:"roles"
Roles *role.RoleSet `protobuf:"bytes,7,opt,name=roles,proto3" json:"roles" bson:"roles"`
}
func (x *Token) Reset() {
*x = Token{}
if protoimpl.UnsafeEnabled {
mi := &file_mcenter_apps_token_pb_model_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Token) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Token) ProtoMessage() {}
func (x *Token) ProtoReflect() protoreflect.Message {
mi := &file_mcenter_apps_token_pb_model_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Token.ProtoReflect.Descriptor instead.
func (*Token) Descriptor() ([]byte, []int) {
return file_mcenter_apps_token_pb_model_proto_rawDescGZIP(), []int{0}
}
func (x *Token) GetAccessToken() string {
if x != nil {
return x.AccessToken
}
return ""
}
func (x *Token) GetRefreshToken() string {
if x != nil {
return x.RefreshToken
}
return ""
}
func (x *Token) GetIssueAt() int64 {
if x != nil {
return x.IssueAt
}
return 0
}
func (x *Token) GetAccessTokenExpiredSecond() int64 {
if x != nil {
return x.AccessTokenExpiredSecond
}
return 0
}
func (x *Token) GetRefreshTokenExpiredSecond() int64 {
if x != nil {
return x.RefreshTokenExpiredSecond
}
return 0
}
func (x *Token) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
func (x *Token) GetRoles() *role.RoleSet {
if x != nil {
return x.Roles
}
return nil
}
var File_mcenter_apps_token_pb_model_proto protoreflect.FileDescriptor
var file_mcenter_apps_token_pb_model_proto_rawDesc = []byte{
0x0a, 0x21, 0x6d, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x74,
0x6f, 0x6b, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x18, 0x67, 0x6f, 0x31, 0x31, 0x2e, 0x64, 0x65, 0x76, 0x63, 0x6c, 0x6f,
0x75, 0x64, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x20, 0x6d,
0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x72, 0x6f, 0x6c, 0x65,
0x2f, 0x70, 0x62, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0xbe, 0x02, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63,
0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d,
0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x03, 0x52, 0x07, 0x69, 0x73, 0x73, 0x75, 0x65, 0x41, 0x74, 0x12, 0x3d, 0x0a, 0x1b,
0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x70,
0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
0x03, 0x52, 0x18, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78,
0x70, 0x69, 0x72, 0x65, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x12, 0x3f, 0x0a, 0x1c, 0x72,
0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x70,
0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
0x03, 0x52, 0x19, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x45,
0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x08,
0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65,
0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x31, 0x31, 0x2e, 0x64,
0x65, 0x76, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x2e, 0x72, 0x6f, 0x6c,
0x65, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73,
0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x65, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f,
0x2d, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x2f, 0x67, 0x6f, 0x31, 0x31, 0x2f, 0x64, 0x65, 0x76,
0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x6d, 0x69, 0x6e, 0x69, 0x2f, 0x6d, 0x63, 0x65, 0x6e, 0x74,
0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_mcenter_apps_token_pb_model_proto_rawDescOnce sync.Once
file_mcenter_apps_token_pb_model_proto_rawDescData = file_mcenter_apps_token_pb_model_proto_rawDesc
)
func file_mcenter_apps_token_pb_model_proto_rawDescGZIP() []byte {
file_mcenter_apps_token_pb_model_proto_rawDescOnce.Do(func() {
file_mcenter_apps_token_pb_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_mcenter_apps_token_pb_model_proto_rawDescData)
})
return file_mcenter_apps_token_pb_model_proto_rawDescData
}
var file_mcenter_apps_token_pb_model_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_mcenter_apps_token_pb_model_proto_goTypes = []interface{}{
(*Token)(nil), // 0: go11.devcloud_mini.token.Token
(*role.RoleSet)(nil), // 1: go11.devcloud_mini.role.RoleSet
}
var file_mcenter_apps_token_pb_model_proto_depIdxs = []int32{
1, // 0: go11.devcloud_mini.token.Token.roles:type_name -> go11.devcloud_mini.role.RoleSet
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_mcenter_apps_token_pb_model_proto_init() }
func file_mcenter_apps_token_pb_model_proto_init() {
if File_mcenter_apps_token_pb_model_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_mcenter_apps_token_pb_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Token); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_mcenter_apps_token_pb_model_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_mcenter_apps_token_pb_model_proto_goTypes,
DependencyIndexes: file_mcenter_apps_token_pb_model_proto_depIdxs,
MessageInfos: file_mcenter_apps_token_pb_model_proto_msgTypes,
}.Build()
File_mcenter_apps_token_pb_model_proto = out.File
file_mcenter_apps_token_pb_model_proto_rawDesc = nil
file_mcenter_apps_token_pb_model_proto_goTypes = nil
file_mcenter_apps_token_pb_model_proto_depIdxs = nil
}
Go
1
https://gitee.com/go-course/go11.git
git@gitee.com:go-course/go11.git
go-course
go11
go11
f4276bbab689

搜索帮助