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

package userdb

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 ProtoDB struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Users         map[string]*Password   `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ProtoDB) ProtoMessage() {}

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

func (x *ProtoDB) GetUsers() map[string]*Password {
	if x != nil {
		return x.Users
	}
	return nil
}

type Password struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Scheme:
	//
	//	*Password_Scrypt
	//	*Password_Plain
	//	*Password_Denied
	Scheme        isPassword_Scheme `protobuf_oneof:"scheme"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Password) Reset() {
	*x = Password{}
	mi := &file_userdb_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Password) ProtoMessage() {}

func (x *Password) ProtoReflect() protoreflect.Message {
	mi := &file_userdb_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 Password.ProtoReflect.Descriptor instead.
func (*Password) Descriptor() ([]byte, []int) {
	return file_userdb_proto_rawDescGZIP(), []int{1}
}

func (x *Password) GetScheme() isPassword_Scheme {
	if x != nil {
		return x.Scheme
	}
	return nil
}

func (x *Password) GetScrypt() *Scrypt {
	if x != nil {
		if x, ok := x.Scheme.(*Password_Scrypt); ok {
			return x.Scrypt
		}
	}
	return nil
}

func (x *Password) GetPlain() *Plain {
	if x != nil {
		if x, ok := x.Scheme.(*Password_Plain); ok {
			return x.Plain
		}
	}
	return nil
}

func (x *Password) GetDenied() *Denied {
	if x != nil {
		if x, ok := x.Scheme.(*Password_Denied); ok {
			return x.Denied
		}
	}
	return nil
}

type isPassword_Scheme interface {
	isPassword_Scheme()
}

type Password_Scrypt struct {
	Scrypt *Scrypt `protobuf:"bytes,2,opt,name=scrypt,proto3,oneof"`
}

type Password_Plain struct {
	Plain *Plain `protobuf:"bytes,3,opt,name=plain,proto3,oneof"`
}

type Password_Denied struct {
	Denied *Denied `protobuf:"bytes,4,opt,name=denied,proto3,oneof"`
}

func (*Password_Scrypt) isPassword_Scheme() {}

func (*Password_Plain) isPassword_Scheme() {}

func (*Password_Denied) isPassword_Scheme() {}

type Scrypt struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	LogN          uint64                 `protobuf:"varint,1,opt,name=logN,proto3" json:"logN,omitempty"`
	R             int32                  `protobuf:"varint,2,opt,name=r,proto3" json:"r,omitempty"`
	P             int32                  `protobuf:"varint,3,opt,name=p,proto3" json:"p,omitempty"`
	KeyLen        int32                  `protobuf:"varint,4,opt,name=keyLen,proto3" json:"keyLen,omitempty"`
	Salt          []byte                 `protobuf:"bytes,5,opt,name=salt,proto3" json:"salt,omitempty"`
	Encrypted     []byte                 `protobuf:"bytes,6,opt,name=encrypted,proto3" json:"encrypted,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Scrypt) Reset() {
	*x = Scrypt{}
	mi := &file_userdb_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Scrypt) ProtoMessage() {}

func (x *Scrypt) ProtoReflect() protoreflect.Message {
	mi := &file_userdb_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 Scrypt.ProtoReflect.Descriptor instead.
func (*Scrypt) Descriptor() ([]byte, []int) {
	return file_userdb_proto_rawDescGZIP(), []int{2}
}

func (x *Scrypt) GetLogN() uint64 {
	if x != nil {
		return x.LogN
	}
	return 0
}

func (x *Scrypt) GetR() int32 {
	if x != nil {
		return x.R
	}
	return 0
}

func (x *Scrypt) GetP() int32 {
	if x != nil {
		return x.P
	}
	return 0
}

func (x *Scrypt) GetKeyLen() int32 {
	if x != nil {
		return x.KeyLen
	}
	return 0
}

func (x *Scrypt) GetSalt() []byte {
	if x != nil {
		return x.Salt
	}
	return nil
}

func (x *Scrypt) GetEncrypted() []byte {
	if x != nil {
		return x.Encrypted
	}
	return nil
}

type Plain struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Password      []byte                 `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Plain) Reset() {
	*x = Plain{}
	mi := &file_userdb_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Plain) ProtoMessage() {}

func (x *Plain) ProtoReflect() protoreflect.Message {
	mi := &file_userdb_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 Plain.ProtoReflect.Descriptor instead.
func (*Plain) Descriptor() ([]byte, []int) {
	return file_userdb_proto_rawDescGZIP(), []int{3}
}

func (x *Plain) GetPassword() []byte {
	if x != nil {
		return x.Password
	}
	return nil
}

type Denied struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Denied) Reset() {
	*x = Denied{}
	mi := &file_userdb_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Denied) ProtoMessage() {}

