proto-all/pkg/permission/permission.pb.go

1128 lines
43 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
2025-03-02 13:45:50 +00:00
// protoc-gen-go v1.36.1
// protoc v3.19.4
2024-08-25 14:03:49 +00:00
// source: generate/protobuf/permission.proto
package permission
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
2024-08-25 14:16:51 +00:00
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)
)
// OKResp
type OKResp struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
2025-03-02 13:45:50 +00:00
sizeCache protoimpl.SizeCache
}
func (x *OKResp) Reset() {
*x = OKResp{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *OKResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OKResp) ProtoMessage() {}
func (x *OKResp) ProtoReflect() protoreflect.Message {
2024-08-25 14:16:51 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[0]
2025-03-02 13:45:50 +00:00
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 OKResp.ProtoReflect.Descriptor instead.
func (*OKResp) Descriptor() ([]byte, []int) {
2024-08-25 14:16:51 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{0}
}
// NoneReq
type NoneReq struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
2025-03-02 13:45:50 +00:00
sizeCache protoimpl.SizeCache
}
func (x *NoneReq) Reset() {
*x = NoneReq{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NoneReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NoneReq) ProtoMessage() {}
func (x *NoneReq) ProtoReflect() protoreflect.Message {
2024-08-25 14:16:51 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[1]
2025-03-02 13:45:50 +00:00
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 NoneReq.ProtoReflect.Descriptor instead.
func (*NoneReq) Descriptor() ([]byte, []int) {
2024-08-25 14:16:51 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{1}
}
// AuthorizationReq 定義授權請求的結構
type AuthorizationReq struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
// grant_type 表示授權類型
GrantType string `protobuf:"bytes,1,opt,name=grant_type,json=grantType,proto3" json:"grant_type,omitempty"`
// device_id 表示設備 ID
DeviceId string `protobuf:"bytes,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
// scope 表示授權範圍
Scope string `protobuf:"bytes,3,opt,name=scope,proto3" json:"scope,omitempty"`
2025-03-02 13:45:50 +00:00
// 角色
Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"`
// data 是一個通用的 key-value 結構,用於存儲額外數據
2025-03-02 13:45:50 +00:00
Data map[string]string `protobuf:"bytes,5,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// is_refresh_token 表示是否為刷新令牌
IsRefreshToken bool `protobuf:"varint,6,opt,name=is_refresh_token,json=isRefreshToken,proto3" json:"is_refresh_token,omitempty"`
2025-03-02 13:45:50 +00:00
// 發送token 的 uid
Uid string `protobuf:"bytes,7,opt,name=uid,proto3" json:"uid,omitempty"`
// 發送token 的 account
Account string `protobuf:"bytes,8,opt,name=account,proto3" json:"account,omitempty"`
// expires 表示過期時間(unixnamo utc 時間)
Expires *int64 `protobuf:"varint,9,opt,name=expires,proto3,oneof" json:"expires,omitempty"`
// expires 表示過期時間(unixnamo utc 時間)
RefreshExpire *int64 `protobuf:"varint,10,opt,name=refreshExpire,proto3,oneof" json:"refreshExpire,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AuthorizationReq) Reset() {
*x = AuthorizationReq{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AuthorizationReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AuthorizationReq) ProtoMessage() {}
func (x *AuthorizationReq) ProtoReflect() protoreflect.Message {
2024-08-25 14:16:51 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[2]
2025-03-02 13:45:50 +00:00
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 AuthorizationReq.ProtoReflect.Descriptor instead.
func (*AuthorizationReq) Descriptor() ([]byte, []int) {
2024-08-25 14:16:51 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{2}
}
func (x *AuthorizationReq) GetGrantType() string {
if x != nil {
return x.GrantType
}
return ""
}
func (x *AuthorizationReq) GetDeviceId() string {
if x != nil {
return x.DeviceId
}
return ""
}
func (x *AuthorizationReq) GetScope() string {
if x != nil {
return x.Scope
}
return ""
}
2025-03-02 13:45:50 +00:00
func (x *AuthorizationReq) GetRole() string {
if x != nil {
2025-03-02 13:45:50 +00:00
return x.Role
}
2025-03-02 13:45:50 +00:00
return ""
}
2025-03-02 13:45:50 +00:00
func (x *AuthorizationReq) GetData() map[string]string {
if x != nil {
2025-03-02 13:45:50 +00:00
return x.Data
}
2025-03-02 13:45:50 +00:00
return nil
}
func (x *AuthorizationReq) GetIsRefreshToken() bool {
if x != nil {
return x.IsRefreshToken
}
return false
}
2025-03-02 13:45:50 +00:00
func (x *AuthorizationReq) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *AuthorizationReq) GetAccount() string {
if x != nil {
return x.Account
}
return ""
}
func (x *AuthorizationReq) GetExpires() int64 {
if x != nil && x.Expires != nil {
return *x.Expires
}
return 0
}
func (x *AuthorizationReq) GetRefreshExpire() int64 {
if x != nil && x.RefreshExpire != nil {
return *x.RefreshExpire
}
return 0
}
// TokenResp 定義訪問令牌響應的結構
type TokenResp struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
// access_token 表示訪問令牌
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
// token_type 表示令牌類型
TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"`
// expires_in 表示令牌過期時間
2025-03-02 13:45:50 +00:00
ExpiresIn int64 `protobuf:"varint,3,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"`
// refresh_token 表示刷新令牌
2025-03-02 13:45:50 +00:00
RefreshToken string `protobuf:"bytes,4,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TokenResp) Reset() {
*x = TokenResp{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TokenResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TokenResp) ProtoMessage() {}
func (x *TokenResp) ProtoReflect() protoreflect.Message {
2024-08-25 14:16:51 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[3]
2025-03-02 13:45:50 +00:00
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 TokenResp.ProtoReflect.Descriptor instead.
func (*TokenResp) Descriptor() ([]byte, []int) {
2024-08-25 14:16:51 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{3}
}
func (x *TokenResp) GetAccessToken() string {
if x != nil {
return x.AccessToken
}
return ""
}
func (x *TokenResp) GetTokenType() string {
if x != nil {
return x.TokenType
}
return ""
}
2025-03-02 13:45:50 +00:00
func (x *TokenResp) GetExpiresIn() int64 {
if x != nil {
return x.ExpiresIn
}
return 0
}
func (x *TokenResp) GetRefreshToken() string {
if x != nil {
return x.RefreshToken
}
return ""
}
// RefreshTokenReq 更新 Token
type RefreshTokenReq struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // refresh token
Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"`
Expires int64 `protobuf:"varint,3,opt,name=expires,proto3" json:"expires,omitempty"`
DeviceId string `protobuf:"bytes,4,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
unknownFields protoimpl.UnknownFields
2025-03-02 13:45:50 +00:00
sizeCache protoimpl.SizeCache
}
func (x *RefreshTokenReq) Reset() {
*x = RefreshTokenReq{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *RefreshTokenReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RefreshTokenReq) ProtoMessage() {}
func (x *RefreshTokenReq) ProtoReflect() protoreflect.Message {
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_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 RefreshTokenReq.ProtoReflect.Descriptor instead.
func (*RefreshTokenReq) Descriptor() ([]byte, []int) {
2025-03-02 13:45:50 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{4}
}
func (x *RefreshTokenReq) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
func (x *RefreshTokenReq) GetScope() string {
if x != nil {
return x.Scope
}
return ""
}
func (x *RefreshTokenReq) GetExpires() int64 {
if x != nil {
return x.Expires
}
return 0
}
func (x *RefreshTokenReq) GetDeviceId() string {
if x != nil {
return x.DeviceId
}
return ""
}
// https://datatracker.ietf.org/doc/html/rfc6749#section-4.3.3
type RefreshTokenResp struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
OneTimeToken string `protobuf:"bytes,2,opt,name=one_time_token,json=oneTimeToken,proto3" json:"one_time_token,omitempty"`
ExpiresIn int64 `protobuf:"varint,3,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"`
TokenType string `protobuf:"bytes,4,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"`
unknownFields protoimpl.UnknownFields
2025-03-02 13:45:50 +00:00
sizeCache protoimpl.SizeCache
}
func (x *RefreshTokenResp) Reset() {
*x = RefreshTokenResp{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *RefreshTokenResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RefreshTokenResp) ProtoMessage() {}
func (x *RefreshTokenResp) ProtoReflect() protoreflect.Message {
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_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 RefreshTokenResp.ProtoReflect.Descriptor instead.
func (*RefreshTokenResp) Descriptor() ([]byte, []int) {
2025-03-02 13:45:50 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{5}
}
func (x *RefreshTokenResp) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
func (x *RefreshTokenResp) GetOneTimeToken() string {
if x != nil {
return x.OneTimeToken
}
return ""
}
func (x *RefreshTokenResp) GetExpiresIn() int64 {
if x != nil {
return x.ExpiresIn
}
return 0
}
func (x *RefreshTokenResp) GetTokenType() string {
if x != nil {
return x.TokenType
}
return ""
}
// CancelTokenReq 註銷這個 Token
type CancelTokenReq struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
unknownFields protoimpl.UnknownFields
2025-03-02 13:45:50 +00:00
sizeCache protoimpl.SizeCache
}
func (x *CancelTokenReq) Reset() {
*x = CancelTokenReq{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CancelTokenReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CancelTokenReq) ProtoMessage() {}
func (x *CancelTokenReq) ProtoReflect() protoreflect.Message {
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_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 CancelTokenReq.ProtoReflect.Descriptor instead.
func (*CancelTokenReq) Descriptor() ([]byte, []int) {
2025-03-02 13:45:50 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{6}
}
func (x *CancelTokenReq) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
// CancelTokenReq 註銷這個 Token
type DoTokenByUIDReq struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
unknownFields protoimpl.UnknownFields
2025-03-02 13:45:50 +00:00
sizeCache protoimpl.SizeCache
}
func (x *DoTokenByUIDReq) Reset() {
*x = DoTokenByUIDReq{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DoTokenByUIDReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DoTokenByUIDReq) ProtoMessage() {}
func (x *DoTokenByUIDReq) ProtoReflect() protoreflect.Message {
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_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 DoTokenByUIDReq.ProtoReflect.Descriptor instead.
func (*DoTokenByUIDReq) Descriptor() ([]byte, []int) {
2025-03-02 13:45:50 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{7}
}
func (x *DoTokenByUIDReq) GetIds() []string {
if x != nil {
return x.Ids
}
return nil
}
func (x *DoTokenByUIDReq) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
// QueryTokenByUIDReq 拿這個UID 找 Token
type QueryTokenByUIDReq struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
unknownFields protoimpl.UnknownFields
2025-03-02 13:45:50 +00:00
sizeCache protoimpl.SizeCache
}
func (x *QueryTokenByUIDReq) Reset() {
*x = QueryTokenByUIDReq{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *QueryTokenByUIDReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryTokenByUIDReq) ProtoMessage() {}
func (x *QueryTokenByUIDReq) ProtoReflect() protoreflect.Message {
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_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 QueryTokenByUIDReq.ProtoReflect.Descriptor instead.
func (*QueryTokenByUIDReq) Descriptor() ([]byte, []int) {
2025-03-02 13:45:50 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{8}
}
func (x *QueryTokenByUIDReq) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
// ValidationTokenReq 驗證這個 Token
type ValidationTokenReq struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
unknownFields protoimpl.UnknownFields
2025-03-02 13:45:50 +00:00
sizeCache protoimpl.SizeCache
}
func (x *ValidationTokenReq) Reset() {
*x = ValidationTokenReq{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ValidationTokenReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ValidationTokenReq) ProtoMessage() {}
func (x *ValidationTokenReq) ProtoReflect() protoreflect.Message {
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_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 ValidationTokenReq.ProtoReflect.Descriptor instead.
func (*ValidationTokenReq) Descriptor() ([]byte, []int) {
2025-03-02 13:45:50 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{9}
}
func (x *ValidationTokenReq) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
// ValidationTokenResp 驗證以及取得 Token 詳情
type ValidationTokenResp struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
Data map[string]string `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
2025-03-02 13:45:50 +00:00
sizeCache protoimpl.SizeCache
}
func (x *ValidationTokenResp) Reset() {
*x = ValidationTokenResp{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ValidationTokenResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ValidationTokenResp) ProtoMessage() {}
func (x *ValidationTokenResp) ProtoReflect() protoreflect.Message {
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_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 ValidationTokenResp.ProtoReflect.Descriptor instead.
func (*ValidationTokenResp) Descriptor() ([]byte, []int) {
2025-03-02 13:45:50 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{10}
}
func (x *ValidationTokenResp) GetToken() *Token {
if x != nil {
return x.Token
}
return nil
}
func (x *ValidationTokenResp) GetData() map[string]string {
if x != nil {
return x.Data
}
return nil
}
// Token 定義令牌的結構
type Token struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
// ID 表示令牌的唯一標識符
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// client_id 表示客戶端 ID
2025-03-02 13:45:50 +00:00
ClientId int64 `protobuf:"varint,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
// uid 表示用戶 ID
Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"`
// device_id 表示設備 ID
DeviceId string `protobuf:"bytes,4,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
// access_token 表示訪問令牌
AccessToken string `protobuf:"bytes,5,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
// expires_in 表示訪問令牌的過期時間(秒)
2025-03-02 13:45:50 +00:00
ExpiresIn int64 `protobuf:"varint,6,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"`
// access_create_at 表示訪問令牌的創建時間
AccessCreateAt int64 `protobuf:"varint,7,opt,name=access_create_at,json=accessCreateAt,proto3" json:"access_create_at,omitempty"`
// refresh_token 表示刷新令牌
RefreshToken string `protobuf:"bytes,8,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
// refresh_expires_in 表示刷新令牌的過期時間(秒)
2025-03-02 13:45:50 +00:00
RefreshExpiresIn int64 `protobuf:"varint,9,opt,name=refresh_expires_in,json=refreshExpiresIn,proto3" json:"refresh_expires_in,omitempty"`
// refresh_create_at 表示刷新令牌的創建時間
RefreshCreateAt int64 `protobuf:"varint,10,opt,name=refresh_create_at,json=refreshCreateAt,proto3" json:"refresh_create_at,omitempty"`
2025-03-02 13:45:50 +00:00
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Token) Reset() {
*x = Token{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[11]
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 {
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[11]
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 Token.ProtoReflect.Descriptor instead.
func (*Token) Descriptor() ([]byte, []int) {
2025-03-02 13:45:50 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{11}
}
func (x *Token) GetId() string {
if x != nil {
return x.Id
}
return ""
}
2025-03-02 13:45:50 +00:00
func (x *Token) GetClientId() int64 {
if x != nil {
return x.ClientId
}
return 0
}
func (x *Token) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *Token) GetDeviceId() string {
if x != nil {
return x.DeviceId
}
return ""
}
func (x *Token) GetAccessToken() string {
if x != nil {
return x.AccessToken
}
return ""
}
2025-03-02 13:45:50 +00:00
func (x *Token) GetExpiresIn() int64 {
if x != nil {
return x.ExpiresIn
}
return 0
}
func (x *Token) GetAccessCreateAt() int64 {
if x != nil {
return x.AccessCreateAt
}
return 0
}
func (x *Token) GetRefreshToken() string {
if x != nil {
return x.RefreshToken
}
return ""
}
2025-03-02 13:45:50 +00:00
func (x *Token) GetRefreshExpiresIn() int64 {
if x != nil {
return x.RefreshExpiresIn
}
return 0
}
func (x *Token) GetRefreshCreateAt() int64 {
if x != nil {
return x.RefreshCreateAt
}
return 0
}
// DoTokenByDeviceIDReq 用DeviceID 來做事的
type DoTokenByDeviceIDReq struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
unknownFields protoimpl.UnknownFields
2025-03-02 13:45:50 +00:00
sizeCache protoimpl.SizeCache
}
func (x *DoTokenByDeviceIDReq) Reset() {
*x = DoTokenByDeviceIDReq{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DoTokenByDeviceIDReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DoTokenByDeviceIDReq) ProtoMessage() {}
func (x *DoTokenByDeviceIDReq) ProtoReflect() protoreflect.Message {
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[12]
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 DoTokenByDeviceIDReq.ProtoReflect.Descriptor instead.
func (*DoTokenByDeviceIDReq) Descriptor() ([]byte, []int) {
2025-03-02 13:45:50 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{12}
}
func (x *DoTokenByDeviceIDReq) GetDeviceId() string {
if x != nil {
return x.DeviceId
}
return ""
}
type Tokens struct {
2025-03-02 13:45:50 +00:00
state protoimpl.MessageState `protogen:"open.v1"`
Token []*TokenResp `protobuf:"bytes,1,rep,name=token,proto3" json:"token,omitempty"`
unknownFields protoimpl.UnknownFields
2025-03-02 13:45:50 +00:00
sizeCache protoimpl.SizeCache
}
func (x *Tokens) Reset() {
*x = Tokens{}
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Tokens) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Tokens) ProtoMessage() {}
func (x *Tokens) ProtoReflect() protoreflect.Message {
2025-03-02 13:45:50 +00:00
mi := &file_generate_protobuf_permission_proto_msgTypes[13]
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 Tokens.ProtoReflect.Descriptor instead.
func (*Tokens) Descriptor() ([]byte, []int) {
2025-03-02 13:45:50 +00:00
return file_generate_protobuf_permission_proto_rawDescGZIP(), []int{13}
}
func (x *Tokens) GetToken() []*TokenResp {
if x != nil {
return x.Token
}
return nil
}
2024-08-25 14:16:51 +00:00
var File_generate_protobuf_permission_proto protoreflect.FileDescriptor
var file_generate_protobuf_permission_proto_rawDesc = []byte{
0x0a, 0x22, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x22, 0x08, 0x0a, 0x06, 0x4f, 0x4b, 0x52, 0x65, 0x73, 0x70, 0x22, 0x09, 0x0a, 0x07, 0x4e, 0x6f,
2025-03-02 13:45:50 +00:00
0x6e, 0x65, 0x52, 0x65, 0x71, 0x22, 0xab, 0x03, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
2024-08-25 14:16:51 +00:00
0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72,
0x61, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x67, 0x72, 0x61, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76,
0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65,
0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18,
2025-03-02 13:45:50 +00:00
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65,
0x12, 0x3a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26,
0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x75, 0x74, 0x68,
0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x2e, 0x44, 0x61, 0x74,
0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x10,
0x69, 0x73, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73,
0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x07, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x09, 0x20,
0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x88, 0x01,
0x01, 0x12, 0x29, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x45, 0x78, 0x70, 0x69,
0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x66, 0x72,
0x65, 0x73, 0x68, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x37, 0x0a, 0x09,
2024-08-25 14:16:51 +00:00
0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
2025-03-02 13:45:50 +00:00
0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65,
0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x45, 0x78, 0x70,
0x69, 0x72, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73,
0x70, 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, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79,
0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54,
0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69,
0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73,
0x49, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f,
0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65,
0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x74, 0x0a, 0x0f, 0x52, 0x65, 0x66, 0x72, 0x65,
0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f,
2024-08-25 14:16:51 +00:00
0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
2025-03-02 13:45:50 +00:00
0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65,
0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73,
0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x8c, 0x01,
0x0a, 0x10, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x6e, 0x65, 0x5f,
0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0c, 0x6f, 0x6e, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d,
0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x49, 0x6e, 0x12, 0x1d, 0x0a,
0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x26, 0x0a, 0x0e,
0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x14,
0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x35, 0x0a, 0x0f, 0x44, 0x6f, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42,
0x79, 0x55, 0x49, 0x44, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x26, 0x0a, 0x12, 0x51,
0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x79, 0x55, 0x49, 0x44, 0x52, 0x65,
0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x75, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x12, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b,
0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22,
0xb6, 0x01, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f,
0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
0x12, 0x3d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29,
0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69,
0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x2e,
0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a,
0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xce, 0x02, 0x0a, 0x05, 0x54, 0x6f, 0x6b,
0x65, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12,
0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69,
0x64, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x21,
0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x18,
0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x49, 0x6e,
0x12, 0x28, 0x0a, 0x10, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x65,
0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65,
0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
0x2c, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72,
0x65, 0x73, 0x5f, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x65, 0x66,
0x72, 0x65, 0x73, 0x68, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x49, 0x6e, 0x12, 0x2a, 0x0a,
0x11, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f,
0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73,
0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x22, 0x33, 0x0a, 0x14, 0x44, 0x6f, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x52, 0x65,
0x71, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x35,
0x0a, 0x06, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65,
0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x05,
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xd8, 0x04, 0x0a, 0x0c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53,
2024-08-25 14:16:51 +00:00
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x4e, 0x65, 0x77, 0x54, 0x6f, 0x6b,
0x65, 0x6e, 0x12, 0x1c, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e,
0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
0x1a, 0x15, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x6f,
0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65,
0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65,
2024-08-25 14:16:51 +00:00
0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0b, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x12, 0x1a, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43,
0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e,
0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x4b, 0x52, 0x65, 0x73,
0x70, 0x12, 0x52, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x2e, 0x44, 0x6f, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x79, 0x55, 0x49, 0x44, 0x52,
0x65, 0x71, 0x1a, 0x12, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e,
0x4f, 0x4b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x15, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c,
2025-03-02 13:45:50 +00:00
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x12,
2024-08-25 14:16:51 +00:00
0x20, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x6f, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x52, 0x65,
0x71, 0x1a, 0x12, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x4f,
0x4b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,
2025-03-02 13:45:50 +00:00
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x42, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44,
2024-08-25 14:16:51 +00:00
0x12, 0x20, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x6f,
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x52,
0x65, 0x71, 0x1a, 0x12, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e,
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,
2025-03-02 13:45:50 +00:00
0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x42, 0x79, 0x55, 0x49, 0x44, 0x12, 0x1e, 0x2e, 0x70,
2024-08-25 14:16:51 +00:00
0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x79, 0x55, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x70,
0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73,
2025-03-02 13:45:50 +00:00
0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
2024-08-25 14:16:51 +00:00
file_generate_protobuf_permission_proto_rawDescOnce sync.Once
file_generate_protobuf_permission_proto_rawDescData = file_generate_protobuf_permission_proto_rawDesc
)
2024-08-25 14:16:51 +00:00
func file_generate_protobuf_permission_proto_rawDescGZIP() []byte {
file_generate_protobuf_permission_proto_rawDescOnce.Do(func() {
file_generate_protobuf_permission_proto_rawDescData = protoimpl.X.CompressGZIP(file_generate_protobuf_permission_proto_rawDescData)
})
2024-08-25 14:16:51 +00:00
return file_generate_protobuf_permission_proto_rawDescData
}
2025-03-02 13:45:50 +00:00
var file_generate_protobuf_permission_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
2024-08-25 14:16:51 +00:00
var file_generate_protobuf_permission_proto_goTypes = []any{
2025-03-02 13:45:50 +00:00
(*OKResp)(nil), // 0: permission.OKResp
(*NoneReq)(nil), // 1: permission.NoneReq
(*AuthorizationReq)(nil), // 2: permission.AuthorizationReq
(*TokenResp)(nil), // 3: permission.TokenResp
(*RefreshTokenReq)(nil), // 4: permission.RefreshTokenReq
(*RefreshTokenResp)(nil), // 5: permission.RefreshTokenResp
(*CancelTokenReq)(nil), // 6: permission.CancelTokenReq
(*DoTokenByUIDReq)(nil), // 7: permission.DoTokenByUIDReq
(*QueryTokenByUIDReq)(nil), // 8: permission.QueryTokenByUIDReq
(*ValidationTokenReq)(nil), // 9: permission.ValidationTokenReq
(*ValidationTokenResp)(nil), // 10: permission.ValidationTokenResp
(*Token)(nil), // 11: permission.Token
(*DoTokenByDeviceIDReq)(nil), // 12: permission.DoTokenByDeviceIDReq
(*Tokens)(nil), // 13: permission.Tokens
nil, // 14: permission.AuthorizationReq.DataEntry
nil, // 15: permission.ValidationTokenResp.DataEntry
}
2024-08-25 14:16:51 +00:00
var file_generate_protobuf_permission_proto_depIdxs = []int32{
2025-03-02 13:45:50 +00:00
14, // 0: permission.AuthorizationReq.data:type_name -> permission.AuthorizationReq.DataEntry
11, // 1: permission.ValidationTokenResp.token:type_name -> permission.Token
15, // 2: permission.ValidationTokenResp.data:type_name -> permission.ValidationTokenResp.DataEntry
3, // 3: permission.Tokens.token:type_name -> permission.TokenResp
2, // 4: permission.TokenService.NewToken:input_type -> permission.AuthorizationReq
2025-03-02 13:45:50 +00:00
4, // 5: permission.TokenService.RefreshToken:input_type -> permission.RefreshTokenReq
6, // 6: permission.TokenService.CancelToken:input_type -> permission.CancelTokenReq
9, // 7: permission.TokenService.ValidationToken:input_type -> permission.ValidationTokenReq
7, // 8: permission.TokenService.CancelTokens:input_type -> permission.DoTokenByUIDReq
12, // 9: permission.TokenService.CancelTokenByDeviceID:input_type -> permission.DoTokenByDeviceIDReq
12, // 10: permission.TokenService.GetUserTokensByDeviceID:input_type -> permission.DoTokenByDeviceIDReq
8, // 11: permission.TokenService.GetUserTokensByUID:input_type -> permission.QueryTokenByUIDReq
3, // 12: permission.TokenService.NewToken:output_type -> permission.TokenResp
5, // 13: permission.TokenService.RefreshToken:output_type -> permission.RefreshTokenResp
0, // 14: permission.TokenService.CancelToken:output_type -> permission.OKResp
10, // 15: permission.TokenService.ValidationToken:output_type -> permission.ValidationTokenResp
0, // 16: permission.TokenService.CancelTokens:output_type -> permission.OKResp
0, // 17: permission.TokenService.CancelTokenByDeviceID:output_type -> permission.OKResp
13, // 18: permission.TokenService.GetUserTokensByDeviceID:output_type -> permission.Tokens
13, // 19: permission.TokenService.GetUserTokensByUID:output_type -> permission.Tokens
12, // [12:20] is the sub-list for method output_type
4, // [4:12] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
2024-08-25 14:16:51 +00:00
func init() { file_generate_protobuf_permission_proto_init() }
func file_generate_protobuf_permission_proto_init() {
if File_generate_protobuf_permission_proto != nil {
return
}
2025-03-02 13:45:50 +00:00
file_generate_protobuf_permission_proto_msgTypes[2].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
2024-08-25 14:16:51 +00:00
RawDescriptor: file_generate_protobuf_permission_proto_rawDesc,
NumEnums: 0,
2025-03-02 13:45:50 +00:00
NumMessages: 16,
NumExtensions: 0,
NumServices: 1,
},
2024-08-25 14:16:51 +00:00
GoTypes: file_generate_protobuf_permission_proto_goTypes,
DependencyIndexes: file_generate_protobuf_permission_proto_depIdxs,
MessageInfos: file_generate_protobuf_permission_proto_msgTypes,
}.Build()
2024-08-25 14:16:51 +00:00
File_generate_protobuf_permission_proto = out.File
file_generate_protobuf_permission_proto_rawDesc = nil
file_generate_protobuf_permission_proto_goTypes = nil
file_generate_protobuf_permission_proto_depIdxs = nil
}