// Code generated by protoc-gen-go. DO NOT EDIT.
// source: auth.proto

package session

import (
	context "context"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	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.ProtoPackageIsVersion3 // please upgrade the proto package

type AuthSession struct {
	ID                   string   `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	UserID               uint32   `protobuf:"varint,2,opt,name=UserID,proto3" json:"UserID,omitempty"`
	Ver                  int32    `protobuf:"varint,3,opt,name=Ver,proto3" json:"Ver,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *AuthSession) Reset()         { *m = AuthSession{} }
func (m *AuthSession) String() string { return proto.CompactTextString(m) }
func (*AuthSession) ProtoMessage()    {}
func (*AuthSession) Descriptor() ([]byte, []int) {
	return fileDescriptor_8bbd6f3875b0e874, []int{0}
}

func (m *AuthSession) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_AuthSession.Unmarshal(m, b)
}
func (m *AuthSession) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_AuthSession.Marshal(b, m, deterministic)
}
func (m *AuthSession) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AuthSession.Merge(m, src)
}
func (m *AuthSession) XXX_Size() int {
	return xxx_messageInfo_AuthSession.Size(m)
}
func (m *AuthSession) XXX_DiscardUnknown() {
	xxx_messageInfo_AuthSession.DiscardUnknown(m)
}

var xxx_messageInfo_AuthSession proto.InternalMessageInfo

func (m *AuthSession) GetID() string {
	if m != nil {
		return m.ID
	}
	return ""
}

func (m *AuthSession) GetUserID() uint32 {
	if m != nil {
		return m.UserID
	}
	return 0
}

func (m *AuthSession) GetVer() int32 {
	if m != nil {
		return m.Ver
	}
	return 0
}

type AuthUserIn struct {
	UserID               uint32   `protobuf:"varint,1,opt,name=UserID,proto3" json:"UserID,omitempty"`
	Ver                  int32    `protobuf:"varint,2,opt,name=Ver,proto3" json:"Ver,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *AuthUserIn) Reset()         { *m = AuthUserIn{} }
func (m *AuthUserIn) String() string { return proto.CompactTextString(m) }
func (*AuthUserIn) ProtoMessage()    {}
func (*AuthUserIn) Descriptor() ([]byte, []int) {
	return fileDescriptor_8bbd6f3875b0e874, []int{1}
}

func (m *AuthUserIn) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_AuthUserIn.Unmarshal(m, b)
}
func (m *AuthUserIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_AuthUserIn.Marshal(b, m, deterministic)
}
func (m *AuthUserIn) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AuthUserIn.Merge(m, src)
}
func (m *AuthUserIn) XXX_Size() int {
	return xxx_messageInfo_AuthUserIn.Size(m)
}
func (m *AuthUserIn) XXX_DiscardUnknown() {
	xxx_messageInfo_AuthUserIn.DiscardUnknown(m)
}

var xxx_messageInfo_AuthUserIn proto.InternalMessageInfo

func (m *AuthUserIn) GetUserID() uint32 {
	if m != nil {
		return m.UserID
	}
	return 0
}

func (m *AuthUserIn) GetVer() int32 {
	if m != nil {
		return m.Ver
	}
	return 0
}

type AuthCheckIn struct {
	SessKey              string   `protobuf:"bytes,1,opt,name=SessKey,proto3" json:"SessKey,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *AuthCheckIn) Reset()         { *m = AuthCheckIn{} }
func (m *AuthCheckIn) String() string { return proto.CompactTextString(m) }
func (*AuthCheckIn) ProtoMessage()    {}
func (*AuthCheckIn) Descriptor() ([]byte, []int) {
	return fileDescriptor_8bbd6f3875b0e874, []int{2}
}

func (m *AuthCheckIn) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_AuthCheckIn.Unmarshal(m, b)
}
func (m *AuthCheckIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_AuthCheckIn.Marshal(b, m, deterministic)
}
func (m *AuthCheckIn) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AuthCheckIn.Merge(m, src)
}
func (m *AuthCheckIn) XXX_Size() int {
	return xxx_messageInfo_AuthCheckIn.Size(m)
}
func (m *AuthCheckIn) XXX_DiscardUnknown() {
	xxx_messageInfo_AuthCheckIn.DiscardUnknown(m)
}

var xxx_messageInfo_AuthCheckIn proto.InternalMessageInfo

func (m *AuthCheckIn) GetSessKey() string {
	if m != nil {
		return m.SessKey
	}
	return ""
}

