auth_grpc

package
v0.0.0-...-945c817 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAuthHandlerServer

func RegisterAuthHandlerServer(s *grpc.Server, srv AuthHandlerServer)

Types

type AuthHandlerClient

type AuthHandlerClient interface {
	CreateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error)
	VerifyUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserID, error)
}

AuthHandlerClient is the client API for AuthHandler service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAuthHandlerClient

func NewAuthHandlerClient(cc *grpc.ClientConn) AuthHandlerClient

type AuthHandlerServer

type AuthHandlerServer interface {
	CreateUser(context.Context, *User) (*User, error)
	VerifyUser(context.Context, *UserRequest) (*UserID, error)
}

AuthHandlerServer is the server API for AuthHandler service.

type HttpError

type HttpError struct {
	HttpCode             int32    `protobuf:"varint,1,opt,name=HttpCode,proto3" json:"HttpCode,omitempty"`
	LogError             string   `protobuf:"bytes,2,opt,name=LogError,proto3" json:"LogError,omitempty"`
	ClientError          string   `protobuf:"bytes,3,opt,name=ClientError,proto3" json:"ClientError,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*HttpError) Descriptor

func (*HttpError) Descriptor() ([]byte, []int)

func (*HttpError) GetClientError

func (m *HttpError) GetClientError() string

func (*HttpError) GetHttpCode

func (m *HttpError) GetHttpCode() int32

func (*HttpError) GetLogError

func (m *HttpError) GetLogError() string

func (*HttpError) ProtoMessage

func (*HttpError) ProtoMessage()

func (*HttpError) Reset

func (m *HttpError) Reset()

func (*HttpError) String

func (m *HttpError) String() string

func (*HttpError) XXX_DiscardUnknown

func (m *HttpError) XXX_DiscardUnknown()

func (*HttpError) XXX_Marshal

func (m *HttpError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HttpError) XXX_Merge

func (m *HttpError) XXX_Merge(src proto.Message)

func (*HttpError) XXX_Size

func (m *HttpError) XXX_Size() int

func (*HttpError) XXX_Unmarshal

func (m *HttpError) XXX_Unmarshal(b []byte) error

type UnimplementedAuthHandlerServer

type UnimplementedAuthHandlerServer struct {
}

UnimplementedAuthHandlerServer can be embedded to have forward compatible implementations.

func (*UnimplementedAuthHandlerServer) CreateUser

func (*UnimplementedAuthHandlerServer) CreateUser(ctx context.Context, req *User) (*User, error)

func (*UnimplementedAuthHandlerServer) VerifyUser

type User

type User struct {
	ID                   int64      `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	FirstName            string     `protobuf:"bytes,2,opt,name=FirstName,proto3" json:"FirstName,omitempty"`
	SecondName           string     `protobuf:"bytes,3,opt,name=SecondName,proto3" json:"SecondName,omitempty"`
	UserName             string     `protobuf:"bytes,4,opt,name=UserName,proto3" json:"UserName,omitempty"`
	Email                string     `protobuf:"bytes,5,opt,name=Email,proto3" json:"Email,omitempty"`
	Password             string     `protobuf:"bytes,6,opt,name=Password,proto3" json:"Password,omitempty"`
	EncryptPassword      string     `protobuf:"bytes,7,opt,name=EncryptPassword,proto3" json:"EncryptPassword,omitempty"`
	UserType             string     `protobuf:"bytes,8,opt,name=UserType,proto3" json:"UserType,omitempty"`
	FreelancerId         int64      `protobuf:"varint,9,opt,name=FreelancerId,proto3" json:"FreelancerId,omitempty"`
	HireManagerId        int64      `protobuf:"varint,10,opt,name=HireManagerId,proto3" json:"HireManagerId,omitempty"`
	CompanyId            int64      `protobuf:"varint,11,opt,name=CompanyId,proto3" json:"CompanyId,omitempty"`
	Avatar               []byte     `protobuf:"bytes,12,opt,name=Avatar,proto3" json:"Avatar,omitempty"`
	Err                  *HttpError `protobuf:"bytes,13,opt,name=Err,proto3" json:"Err,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*User) Descriptor

func (*User) Descriptor() ([]byte, []int)

func (*User) GetAvatar

func (m *User) GetAvatar() []byte

func (*User) GetCompanyId

func (m *User) GetCompanyId() int64

func (*User) GetEmail

func (m *User) GetEmail() string

func (*User) GetEncryptPassword

func (m *User) GetEncryptPassword() string

func (*User) GetErr

func (m *User) GetErr() *HttpError

func (*User) GetFirstName

func (m *User) GetFirstName() string

func (*User) GetFreelancerId

func (m *User) GetFreelancerId() int64

func (*User) GetHireManagerId

func (m *User) GetHireManagerId() int64

func (*User) GetID

func (m *User) GetID() int64

func (*User) GetPassword

func (m *User) GetPassword() string

func (*User) GetSecondName

func (m *User) GetSecondName() string

func (*User) GetUserName

func (m *User) GetUserName() string

func (*User) GetUserType

func (m *User) GetUserType() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

func (*User) XXX_DiscardUnknown

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal

func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*User) XXX_Merge

func (m *User) XXX_Merge(src proto.Message)

func (*User) XXX_Size

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal

func (m *User) XXX_Unmarshal(b []byte) error

type UserID

type UserID struct {
	ID                   int64      `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Err                  *HttpError `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*UserID) Descriptor

func (*UserID) Descriptor() ([]byte, []int)

func (*UserID) GetErr

func (m *UserID) GetErr() *HttpError

func (*UserID) GetID

func (m *UserID) GetID() int64

func (*UserID) ProtoMessage

func (*UserID) ProtoMessage()

func (*UserID) Reset

func (m *UserID) Reset()

func (*UserID) String

func (m *UserID) String() string

func (*UserID) XXX_DiscardUnknown

func (m *UserID) XXX_DiscardUnknown()

func (*UserID) XXX_Marshal

func (m *UserID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserID) XXX_Merge

func (m *UserID) XXX_Merge(src proto.Message)

func (*UserID) XXX_Size

func (m *UserID) XXX_Size() int

func (*UserID) XXX_Unmarshal

func (m *UserID) XXX_Unmarshal(b []byte) error

type UserRequest

type UserRequest struct {
	Email                string   `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserRequest) Descriptor

func (*UserRequest) Descriptor() ([]byte, []int)

func (*UserRequest) GetEmail

func (m *UserRequest) GetEmail() string

func (*UserRequest) GetPassword

func (m *UserRequest) GetPassword() string

func (*UserRequest) ProtoMessage

func (*UserRequest) ProtoMessage()

func (*UserRequest) Reset

func (m *UserRequest) Reset()

func (*UserRequest) String

func (m *UserRequest) String() string

func (*UserRequest) XXX_DiscardUnknown

func (m *UserRequest) XXX_DiscardUnknown()

func (*UserRequest) XXX_Marshal

func (m *UserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserRequest) XXX_Merge

func (m *UserRequest) XXX_Merge(src proto.Message)

func (*UserRequest) XXX_Size

func (m *UserRequest) XXX_Size() int

func (*UserRequest) XXX_Unmarshal

func (m *UserRequest) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL