git » chasquid » next » tree

[next] / internal / domaininfo / domaininfo.pb.go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v3.21.12
// source: domaininfo.proto

package domaininfo

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	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 SecLevel int32

const (
	// Does not do TLS.
	SecLevel_PLAIN SecLevel = 0
	// TLS client connection (no certificate validation).
	SecLevel_TLS_CLIENT SecLevel = 1
	// TLS, but with invalid certificates.
	SecLevel_TLS_INSECURE SecLevel = 2
	// TLS, with valid certificates.
	SecLevel_TLS_SECURE SecLevel = 3
)

// Enum value maps for SecLevel.
var (
	SecLevel_name = map[int32]string{
		0: "PLAIN",
		1: "TLS_CLIENT",
		2: "TLS_INSECURE",
		3: "TLS_SECURE",
	}
	SecLevel_value = map[string]int32{
		"PLAIN":        0,
		"TLS_CLIENT":   1,
		"TLS_INSECURE": 2,
		"TLS_SECURE":   3,
	}
)

func (x SecLevel) Enum() *SecLevel {
	p := new(SecLevel)
	*p = x
	return p
}

func (x SecLevel) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (SecLevel) Descriptor() protoreflect.EnumDescriptor {
	return file_domaininfo_proto_enumTypes[0].Descriptor()
}

func (SecLevel) Type() protoreflect.EnumType {
	return &file_domaininfo_proto_enumTypes[0]
}

func (x SecLevel) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use SecLevel.Descriptor instead.
func (SecLevel) EnumDescriptor() ([]byte, []int) {
	return file_domaininfo_proto_rawDescGZIP(), []int{0}
}

type Domain struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	Name  string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Security level for mail coming from this domain (they send to us).
	IncomingSecLevel SecLevel `protobuf:"varint,2,opt,name=incoming_sec_level,json=incomingSecLevel,proto3,enum=domaininfo.SecLevel" json:"incoming_sec_level,omitempty"`
	// Security level for mail going to this domain (we send to them).
	OutgoingSecLevel SecLevel `protobuf:"varint,3,opt,name=outgoing_sec_level,json=outgoingSecLevel,proto3,enum=domaininfo.SecLevel" json:"outgoing_sec_level,omitempty"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

func (x *Domain) Reset() {
	*x = Domain{}
	mi := &file_domaininfo_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Domain) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Domain) ProtoMessage() {}

func (x *Domain) ProtoReflect() protoreflect.Message {
	mi := &file_domaininfo_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 Domain.ProtoReflect.Descriptor instead.
func (*Domain) Descriptor() ([]byte, []int) {
	return file_domaininfo_proto_rawDescGZIP(), []int{0}
}

func (x *Domain) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *Domain) GetIncomingSecLevel() SecLevel {
	if x != nil {
		return x.IncomingSecLevel
	}
	return SecLevel_PLAIN
}

func (x *Domain) GetOutgoingSecLevel() SecLevel {
	if x != nil {
		return x.OutgoingSecLevel
	}
	return SecLevel_PLAIN
}

var File_domaininfo_proto protoreflect.FileDescriptor

const file_domaininfo_proto_rawDesc = "" +
	"\n" +
	"\x10domaininfo.proto\x12\n" +
	"domaininfo\"\xa4\x01\n" +
	"\x06Domain\x12\x12\n" +
	"\x04name\x18\x01 \x01(\tR\x04name\x12B\n" +
	"\x12incoming_sec_level\x18\x02 \x01(\x0e2\x14.domaininfo.SecLevelR\x10incomingSecLevel\x12B\n" +
	"\x12outgoing_sec_level\x18\x03 \x01(\x0e2\x14.domaininfo.SecLevelR\x10outgoingSecLevel*G\n" +
	"\bSecLevel\x12\t\n" +
	"\x05PLAIN\x10\x00\x12\x0e\n" +
	"\n" +
	"TLS_CLIENT\x10\x01\x12\x10\n" +
	"\fTLS_INSECURE\x10\x02\x12\x0e\n" +
	"\n" +
	"TLS_SECURE\x10\x03B0Z.blitiri.com.ar/go/chasquid/internal/domaininfob\x06proto3"

var (
	file_domaininfo_proto_rawDescOnce sync.Once
	file_domaininfo_proto_rawDescData []byte
)

func file_domaininfo_proto_rawDescGZIP() []byte {
	file_domaininfo_proto_rawDescOnce.Do(func() {
		file_domaininfo_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_domaininfo_proto_rawDesc), len(file_domaininfo_proto_rawDesc)))
	})
	return file_domaininfo_proto_rawDescData
}

var file_domaininfo_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_domaininfo_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_domaininfo_proto_goTypes = []any{
	(SecLevel)(0),  // 0: domaininfo.SecLevel
	(*Domain)(nil), // 1: domaininfo.Domain
}
var file_domaininfo_proto_depIdxs = []int32{
	0, // 0: domaininfo.Domain.incoming_sec_level:type_name -> domaininfo.SecLevel
	0, // 1: domaininfo.Domain.outgoing_sec_level:type_name -> domaininfo.SecLevel
	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_domaininfo_proto_init() }
func file_domaininfo_proto_init() {
	if File_domaininfo_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_domaininfo_proto_rawDesc), len(file_domaininfo_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_domaininfo_proto_goTypes,
		DependencyIndexes: file_domaininfo_proto_depIdxs,
		EnumInfos:         file_domaininfo_proto_enumTypes,
		MessageInfos:      file_domaininfo_proto_msgTypes,
	}.Build()
	File_domaininfo_proto = out.File
	file_domaininfo_proto_goTypes = nil
	file_domaininfo_proto_depIdxs = nil
}