| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // source: auth.proto
- package pb
- 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
- type AuthStatusRequest struct {
- }
- func (m *AuthStatusRequest) Reset() { *m = AuthStatusRequest{} }
- func (m *AuthStatusRequest) String() string { return proto.CompactTextString(m) }
- func (*AuthStatusRequest) ProtoMessage() {}
- func (*AuthStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
- type AuthAuthenticateRequest struct {
- Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
- Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
- }
- func (m *AuthAuthenticateRequest) Reset() { *m = AuthAuthenticateRequest{} }
- func (m *AuthAuthenticateRequest) String() string { return proto.CompactTextString(m) }
- func (*AuthAuthenticateRequest) ProtoMessage() {}
- func (*AuthAuthenticateRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
- func (m *AuthAuthenticateRequest) GetUsername() string {
- if m != nil {
- return m.Username
- }
- return ""
- }
- func (m *AuthAuthenticateRequest) GetPassword() string {
- if m != nil {
- return m.Password
- }
- return ""
- }
- type AuthStatusResponse struct {
- IsAuthenticated bool `protobuf:"varint,1,opt,name=is_authenticated,json=isAuthenticated" json:"is_authenticated,omitempty"`
- User *UserResponse_User `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
- }
- func (m *AuthStatusResponse) Reset() { *m = AuthStatusResponse{} }
- func (m *AuthStatusResponse) String() string { return proto.CompactTextString(m) }
- func (*AuthStatusResponse) ProtoMessage() {}
- func (*AuthStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{2} }
- func (m *AuthStatusResponse) GetIsAuthenticated() bool {
- if m != nil {
- return m.IsAuthenticated
- }
- return false
- }
- func (m *AuthStatusResponse) GetUser() *UserResponse_User {
- if m != nil {
- return m.User
- }
- return nil
- }
- type AuthAuthenticateResponse struct {
- Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
- }
- func (m *AuthAuthenticateResponse) Reset() { *m = AuthAuthenticateResponse{} }
- func (m *AuthAuthenticateResponse) String() string { return proto.CompactTextString(m) }
- func (*AuthAuthenticateResponse) ProtoMessage() {}
- func (*AuthAuthenticateResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} }
- func (m *AuthAuthenticateResponse) GetToken() string {
- if m != nil {
- return m.Token
- }
- return ""
- }
- func init() {
- proto.RegisterType((*AuthStatusRequest)(nil), "pb.AuthStatusRequest")
- proto.RegisterType((*AuthAuthenticateRequest)(nil), "pb.AuthAuthenticateRequest")
- proto.RegisterType((*AuthStatusResponse)(nil), "pb.AuthStatusResponse")
- proto.RegisterType((*AuthAuthenticateResponse)(nil), "pb.AuthAuthenticateResponse")
- }
- // 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 AuthService service
- type AuthServiceClient interface {
- Status(ctx context.Context, in *AuthStatusRequest, opts ...grpc.CallOption) (*AuthStatusResponse, error)
- Authenticate(ctx context.Context, in *AuthAuthenticateRequest, opts ...grpc.CallOption) (*AuthAuthenticateResponse, error)
- }
- type authServiceClient struct {
- cc *grpc.ClientConn
- }
- func NewAuthServiceClient(cc *grpc.ClientConn) AuthServiceClient {
- return &authServiceClient{cc}
- }
- func (c *authServiceClient) Status(ctx context.Context, in *AuthStatusRequest, opts ...grpc.CallOption) (*AuthStatusResponse, error) {
- out := new(AuthStatusResponse)
- err := grpc.Invoke(ctx, "/pb.AuthService/Status", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *authServiceClient) Authenticate(ctx context.Context, in *AuthAuthenticateRequest, opts ...grpc.CallOption) (*AuthAuthenticateResponse, error) {
- out := new(AuthAuthenticateResponse)
- err := grpc.Invoke(ctx, "/pb.AuthService/Authenticate", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // Server API for AuthService service
- type AuthServiceServer interface {
- Status(context.Context, *AuthStatusRequest) (*AuthStatusResponse, error)
- Authenticate(context.Context, *AuthAuthenticateRequest) (*AuthAuthenticateResponse, error)
- }
- func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer) {
- s.RegisterService(&_AuthService_serviceDesc, srv)
- }
- func _AuthService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(AuthStatusRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(AuthServiceServer).Status(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.AuthService/Status",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AuthServiceServer).Status(ctx, req.(*AuthStatusRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _AuthService_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(AuthAuthenticateRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(AuthServiceServer).Authenticate(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.AuthService/Authenticate",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AuthServiceServer).Authenticate(ctx, req.(*AuthAuthenticateRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _AuthService_serviceDesc = grpc.ServiceDesc{
- ServiceName: "pb.AuthService",
- HandlerType: (*AuthServiceServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "Status",
- Handler: _AuthService_Status_Handler,
- },
- {
- MethodName: "Authenticate",
- Handler: _AuthService_Authenticate_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "auth.proto",
- }
- func init() { proto.RegisterFile("auth.proto", fileDescriptor3) }
- var fileDescriptor3 = []byte{
- // 306 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xc1, 0x4e, 0x32, 0x31,
- 0x14, 0x85, 0x33, 0xe4, 0xff, 0x09, 0x5e, 0x4c, 0x90, 0x2a, 0x42, 0x2a, 0x0b, 0xd2, 0x95, 0xb8,
- 0x60, 0x14, 0x77, 0xee, 0x7c, 0x03, 0xc5, 0xb8, 0x36, 0x85, 0xb9, 0x81, 0x8a, 0xb6, 0x75, 0x6e,
- 0x07, 0xf7, 0xbe, 0x82, 0xaf, 0xe5, 0xce, 0x57, 0xf0, 0x41, 0x4c, 0xdb, 0x19, 0x32, 0x11, 0x16,
- 0x93, 0xcc, 0xe9, 0xb9, 0x73, 0xbe, 0x33, 0xb7, 0x00, 0xb2, 0x70, 0xab, 0x89, 0xcd, 0x8d, 0x33,
- 0xac, 0x61, 0xe7, 0x7c, 0xb8, 0x34, 0x66, 0xf9, 0x82, 0xa9, 0xb4, 0x2a, 0x95, 0x5a, 0x1b, 0x27,
- 0x9d, 0x32, 0x9a, 0xe2, 0x04, 0x87, 0x82, 0x30, 0x8f, 0xef, 0xe2, 0x18, 0xba, 0xb7, 0x85, 0x5b,
- 0x3d, 0x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