| // Copyright 2018 The Goma Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // versions: |
| // protoc-gen-go v1.27.1 |
| // protoc v3.19.0 |
| // source: auth/auth.proto |
| |
| package auth |
| |
| import ( |
| protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| timestamppb "google.golang.org/protobuf/types/known/timestamppb" |
| 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 AuthReq struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| Authorization string `protobuf:"bytes,1,opt,name=authorization,proto3" json:"authorization,omitempty"` |
| } |
| |
| func (x *AuthReq) Reset() { |
| *x = AuthReq{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_auth_auth_proto_msgTypes[0] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *AuthReq) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*AuthReq) ProtoMessage() {} |
| |
| func (x *AuthReq) ProtoReflect() protoreflect.Message { |
| mi := &file_auth_auth_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 AuthReq.ProtoReflect.Descriptor instead. |
| func (*AuthReq) Descriptor() ([]byte, []int) { |
| return file_auth_auth_proto_rawDescGZIP(), []int{0} |
| } |
| |
| func (x *AuthReq) GetAuthorization() string { |
| if x != nil { |
| return x.Authorization |
| } |
| return "" |
| } |
| |
| type Token struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` |
| TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` |
| } |
| |
| func (x *Token) Reset() { |
| *x = Token{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_auth_auth_proto_msgTypes[1] |
| 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_auth_auth_proto_msgTypes[1] |
| 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_auth_auth_proto_rawDescGZIP(), []int{1} |
| } |
| |
| func (x *Token) GetAccessToken() string { |
| if x != nil { |
| return x.AccessToken |
| } |
| return "" |
| } |
| |
| func (x *Token) GetTokenType() string { |
| if x != nil { |
| return x.TokenType |
| } |
| return "" |
| } |
| |
| type AuthResp struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` |
| ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` |
| // number of requests allowed until expire. |
| // -1 means unlimited. 0 means disallow. |
| Quota int32 `protobuf:"varint,4,opt,name=quota,proto3" json:"quota,omitempty"` // TODO: group quota? |
| // error description for user. |
| ErrorDescription string `protobuf:"bytes,5,opt,name=error_description,json=errorDescription,proto3" json:"error_description,omitempty"` |
| Token *Token `protobuf:"bytes,7,opt,name=token,proto3" json:"token,omitempty"` |
| // group that email belongs to. |
| GroupId string `protobuf:"bytes,8,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` |
| } |
| |
| func (x *AuthResp) Reset() { |
| *x = AuthResp{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_auth_auth_proto_msgTypes[2] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *AuthResp) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*AuthResp) ProtoMessage() {} |
| |
| func (x *AuthResp) ProtoReflect() protoreflect.Message { |
| mi := &file_auth_auth_proto_msgTypes[2] |
| 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 AuthResp.ProtoReflect.Descriptor instead. |
| func (*AuthResp) Descriptor() ([]byte, []int) { |
| return file_auth_auth_proto_rawDescGZIP(), []int{2} |
| } |
| |
| func (x *AuthResp) GetEmail() string { |
| if x != nil { |
| return x.Email |
| } |
| return "" |
| } |
| |
| func (x *AuthResp) GetExpiresAt() *timestamppb.Timestamp { |
| if x != nil { |
| return x.ExpiresAt |
| } |
| return nil |
| } |
| |
| func (x *AuthResp) GetQuota() int32 { |
| if x != nil { |
| return x.Quota |
| } |
| return 0 |
| } |
| |
| func (x *AuthResp) GetErrorDescription() string { |
| if x != nil { |
| return x.ErrorDescription |
| } |
| return "" |
| } |
| |
| func (x *AuthResp) GetToken() *Token { |
| if x != nil { |
| return x.Token |
| } |
| return nil |
| } |
| |
| func (x *AuthResp) GetGroupId() string { |
| if x != nil { |
| return x.GroupId |
| } |
| return "" |
| } |
| |
| var File_auth_auth_proto protoreflect.FileDescriptor |
| |
| var file_auth_auth_proto_rawDesc = []byte{ |
| 0x0a, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, |
| 0x6f, 0x12, 0x04, 0x61, 0x75, 0x74, 0x68, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, |
| 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, |
| 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2f, 0x0a, 0x07, 0x41, 0x75, 0x74, 0x68, |
| 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, |
| 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, |
| 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x49, 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, 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, 0x22, 0xe2, 0x01, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, |
| 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, |
| 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, |
| 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, |
| 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, |
| 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, |
| 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, |
| 0x05, 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x72, 0x72, 0x6f, |
| 0x72, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, |
| 0x01, 0x28, 0x09, 0x52, 0x10, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, |
| 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, |
| 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, 0x6f, 0x6b, 0x65, |
| 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, |
| 0x70, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, |
| 0x70, 0x49, 0x64, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x6f, 0x2e, |
| 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x6d, |
| 0x61, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, |
| 0x75, 0x74, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| } |
| |
| var ( |
| file_auth_auth_proto_rawDescOnce sync.Once |
| file_auth_auth_proto_rawDescData = file_auth_auth_proto_rawDesc |
| ) |
| |
| func file_auth_auth_proto_rawDescGZIP() []byte { |
| file_auth_auth_proto_rawDescOnce.Do(func() { |
| file_auth_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_auth_auth_proto_rawDescData) |
| }) |
| return file_auth_auth_proto_rawDescData |
| } |
| |
| var file_auth_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 3) |
| var file_auth_auth_proto_goTypes = []interface{}{ |
| (*AuthReq)(nil), // 0: auth.AuthReq |
| (*Token)(nil), // 1: auth.Token |
| (*AuthResp)(nil), // 2: auth.AuthResp |
| (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp |
| } |
| var file_auth_auth_proto_depIdxs = []int32{ |
| 3, // 0: auth.AuthResp.expires_at:type_name -> google.protobuf.Timestamp |
| 1, // 1: auth.AuthResp.token:type_name -> auth.Token |
| 2, // [2:2] is the sub-list for method output_type |
| 2, // [2:2] is the sub-list for method input_type |
| 2, // [2:2] is the sub-list for extension type_name |
| 2, // [2:2] is the sub-list for extension extendee |
| 0, // [0:2] is the sub-list for field type_name |
| } |
| |
| func init() { file_auth_auth_proto_init() } |
| func file_auth_auth_proto_init() { |
| if File_auth_auth_proto != nil { |
| return |
| } |
| if !protoimpl.UnsafeEnabled { |
| file_auth_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*AuthReq); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_auth_auth_proto_msgTypes[1].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 |
| } |
| } |
| file_auth_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*AuthResp); 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_auth_auth_proto_rawDesc, |
| NumEnums: 0, |
| NumMessages: 3, |
| NumExtensions: 0, |
| NumServices: 0, |
| }, |
| GoTypes: file_auth_auth_proto_goTypes, |
| DependencyIndexes: file_auth_auth_proto_depIdxs, |
| MessageInfos: file_auth_auth_proto_msgTypes, |
| }.Build() |
| File_auth_auth_proto = out.File |
| file_auth_auth_proto_rawDesc = nil |
| file_auth_auth_proto_goTypes = nil |
| file_auth_auth_proto_depIdxs = nil |
| } |