go.chromium.org/luci@v0.0.0-20250314024836-d9a61d0730e6/tokenserver/api/token_file.pb.go (about)

     1  // Copyright 2016 The LUCI Authors. All rights reserved.
     2  // Use of this source code is governed under the Apache License, Version 2.0
     3  // that can be found in the LICENSE file.
     4  
     5  // Code generated by protoc-gen-go. DO NOT EDIT.
     6  // versions:
     7  // 	protoc-gen-go v1.36.5
     8  // 	protoc        v5.29.3
     9  // source: go.chromium.org/luci/tokenserver/api/token_file.proto
    10  
    11  package tokenserver
    12  
    13  import (
    14  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    15  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    16  	reflect "reflect"
    17  	sync "sync"
    18  	unsafe "unsafe"
    19  )
    20  
    21  const (
    22  	// Verify that this generated code is sufficiently up-to-date.
    23  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    24  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    25  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    26  )
    27  
    28  // TokenFile is representation of a token file on disk (serialized as JSON).
    29  //
    30  // The token file is consumed by whoever wishes to use machine tokens. It is
    31  // intentionally made as simple as possible (e.g. uses unix timestamps instead
    32  // of fancy protobuf ones).
    33  type TokenFile struct {
    34  	state protoimpl.MessageState `protogen:"open.v1"`
    35  	// Google OAuth2 access token of a machine service account.
    36  	AccessToken string `protobuf:"bytes,1,opt,name=access_token,proto3" json:"access_token,omitempty"`
    37  	// OAuth2 access token type, usually "Bearer".
    38  	TokenType string `protobuf:"bytes,2,opt,name=token_type,proto3" json:"token_type,omitempty"`
    39  	// Machine token understood by LUCI backends (alternative to access_token).
    40  	LuciMachineToken string `protobuf:"bytes,3,opt,name=luci_machine_token,proto3" json:"luci_machine_token,omitempty"`
    41  	// Unix timestamp (in seconds) when this token expires.
    42  	//
    43  	// The token file is expected to be updated before the token expires, see
    44  	// 'next_update' for next expected update time.
    45  	Expiry int64 `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
    46  	// Unix timestamp of when this file was updated the last time.
    47  	LastUpdate int64 `protobuf:"varint,5,opt,name=last_update,proto3" json:"last_update,omitempty"`
    48  	// Unix timestamp of when this file is expected to be updated next time.
    49  	NextUpdate int64 `protobuf:"varint,6,opt,name=next_update,proto3" json:"next_update,omitempty"`
    50  	// Email of the associated service account.
    51  	ServiceAccountEmail string `protobuf:"bytes,7,opt,name=service_account_email,proto3" json:"service_account_email,omitempty"`
    52  	// Unique stable ID of the associated service account.
    53  	ServiceAccountUniqueId string `protobuf:"bytes,8,opt,name=service_account_unique_id,proto3" json:"service_account_unique_id,omitempty"`
    54  	// Any information tokend daemon wishes to associate with the token.
    55  	//
    56  	// Consumers of the token file should ignore this field. It is used
    57  	// exclusively by tokend daemon.
    58  	TokendState   []byte `protobuf:"bytes,50,opt,name=tokend_state,proto3" json:"tokend_state,omitempty"`
    59  	unknownFields protoimpl.UnknownFields
    60  	sizeCache     protoimpl.SizeCache
    61  }
    62  
    63  func (x *TokenFile) Reset() {
    64  	*x = TokenFile{}
    65  	mi := &file_go_chromium_org_luci_tokenserver_api_token_file_proto_msgTypes[0]
    66  	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    67  	ms.StoreMessageInfo(mi)
    68  }
    69  
    70  func (x *TokenFile) String() string {
    71  	return protoimpl.X.MessageStringOf(x)
    72  }
    73  
    74  func (*TokenFile) ProtoMessage() {}
    75  
    76  func (x *TokenFile) ProtoReflect() protoreflect.Message {
    77  	mi := &file_go_chromium_org_luci_tokenserver_api_token_file_proto_msgTypes[0]
    78  	if x != nil {
    79  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    80  		if ms.LoadMessageInfo() == nil {
    81  			ms.StoreMessageInfo(mi)
    82  		}
    83  		return ms
    84  	}
    85  	return mi.MessageOf(x)
    86  }
    87  
    88  // Deprecated: Use TokenFile.ProtoReflect.Descriptor instead.
    89  func (*TokenFile) Descriptor() ([]byte, []int) {
    90  	return file_go_chromium_org_luci_tokenserver_api_token_file_proto_rawDescGZIP(), []int{0}
    91  }
    92  
    93  func (x *TokenFile) GetAccessToken() string {
    94  	if x != nil {
    95  		return x.AccessToken
    96  	}
    97  	return ""
    98  }
    99  
   100  func (x *TokenFile) GetTokenType() string {
   101  	if x != nil {
   102  		return x.TokenType
   103  	}
   104  	return ""
   105  }
   106  
   107  func (x *TokenFile) GetLuciMachineToken() string {
   108  	if x != nil {
   109  		return x.LuciMachineToken
   110  	}
   111  	return ""
   112  }
   113  
   114  func (x *TokenFile) GetExpiry() int64 {
   115  	if x != nil {
   116  		return x.Expiry
   117  	}
   118  	return 0
   119  }
   120  
   121  func (x *TokenFile) GetLastUpdate() int64 {
   122  	if x != nil {
   123  		return x.LastUpdate
   124  	}
   125  	return 0
   126  }
   127  
   128  func (x *TokenFile) GetNextUpdate() int64 {
   129  	if x != nil {
   130  		return x.NextUpdate
   131  	}
   132  	return 0
   133  }
   134  
   135  func (x *TokenFile) GetServiceAccountEmail() string {
   136  	if x != nil {
   137  		return x.ServiceAccountEmail
   138  	}
   139  	return ""
   140  }
   141  
   142  func (x *TokenFile) GetServiceAccountUniqueId() string {
   143  	if x != nil {
   144  		return x.ServiceAccountUniqueId
   145  	}
   146  	return ""
   147  }
   148  
   149  func (x *TokenFile) GetTokendState() []byte {
   150  	if x != nil {
   151  		return x.TokendState
   152  	}
   153  	return nil
   154  }
   155  
   156  var File_go_chromium_org_luci_tokenserver_api_token_file_proto protoreflect.FileDescriptor
   157  
   158  var file_go_chromium_org_luci_tokenserver_api_token_file_proto_rawDesc = string([]byte{
   159  	0x0a, 0x35, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72,
   160  	0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x65, 0x72, 0x76,
   161  	0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x66, 0x69, 0x6c,
   162  	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x65,
   163  	0x72, 0x76, 0x65, 0x72, 0x22, 0xf3, 0x02, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x69,
   164  	0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b,
   165  	0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73,
   166  	0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f,
   167  	0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x6b, 0x65,
   168  	0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x6c, 0x75, 0x63, 0x69, 0x5f, 0x6d,
   169  	0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01,
   170  	0x28, 0x09, 0x52, 0x12, 0x6c, 0x75, 0x63, 0x69, 0x5f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65,
   171  	0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79,
   172  	0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x20,
   173  	0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20,
   174  	0x01, 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
   175  	0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18,
   176  	0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61,
   177  	0x74, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63,
   178  	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28,
   179  	0x09, 0x52, 0x15, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75,
   180  	0x6e, 0x74, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x3c, 0x0a, 0x19, 0x73, 0x65, 0x72, 0x76,
   181  	0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x75, 0x6e, 0x69, 0x71,
   182  	0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x73, 0x65, 0x72,
   183  	0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x75, 0x6e, 0x69,
   184  	0x71, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x64,
   185  	0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x74, 0x6f,
   186  	0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x6f,
   187  	0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75,
   188  	0x63, 0x69, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61,
   189  	0x70, 0x69, 0x3b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x62, 0x06,
   190  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   191  })
   192  
   193  var (
   194  	file_go_chromium_org_luci_tokenserver_api_token_file_proto_rawDescOnce sync.Once
   195  	file_go_chromium_org_luci_tokenserver_api_token_file_proto_rawDescData []byte
   196  )
   197  
   198  func file_go_chromium_org_luci_tokenserver_api_token_file_proto_rawDescGZIP() []byte {
   199  	file_go_chromium_org_luci_tokenserver_api_token_file_proto_rawDescOnce.Do(func() {
   200  		file_go_chromium_org_luci_tokenserver_api_token_file_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_go_chromium_org_luci_tokenserver_api_token_file_proto_rawDesc), len(file_go_chromium_org_luci_tokenserver_api_token_file_proto_rawDesc)))
   201  	})
   202  	return file_go_chromium_org_luci_tokenserver_api_token_file_proto_rawDescData
   203  }
   204  
   205  var file_go_chromium_org_luci_tokenserver_api_token_file_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   206  var file_go_chromium_org_luci_tokenserver_api_token_file_proto_goTypes = []any{
   207  	(*TokenFile)(nil), // 0: tokenserver.TokenFile
   208  }
   209  var file_go_chromium_org_luci_tokenserver_api_token_file_proto_depIdxs = []int32{
   210  	0, // [0:0] is the sub-list for method output_type
   211  	0, // [0:0] is the sub-list for method input_type
   212  	0, // [0:0] is the sub-list for extension type_name
   213  	0, // [0:0] is the sub-list for extension extendee
   214  	0, // [0:0] is the sub-list for field type_name
   215  }
   216  
   217  func init() { file_go_chromium_org_luci_tokenserver_api_token_file_proto_init() }
   218  func file_go_chromium_org_luci_tokenserver_api_token_file_proto_init() {
   219  	if File_go_chromium_org_luci_tokenserver_api_token_file_proto != nil {
   220  		return
   221  	}
   222  	type x struct{}
   223  	out := protoimpl.TypeBuilder{
   224  		File: protoimpl.DescBuilder{
   225  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   226  			RawDescriptor: unsafe.Slice(unsafe.StringData(file_go_chromium_org_luci_tokenserver_api_token_file_proto_rawDesc), len(file_go_chromium_org_luci_tokenserver_api_token_file_proto_rawDesc)),
   227  			NumEnums:      0,
   228  			NumMessages:   1,
   229  			NumExtensions: 0,
   230  			NumServices:   0,
   231  		},
   232  		GoTypes:           file_go_chromium_org_luci_tokenserver_api_token_file_proto_goTypes,
   233  		DependencyIndexes: file_go_chromium_org_luci_tokenserver_api_token_file_proto_depIdxs,
   234  		MessageInfos:      file_go_chromium_org_luci_tokenserver_api_token_file_proto_msgTypes,
   235  	}.Build()
   236  	File_go_chromium_org_luci_tokenserver_api_token_file_proto = out.File
   237  	file_go_chromium_org_luci_tokenserver_api_token_file_proto_goTypes = nil
   238  	file_go_chromium_org_luci_tokenserver_api_token_file_proto_depIdxs = nil
   239  }