type AuthNothing struct {
	Nothing              bool     `protobuf:"varint,1,opt,name=Nothing,proto3" json:"Nothing,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *AuthNothing) Reset()         { *m = AuthNothing{} }
func (m *AuthNothing) String() string { return proto.CompactTextString(m) }
func (*AuthNothing) ProtoMessage()    {}
func (*AuthNothing) Descriptor() ([]byte, []int) {
	return fileDescriptor_8bbd6f3875b0e874, []int{3}
}

func (m *AuthNothing) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_AuthNothing.Unmarshal(m, b)
}
func (m *AuthNothing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_AuthNothing.Marshal(b, m, deterministic)
}
func (m *AuthNothing) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AuthNothing.Merge(m, src)
}
func (m *AuthNothing) XXX_Size() int {
	return xxx_messageInfo_AuthNothing.Size(m)
}
func (m *AuthNothing) XXX_DiscardUnknown() {
	xxx_messageInfo_AuthNothing.DiscardUnknown(m)
}

var xxx_messageInfo_AuthNothing proto.InternalMessageInfo

func (m *AuthNothing) GetNothing() bool {
	if m != nil {
		return m.Nothing
	}
	return false
}

func init() {
	proto.RegisterType((*AuthSession)(nil), "session.AuthSession")
	proto.RegisterType((*AuthUserIn)(nil), "session.AuthUserIn")
	proto.RegisterType((*AuthCheckIn)(nil), "session.AuthCheckIn")
	proto.RegisterType((*AuthNothing)(nil), "session.AuthNothing")
}

func init() { proto.RegisterFile("auth.proto", fileDescriptor_8bbd6f3875b0e874) }

var fileDescriptor_8bbd6f3875b0e874 = []byte{
	// 259 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x2c, 0x2d, 0xc9,
	0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2f, 0x4e, 0x2d, 0x2e, 0xce, 0xcc, 0xcf, 0x53,
	0x72, 0xe7, 0xe2, 0x76, 0x2c, 0x2d, 0xc9, 0x08, 0x86, 0x70, 0x85, 0xf8, 0xb8, 0x98, 0x3c, 0x5d,
	0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x98, 0x3c, 0x5d, 0x84, 0xc4, 0xb8, 0xd8, 0x42, 0x8b,
	0x53, 0x8b, 0x3c, 0x5d, 0x24, 0x98, 0x14, 0x18, 0x35, 0x78, 0x83, 0xa0, 0x3c, 0x21, 0x01, 0x2e,
	0xe6, 0xb0, 0xd4, 0x22, 0x09, 0x66, 0x05, 0x46, 0x0d, 0xd6, 0x20, 0x10, 0x53, 0xc9, 0x8c, 0x8b,
	0x0b, 0x64, 0x10, 0x58, 0x3e, 0x0f, 0x49, 0x1f, 0x23, 0x36, 0x7d, 0x4c, 0x08, 0x7d, 0xea, 0x10,
	0x07, 0x38, 0x67, 0xa4, 0x26, 0x67, 0x7b, 0xe6, 0x09, 0x49, 0x70, 0xb1, 0x83, 0xdc, 0xe2, 0x9d,
	0x5a, 0x09, 0x75, 0x05, 0x8c, 0x0b, 0x53, 0xe8, 0x97, 0x5f, 0x92, 0x91, 0x99, 0x97, 0x0e, 0x52,
	0x08, 0x65, 0x82, 0x15, 0x72, 0x04, 0xc1, 0xb8, 0x46, 0xef, 0x19, 0xb9, 0x58, 0x40, 0x2a, 0x85,
	0x4c, 0xb9, 0x58, 0xc1, 0xc6, 0x0a, 0x89, 0xe8, 0x41, 0xbd, 0xab, 0x87, 0x64, 0x95, 0x14, 0xaa,
	0x28, 0x34, 0x04, 0x94, 0x18, 0x84, 0x4c, 0xb9, 0xd8, 0x9c, 0x8b, 0x52, 0x13, 0x4b, 0x52, 0x85,
	0x84, 0x51, 0x54, 0x40, 0xbc, 0x86, 0x53, 0x9b, 0x1d, 0x17, 0x9f, 0x4b, 0x6a, 0x71, 0x49, 0x51,
	0x7e, 0xa5, 0x73, 0x69, 0x51, 0x51, 0x6a, 0x5e, 0x89, 0x10, 0x56, 0x95, 0x68, 0xfa, 0xa1, 0x8e,
	0x56, 0x62, 0x10, 0xb2, 0xe4, 0xe2, 0x82, 0xea, 0x77, 0xcc, 0xc9, 0x21, 0xc6, 0x6a, 0xb8, 0xd6,
	0x24, 0x36, 0x70, 0xa4, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc4, 0xd0, 0xe5, 0x69, 0xe2,
	0x01, 0x00, 0x00,
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// AuthClient is the client API for Auth service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AuthClient interface {
	Check(ctx context.Context, in *AuthCheckIn, opts ...grpc.CallOption) (*AuthSession, error)
	Create(ctx context.Context, in *AuthUserIn, opts ...grpc.CallOption) (*AuthSession, error)
	DestroyCurrent(ctx context.Context, in *AuthSession, opts ...grpc.CallOption) (*AuthNothing, error)
	DestroyAll(ctx context.Context, in *AuthUserIn, opts ...grpc.CallOption) (*AuthNothing, error)
}

type authClient struct {
	cc *grpc.ClientConn
}

func NewAuthClient(cc *grpc.ClientConn) AuthClient {
	return &authClient{cc}
}

func (c *authClient) Check(ctx context.Context, in *AuthCheckIn, opts ...grpc.CallOption) (*AuthSession, error) {
	out := new(AuthSession)
	err := c.cc.Invoke(ctx, "/session.Auth/Check", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *authClient) Create(ctx context.Context, in *AuthUserIn, opts ...grpc.CallOption) (*AuthSession, error) {
	out := new(AuthSession)
	err := c.cc.Invoke(ctx, "/session.Auth/Create", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *authClient) DestroyCurrent(ctx context.Context, in *AuthSession, opts ...grpc.CallOption) (*AuthNothing, error) {
	out := new(AuthNothing)
	err := c.cc.Invoke(ctx, "/session.Auth/DestroyCurrent", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *authClient) DestroyAll(ctx context.Context, in *AuthUserIn, opts ...grpc.CallOption) (*AuthNothing, error) {
	out := new(AuthNothing)
	err := c.cc.Invoke(ctx, "/session.Auth/DestroyAll", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AuthServer is the server API for Auth service.
type AuthServer interface {
	Check(context.Context, *AuthCheckIn) (*AuthSession, error)
	Create(context.Context, *AuthUserIn) (*AuthSession, error)
	DestroyCurrent(context.Context, *AuthSession) (*AuthNothing, error)
	DestroyAll(context.Context, *AuthUserIn) (*AuthNothing, error)
}

// UnimplementedAuthServer can be embedded to have forward compatible implementations.
type UnimplementedAuthServer struct {
}

func (*UnimplementedAuthServer) Check(ctx context.Context, req *AuthCheckIn) (*AuthSession, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Check not implemented")
}
func (*UnimplementedAuthServer) Create(ctx context.Context, req *AuthUserIn) (*AuthSession, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (*UnimplementedAuthServer) DestroyCurrent(ctx context.Context, req *AuthSession) (*AuthNothing, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DestroyCurrent not implemented")
}
func (*UnimplementedAuthServer) DestroyAll(ctx context.Context, req *AuthUserIn) (*AuthNothing, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DestroyAll not implemented")
}

func RegisterAuthServer(s *grpc.Server, srv AuthServer) {
	s.RegisterService(&_Auth_serviceDesc, srv)
}

func _Auth_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AuthCheckIn)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthServer).Check(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/session.Auth/Check",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthServer).Check(ctx, req.(*AuthCheckIn))
	}
	return interceptor(ctx, in, info, handler)
}

func _Auth_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AuthUserIn)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthServer).Create(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/session.Auth/Create",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthServer).Create(ctx, req.(*AuthUserIn))
	}
	return interceptor(ctx, in, info, handler)
}

func _Auth_DestroyCurrent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AuthSession)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthServer).DestroyCurrent(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/session.Auth/DestroyCurrent",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthServer).DestroyCurrent(ctx, req.(*AuthSession))
	}
	return interceptor(ctx, in, info, handler)
}

func _Auth_DestroyAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AuthUserIn)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthServer).DestroyAll(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/session.Auth/DestroyAll",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthServer).DestroyAll(ctx, req.(*AuthUserIn))
	}
	return interceptor(ctx, in, info, handler)
}

var _Auth_serviceDesc = grpc.ServiceDesc{
	ServiceName: "session.Auth",
	HandlerType: (*AuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Check",
			Handler:    _Auth_Check_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _Auth_Create_Handler,
		},
		{
			MethodName: "DestroyCurrent",
			Handler:    _Auth_DestroyCurrent_Handler,
		},
		{
			MethodName: "DestroyAll",
			Handler:    _Auth_DestroyAll_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth.proto",
}
