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

/*
Package session is a generated protocol buffer package.

It is generated from these files:
	session.proto

It has these top-level messages:
	SessionID
	Session
	Nothing
*/
package session

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// 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 SessionID struct {
	ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
}

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

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

type Session struct {
	Login     string `protobuf:"bytes,1,opt,name=login" json:"login,omitempty"`
	Useragent string `protobuf:"bytes,2,opt,name=useragent" json:"useragent,omitempty"`
}

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

func (m *Session) GetLogin() string {
	if m != nil {
		return m.Login
	}
	return ""
}

func (m *Session) GetUseragent() string {
	if m != nil {
		return m.Useragent
	}
	return ""
}

type Nothing struct {
	Dummy bool `protobuf:"varint,1,opt,name=dummy" json:"dummy,omitempty"`
}

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

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

func init() {
	proto.RegisterType((*SessionID)(nil), "session.SessionID")
	proto.RegisterType((*Session)(nil), "session.Session")
	proto.RegisterType((*Nothing)(nil), "session.Nothing")
}

// 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

// Client API for AuthChecker service

type AuthCheckerClient interface {
	Create(ctx context.Context, in *Session, opts ...grpc.CallOption) (*SessionID, error)
	Check(ctx context.Context, in *SessionID, opts ...grpc.CallOption) (*Session, error)
	Delete(ctx context.Context, in *SessionID, opts ...grpc.CallOption) (*Nothing, error)
}

type authCheckerClient struct {
	cc *grpc.ClientConn
}

func NewAuthCheckerClient(cc *grpc.ClientConn) AuthCheckerClient {
	return &authCheckerClient{cc}
}

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

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

func (c *authCheckerClient) Delete(ctx context.Context, in *SessionID, opts ...grpc.CallOption) (*Nothing, error) {
	out := new(Nothing)
	err := grpc.Invoke(ctx, "/session.AuthChecker/Delete", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for AuthChecker service

type AuthCheckerServer interface {
	Create(context.Context, *Session) (*SessionID, error)
	Check(context.Context, *SessionID) (*Session, error)
	Delete(context.Context, *SessionID) (*Nothing, error)
}

func RegisterAuthCheckerServer(s *grpc.Server, srv AuthCheckerServer) {
	s.RegisterService(&_AuthChecker_serviceDesc, srv)
}

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

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

func _AuthChecker_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SessionID)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthCheckerServer).Delete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/session.AuthChecker/Delete",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthCheckerServer).Delete(ctx, req.(*SessionID))
	}
	return interceptor(ctx, in, info, handler)
}

var _AuthChecker_serviceDesc = grpc.ServiceDesc{
	ServiceName: "session.AuthChecker",
	HandlerType: (*AuthCheckerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _AuthChecker_Create_Handler,
		},
		{
			MethodName: "Check",
			Handler:    _AuthChecker_Check_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _AuthChecker_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "session.proto",
}

func init() { proto.RegisterFile("session.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 274 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x4e, 0x2d, 0x2e,
	0xce, 0xcc, 0xcf, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x64, 0xd2,
	0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x13, 0x0b, 0x32, 0xf5, 0x13, 0xf3, 0xf2, 0xf2, 0x4b, 0x12,
	0x4b, 0x32, 0xf3, 0xf3, 0x8a, 0x21, 0xca, 0x94, 0xa4, 0xb9, 0x38, 0x83, 0x21, 0x0a, 0x3d, 0x5d,
	0x84, 0xf8, 0xb8, 0x98, 0x3c, 0x5d, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x98, 0x3c, 0x5d,
	0x94, 0x6c, 0xb9, 0xd8, 0xa1, 0x92, 0x42, 0x22, 0x5c, 0xac, 0x39, 0xf9, 0xe9, 0x99, 0x79, 0x50,
	0x59, 0x08, 0x47, 0x48, 0x86, 0x8b, 0xb3, 0xb4, 0x38, 0xb5, 0x28, 0x31, 0x3d, 0x35, 0xaf, 0x44,
	0x82, 0x09, 0x2c, 0x83, 0x10, 0x50, 0x92, 0xe7, 0x62, 0xf7, 0xcb, 0x2f, 0xc9, 0xc8, 0xcc, 0x4b,
	0x07, 0x69, 0x4f, 0x29, 0xcd, 0xcd, 0xad, 0x04, 0x6b, 0xe7, 0x08, 0x82, 0x70, 0x8c, 0x7e, 0x31,
	0x72, 0x71, 0x3b, 0x96, 0x96, 0x64, 0x38, 0x67, 0xa4, 0x26, 0x67, 0xa7, 0x16, 0x09, 0xf9, 0x72,
	0xb1, 0x39, 0x17, 0xa5, 0x26, 0x96, 0xa4, 0x0a, 0x09, 0xe8, 0xc1, 0x7c, 0x03, 0x75, 0x80, 0x94,
	0x10, 0xba, 0x88, 0xa7, 0x8b, 0x92, 0x6c, 0xd3, 0xe5, 0x27, 0x93, 0x99, 0xc4, 0x95, 0x84, 0xf4,
	0xcb, 0x0c, 0xf5, 0xa1, 0xd2, 0xfa, 0xc9, 0x60, 0x13, 0xac, 0x18, 0xb5, 0x84, 0x7c, 0xb9, 0x58,
	0xc1, 0x26, 0x0b, 0x61, 0xd1, 0x2b, 0x85, 0x61, 0x83, 0x92, 0x1c, 0xd8, 0x34, 0x09, 0x21, 0x31,
	0x14, 0xd3, 0x40, 0x06, 0xe8, 0x57, 0x7b, 0xba, 0xd4, 0x82, 0x5c, 0xe7, 0x92, 0x9a, 0x93, 0x5a,
	0x92, 0x4a, 0xc0, 0x3c, 0xa8, 0x9f, 0xb1, 0xbb, 0x2e, 0x05, 0x6c, 0x82, 0x15, 0xa3, 0x56, 0x12,
	0x1b, 0x38, 0x02, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xba, 0x4d, 0x51, 0xb7, 0xb8, 0x01,
	0x00, 0x00,
}
