// Code generated by protoc-gen-go. // source: userdb.proto // DO NOT EDIT! /* Package userdb is a generated protocol buffer package. It is generated from these files: userdb.proto It has these top-level messages: ProtoDB Password Scrypt Plain */ package userdb import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type ProtoDB struct { Users map[string]*Password `protobuf:"bytes,1,rep,name=users" json:"users,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` } func (m *ProtoDB) Reset() { *m = ProtoDB{} } func (m *ProtoDB) String() string { return proto.CompactTextString(m) } func (*ProtoDB) ProtoMessage() {} func (*ProtoDB) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } func (m *ProtoDB) GetUsers() map[string]*Password { if m != nil { return m.Users } return nil } type Password struct { // Types that are valid to be assigned to Scheme: // *Password_Scrypt // *Password_Plain Scheme isPassword_Scheme `protobuf_oneof:"scheme"` } func (m *Password) Reset() { *m = Password{} } func (m *Password) String() string { return proto.CompactTextString(m) } func (*Password) ProtoMessage() {} func (*Password) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } type isPassword_Scheme interface { isPassword_Scheme() } type Password_Scrypt struct { Scrypt *Scrypt `protobuf:"bytes,2,opt,name=scrypt,oneof"` } type Password_Plain struct { Plain *Plain `protobuf:"bytes,3,opt,name=plain,oneof"` } func (*Password_Scrypt) isPassword_Scheme() {} func (*Password_Plain) isPassword_Scheme() {} func (m *Password) GetScheme() isPassword_Scheme { if m != nil { return m.Scheme } return nil } func (m *Password) GetScrypt() *Scrypt { if x, ok := m.GetScheme().(*Password_Scrypt); ok { return x.Scrypt } return nil } func (m *Password) GetPlain() *Plain { if x, ok := m.GetScheme().(*Password_Plain); ok { return x.Plain } return nil } // XXX_OneofFuncs is for the internal use of the proto package. func (*Password) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _Password_OneofMarshaler, _Password_OneofUnmarshaler, _Password_OneofSizer, []interface{}{ (*Password_Scrypt)(nil), (*Password_Plain)(nil), } } func _Password_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { m := msg.(*Password) // scheme switch x := m.Scheme.(type) { case *Password_Scrypt: b.EncodeVarint(2<<3 | proto.WireBytes) if err := b.EncodeMessage(x.Scrypt); err != nil { return err } case *Password_Plain: b.EncodeVarint(3<<3 | proto.WireBytes) if err := b.EncodeMessage(x.Plain); err != nil { return err } case nil: default: return fmt.Errorf("Password.Scheme has unexpected type %T", x) } return nil } func _Password_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { m := msg.(*Password) switch tag { case 2: // scheme.scrypt if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } msg := new(Scrypt) err := b.DecodeMessage(msg) m.Scheme = &Password_Scrypt{msg} return true, err case 3: // scheme.plain if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } msg := new(Plain) err := b.DecodeMessage(msg) m.Scheme = &Password_Plain{msg} return true, err default: return false, nil } } func _Password_OneofSizer(msg proto.Message) (n int) { m := msg.(*Password) // scheme switch x := m.Scheme.(type) { case *Password_Scrypt: s := proto.Size(x.Scrypt) n += proto.SizeVarint(2<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case *Password_Plain: s := proto.Size(x.Plain) n += proto.SizeVarint(3<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) } return n } type Scrypt struct { LogN uint64 `protobuf:"varint,1,opt,name=logN" json:"logN,omitempty"` R int32 `protobuf:"varint,2,opt,name=r" json:"r,omitempty"` P int32 `protobuf:"varint,3,opt,name=p" json:"p,omitempty"` KeyLen int32 `protobuf:"varint,4,opt,name=keyLen" 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"` } func (m *Scrypt) Reset() { *m = Scrypt{} } func (m *Scrypt) String() string { return proto.CompactTextString(m) } func (*Scrypt) ProtoMessage() {} func (*Scrypt) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } type Plain struct { Password []byte `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` } func (m *Plain) Reset() { *m = Plain{} } func (m *Plain) String() string { return proto.CompactTextString(m) } func (*Plain) ProtoMessage() {} func (*Plain) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } func init() { proto.RegisterType((*ProtoDB)(nil), "userdb.ProtoDB") proto.RegisterType((*Password)(nil), "userdb.Password") proto.RegisterType((*Scrypt)(nil), "userdb.Scrypt") proto.RegisterType((*Plain)(nil), "userdb.Plain") } func init() { proto.RegisterFile("userdb.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ // 289 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0x91, 0x41, 0x4b, 0x03, 0x31, 0x10, 0x85, 0x4d, 0xdb, 0xc4, 0x76, 0xba, 0x4a, 0x99, 0x83, 0x84, 0xe2, 0x41, 0x56, 0x94, 0x9e, 0x16, 0xa9, 0x17, 0xf1, 0x58, 0x14, 0x44, 0x44, 0x24, 0xe2, 0x0f, 0xd8, 0xba, 0x41, 0xc5, 0x75, 0x37, 0x24, 0x5b, 0x65, 0xaf, 0x5e, 0xfc, 0xdb, 0x26, 0xb3, 0xe9, 0xf6, 0x36, 0xef, 0x7b, 0x33, 0x6f, 0x26, 0x04, 0x92, 0x8d, 0xd3, 0xb6, 0x58, 0x67, 0xc6, 0xd6, 0x4d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