func (x *Denied) ProtoReflect() protoreflect.Message {
	mi := &file_userdb_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 Denied.ProtoReflect.Descriptor instead.
func (*Denied) Descriptor() ([]byte, []int) {
	return file_userdb_proto_rawDescGZIP(), []int{4}
}

var File_userdb_proto protoreflect.FileDescriptor

const file_userdb_proto_rawDesc = "" +
	"\n" +
	"\fuserdb.proto\x12\x06userdb\"\x87\x01\n" +
	"\aProtoDB\x120\n" +
	"\x05users\x18\x01 \x03(\v2\x1a.userdb.ProtoDB.UsersEntryR\x05users\x1aJ\n" +
	"\n" +
	"UsersEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12&\n" +
	"\x05value\x18\x02 \x01(\v2\x10.userdb.PasswordR\x05value:\x028\x01\"\x8f\x01\n" +
	"\bPassword\x12(\n" +
	"\x06scrypt\x18\x02 \x01(\v2\x0e.userdb.ScryptH\x00R\x06scrypt\x12%\n" +
	"\x05plain\x18\x03 \x01(\v2\r.userdb.PlainH\x00R\x05plain\x12(\n" +
	"\x06denied\x18\x04 \x01(\v2\x0e.userdb.DeniedH\x00R\x06deniedB\b\n" +
	"\x06scheme\"\x82\x01\n" +
	"\x06Scrypt\x12\x12\n" +
	"\x04logN\x18\x01 \x01(\x04R\x04logN\x12\f\n" +
	"\x01r\x18\x02 \x01(\x05R\x01r\x12\f\n" +
	"\x01p\x18\x03 \x01(\x05R\x01p\x12\x16\n" +
	"\x06keyLen\x18\x04 \x01(\x05R\x06keyLen\x12\x12\n" +
	"\x04salt\x18\x05 \x01(\fR\x04salt\x12\x1c\n" +
	"\tencrypted\x18\x06 \x01(\fR\tencrypted\"#\n" +
	"\x05Plain\x12\x1a\n" +
	"\bpassword\x18\x01 \x01(\fR\bpassword\"\b\n" +
	"\x06DeniedB,Z*blitiri.com.ar/go/chasquid/internal/userdbb\x06proto3"

var (
	file_userdb_proto_rawDescOnce sync.Once
	file_userdb_proto_rawDescData []byte
)

func file_userdb_proto_rawDescGZIP() []byte {
	file_userdb_proto_rawDescOnce.Do(func() {
		file_userdb_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_userdb_proto_rawDesc), len(file_userdb_proto_rawDesc)))
	})
	return file_userdb_proto_rawDescData
}

var file_userdb_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_userdb_proto_goTypes = []any{
	(*ProtoDB)(nil),  // 0: userdb.ProtoDB
	(*Password)(nil), // 1: userdb.Password
	(*Scrypt)(nil),   // 2: userdb.Scrypt
	(*Plain)(nil),    // 3: userdb.Plain
	(*Denied)(nil),   // 4: userdb.Denied
	nil,              // 5: userdb.ProtoDB.UsersEntry
}
var file_userdb_proto_depIdxs = []int32{
	5, // 0: userdb.ProtoDB.users:type_name -> userdb.ProtoDB.UsersEntry
	2, // 1: userdb.Password.scrypt:type_name -> userdb.Scrypt
	3, // 2: userdb.Password.plain:type_name -> userdb.Plain
	4, // 3: userdb.Password.denied:type_name -> userdb.Denied
	1, // 4: userdb.ProtoDB.UsersEntry.value:type_name -> userdb.Password
	5, // [5:5] is the sub-list for method output_type
	5, // [5:5] is the sub-list for method input_type
	5, // [5:5] is the sub-list for extension type_name
	5, // [5:5] is the sub-list for extension extendee
	0, // [0:5] is the sub-list for field type_name
}

func init() { file_userdb_proto_init() }
func file_userdb_proto_init() {
	if File_userdb_proto != nil {
		return
	}
	file_userdb_proto_msgTypes[1].OneofWrappers = []any{
		(*Password_Scrypt)(nil),
		(*Password_Plain)(nil),
		(*Password_Denied)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_userdb_proto_rawDesc), len(file_userdb_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   6,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_userdb_proto_goTypes,
		DependencyIndexes: file_userdb_proto_depIdxs,
		MessageInfos:      file_userdb_proto_msgTypes,
	}.Build()
	File_userdb_proto = out.File
	file_userdb_proto_goTypes = nil
	file_userdb_proto_depIdxs = nil
}
