evcc-io/api/proto/pb/auth.pb.go

341 lines
9.9 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v7.35.1
// source: proto/auth.proto
package pb
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"
unsafe "unsafe"
)
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 AuthRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
MachineId string `protobuf:"bytes,2,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AuthRequest) Reset() {
*x = AuthRequest{}
mi := &file_proto_auth_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AuthRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AuthRequest) ProtoMessage() {}
func (x *AuthRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_auth_proto_msgTypes[0]
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 AuthRequest.ProtoReflect.Descriptor instead.
func (*AuthRequest) Descriptor() ([]byte, []int) {
return file_proto_auth_proto_rawDescGZIP(), []int{0}
}
func (x *AuthRequest) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
func (x *AuthRequest) GetMachineId() string {
if x != nil {
return x.MachineId
}
return ""
}
type AuthReply struct {
state protoimpl.MessageState `protogen:"open.v1"`
Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *AuthReply) Reset() {
*x = AuthReply{}
mi := &file_proto_auth_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AuthReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AuthReply) ProtoMessage() {}
func (x *AuthReply) ProtoReflect() protoreflect.Message {
mi := &file_proto_auth_proto_msgTypes[1]
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 AuthReply.ProtoReflect.Descriptor instead.
func (*AuthReply) Descriptor() ([]byte, []int) {
return file_proto_auth_proto_rawDescGZIP(), []int{1}
}
func (x *AuthReply) GetAuthorized() bool {
if x != nil {
return x.Authorized
}
return false
}
func (x *AuthReply) GetSubject() string {
if x != nil {
return x.Subject
}
return ""
}
func (x *AuthReply) GetExpiresAt() *timestamppb.Timestamp {
if x != nil {
return x.ExpiresAt
}
return nil
}
type HardwareRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
MachineId string `protobuf:"bytes,1,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"`
Vendor string `protobuf:"bytes,2,opt,name=vendor,proto3" json:"vendor,omitempty"`
Metadata map[string]string `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *HardwareRequest) Reset() {
*x = HardwareRequest{}
mi := &file_proto_auth_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *HardwareRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HardwareRequest) ProtoMessage() {}
func (x *HardwareRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_auth_proto_msgTypes[2]
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 HardwareRequest.ProtoReflect.Descriptor instead.
func (*HardwareRequest) Descriptor() ([]byte, []int) {
return file_proto_auth_proto_rawDescGZIP(), []int{2}
}
func (x *HardwareRequest) GetMachineId() string {
if x != nil {
return x.MachineId
}
return ""
}
func (x *HardwareRequest) GetVendor() string {
if x != nil {
return x.Vendor
}
return ""
}
func (x *HardwareRequest) GetMetadata() map[string]string {
if x != nil {
return x.Metadata
}
return nil
}
type HardwareReply struct {
state protoimpl.MessageState `protogen:"open.v1"`
Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *HardwareReply) Reset() {
*x = HardwareReply{}
mi := &file_proto_auth_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *HardwareReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HardwareReply) ProtoMessage() {}
func (x *HardwareReply) ProtoReflect() protoreflect.Message {
mi := &file_proto_auth_proto_msgTypes[3]
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 HardwareReply.ProtoReflect.Descriptor instead.
func (*HardwareReply) Descriptor() ([]byte, []int) {
return file_proto_auth_proto_rawDescGZIP(), []int{3}
}
func (x *HardwareReply) GetAuthorized() bool {
if x != nil {
return x.Authorized
}
return false
}
func (x *HardwareReply) GetSubject() string {
if x != nil {
return x.Subject
}
return ""
}
var File_proto_auth_proto protoreflect.FileDescriptor
const file_proto_auth_proto_rawDesc = "" +
"\n" +
"\x10proto/auth.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"B\n" +
"\vAuthRequest\x12\x14\n" +
"\x05token\x18\x01 \x01(\tR\x05token\x12\x1d\n" +
"\n" +
"machine_id\x18\x02 \x01(\tR\tmachineId\"\x86\x01\n" +
"\tAuthReply\x12\x1e\n" +
"\n" +
"authorized\x18\x01 \x01(\bR\n" +
"authorized\x12\x18\n" +
"\asubject\x18\x02 \x01(\tR\asubject\x129\n" +
"\n" +
"expires_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAtJ\x04\b\x04\x10\x05\"\xc1\x01\n" +
"\x0fHardwareRequest\x12\x1d\n" +
"\n" +
"machine_id\x18\x01 \x01(\tR\tmachineId\x12\x16\n" +
"\x06vendor\x18\x02 \x01(\tR\x06vendor\x12:\n" +
"\bmetadata\x18\x03 \x03(\v2\x1e.HardwareRequest.MetadataEntryR\bmetadata\x1a;\n" +
"\rMetadataEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"I\n" +
"\rHardwareReply\x12\x1e\n" +
"\n" +
"authorized\x18\x01 \x01(\bR\n" +
"authorized\x12\x18\n" +
"\asubject\x18\x02 \x01(\tR\asubject2n\n" +
"\x04Auth\x12*\n" +
"\fIsAuthorized\x12\f.AuthRequest\x1a\n" +
".AuthReply\"\x00\x12:\n" +
"\x14IsAuthorizedHardware\x12\x10.HardwareRequest\x1a\x0e.HardwareReply\"\x00B\n" +
"Z\bproto/pbb\x06proto3"
var (
file_proto_auth_proto_rawDescOnce sync.Once
file_proto_auth_proto_rawDescData []byte
)
func file_proto_auth_proto_rawDescGZIP() []byte {
file_proto_auth_proto_rawDescOnce.Do(func() {
file_proto_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_auth_proto_rawDesc), len(file_proto_auth_proto_rawDesc)))
})
return file_proto_auth_proto_rawDescData
}
var file_proto_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_proto_auth_proto_goTypes = []any{
(*AuthRequest)(nil), // 0: AuthRequest
(*AuthReply)(nil), // 1: AuthReply
(*HardwareRequest)(nil), // 2: HardwareRequest
(*HardwareReply)(nil), // 3: HardwareReply
nil, // 4: HardwareRequest.MetadataEntry
(*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
}
var file_proto_auth_proto_depIdxs = []int32{
5, // 0: AuthReply.expires_at:type_name -> google.protobuf.Timestamp
4, // 1: HardwareRequest.metadata:type_name -> HardwareRequest.MetadataEntry
0, // 2: Auth.IsAuthorized:input_type -> AuthRequest
2, // 3: Auth.IsAuthorizedHardware:input_type -> HardwareRequest
1, // 4: Auth.IsAuthorized:output_type -> AuthReply
3, // 5: Auth.IsAuthorizedHardware:output_type -> HardwareReply
4, // [4:6] is the sub-list for method output_type
2, // [2:4] 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_proto_auth_proto_init() }
func file_proto_auth_proto_init() {
if File_proto_auth_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_auth_proto_rawDesc), len(file_proto_auth_proto_rawDesc)),
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_proto_auth_proto_goTypes,
DependencyIndexes: file_proto_auth_proto_depIdxs,
MessageInfos: file_proto_auth_proto_msgTypes,
}.Build()
File_proto_auth_proto = out.File
file_proto_auth_proto_goTypes = nil
file_proto_auth_proto_depIdxs = nil
}