Documentation ¶
Index ¶
- Variables
- func RegisterAuthServer(s *grpc.Server, srv AuthServer)
- type AuthClient
- type AuthServer
- type CheckTokenRequest
- type CheckTokenResponse
- func (*CheckTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CheckTokenResponse) GetEmail() string
- func (x *CheckTokenResponse) GetIsAdmin() bool
- func (x *CheckTokenResponse) GetValid() bool
- func (*CheckTokenResponse) ProtoMessage()
- func (x *CheckTokenResponse) ProtoReflect() protoreflect.Message
- func (x *CheckTokenResponse) Reset()
- func (x *CheckTokenResponse) String() string
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetEmail() string
- func (x *LoginRequest) GetPassword() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResponse) GetToken() string
- func (x *LoginResponse) GetUser() *SavedUser
- func (*LoginResponse) ProtoMessage()
- func (x *LoginResponse) ProtoReflect() protoreflect.Message
- func (x *LoginResponse) Reset()
- func (x *LoginResponse) String() string
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetEmail() string
- func (x *RegisterRequest) GetPassword() string
- func (x *RegisterRequest) GetUsername() string
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type RegisterResponse
- func (*RegisterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterResponse) GetToken() string
- func (x *RegisterResponse) GetUser() *SavedUser
- func (*RegisterResponse) ProtoMessage()
- func (x *RegisterResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterResponse) Reset()
- func (x *RegisterResponse) String() string
- type SavedUser
- func (*SavedUser) Descriptor() ([]byte, []int)deprecated
- func (x *SavedUser) GetAvatar() string
- func (x *SavedUser) GetBio() string
- func (x *SavedUser) GetBirthday() int64
- func (x *SavedUser) GetCreatedAt() int64
- func (x *SavedUser) GetEmail() string
- func (x *SavedUser) GetFacebook() string
- func (x *SavedUser) GetFirstName() string
- func (x *SavedUser) GetId() int32
- func (x *SavedUser) GetInstagram() string
- func (x *SavedUser) GetIsAdmin() bool
- func (x *SavedUser) GetLastName() string
- func (x *SavedUser) GetTwitter() string
- func (x *SavedUser) GetUpdatedAt() int64
- func (x *SavedUser) GetUsername() string
- func (*SavedUser) ProtoMessage()
- func (x *SavedUser) ProtoReflect() protoreflect.Message
- func (x *SavedUser) Reset()
- func (x *SavedUser) String() string
- type UnimplementedAuthServer
- func (*UnimplementedAuthServer) CheckToken(context.Context, *CheckTokenRequest) (*CheckTokenResponse, error)
- func (*UnimplementedAuthServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
- func (*UnimplementedAuthServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
Constants ¶
This section is empty.
Variables ¶
var File_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s *grpc.Server, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) CheckToken(ctx context.Context, in *CheckTokenRequest, opts ...grpc.CallOption) (*CheckTokenResponse, error) }
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.
func NewAuthClient ¶
func NewAuthClient(cc grpc.ClientConnInterface) AuthClient
type AuthServer ¶
type AuthServer interface { Register(context.Context, *RegisterRequest) (*RegisterResponse, error) Login(context.Context, *LoginRequest) (*LoginResponse, error) CheckToken(context.Context, *CheckTokenRequest) (*CheckTokenResponse, error) }
AuthServer is the server API for Auth service.
type CheckTokenRequest ¶
type CheckTokenRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*CheckTokenRequest) Descriptor
deprecated
func (*CheckTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckTokenRequest.ProtoReflect.Descriptor instead.
func (*CheckTokenRequest) GetToken ¶
func (x *CheckTokenRequest) GetToken() string
func (*CheckTokenRequest) ProtoMessage ¶
func (*CheckTokenRequest) ProtoMessage()
func (*CheckTokenRequest) ProtoReflect ¶
func (x *CheckTokenRequest) ProtoReflect() protoreflect.Message
func (*CheckTokenRequest) Reset ¶
func (x *CheckTokenRequest) Reset()
func (*CheckTokenRequest) String ¶
func (x *CheckTokenRequest) String() string
type CheckTokenResponse ¶
type CheckTokenResponse struct { Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` IsAdmin bool `protobuf:"varint,2,opt,name=is_admin,json=isAdmin,proto3" json:"is_admin,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*CheckTokenResponse) Descriptor
deprecated
func (*CheckTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use CheckTokenResponse.ProtoReflect.Descriptor instead.
func (*CheckTokenResponse) GetEmail ¶
func (x *CheckTokenResponse) GetEmail() string
func (*CheckTokenResponse) GetIsAdmin ¶
func (x *CheckTokenResponse) GetIsAdmin() bool
func (*CheckTokenResponse) GetValid ¶
func (x *CheckTokenResponse) GetValid() bool
func (*CheckTokenResponse) ProtoMessage ¶
func (*CheckTokenResponse) ProtoMessage()
func (*CheckTokenResponse) ProtoReflect ¶
func (x *CheckTokenResponse) ProtoReflect() protoreflect.Message
func (*CheckTokenResponse) Reset ¶
func (x *CheckTokenResponse) Reset()
func (*CheckTokenResponse) String ¶
func (x *CheckTokenResponse) String() string
type LoginRequest ¶
type LoginRequest 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"` // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetEmail ¶
func (x *LoginRequest) GetEmail() string
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type LoginResponse ¶
type LoginResponse struct { User *SavedUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetToken ¶
func (x *LoginResponse) GetToken() string
func (*LoginResponse) GetUser ¶
func (x *LoginResponse) GetUser() *SavedUser
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type RegisterRequest ¶
type RegisterRequest 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"` Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetEmail ¶
func (x *RegisterRequest) GetEmail() string
func (*RegisterRequest) GetPassword ¶
func (x *RegisterRequest) GetPassword() string
func (*RegisterRequest) GetUsername ¶
func (x *RegisterRequest) GetUsername() string
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct { User *SavedUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) GetToken ¶
func (x *RegisterResponse) GetToken() string
func (*RegisterResponse) GetUser ¶
func (x *RegisterResponse) GetUser() *SavedUser
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type SavedUser ¶
type SavedUser struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` FirstName string `protobuf:"bytes,4,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,5,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` Avatar string `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"` Birthday int64 `protobuf:"varint,7,opt,name=birthday,proto3" json:"birthday,omitempty"` Bio string `protobuf:"bytes,8,opt,name=bio,proto3" json:"bio,omitempty"` Facebook string `protobuf:"bytes,9,opt,name=facebook,proto3" json:"facebook,omitempty"` Instagram string `protobuf:"bytes,10,opt,name=instagram,proto3" json:"instagram,omitempty"` Twitter string `protobuf:"bytes,11,opt,name=twitter,proto3" json:"twitter,omitempty"` IsAdmin bool `protobuf:"varint,12,opt,name=is_admin,json=isAdmin,proto3" json:"is_admin,omitempty"` CreatedAt int64 `protobuf:"varint,13,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt int64 `protobuf:"varint,14,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*SavedUser) Descriptor
deprecated
func (*SavedUser) GetBirthday ¶
func (*SavedUser) GetCreatedAt ¶
func (*SavedUser) GetFacebook ¶
func (*SavedUser) GetFirstName ¶
func (*SavedUser) GetInstagram ¶
func (*SavedUser) GetIsAdmin ¶
func (*SavedUser) GetLastName ¶
func (*SavedUser) GetTwitter ¶
func (*SavedUser) GetUpdatedAt ¶
func (*SavedUser) GetUsername ¶
func (*SavedUser) ProtoMessage ¶
func (*SavedUser) ProtoMessage()
func (*SavedUser) ProtoReflect ¶
func (x *SavedUser) ProtoReflect() protoreflect.Message
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer can be embedded to have forward compatible implementations.
func (*UnimplementedAuthServer) CheckToken ¶
func (*UnimplementedAuthServer) CheckToken(context.Context, *CheckTokenRequest) (*CheckTokenResponse, error)
func (*UnimplementedAuthServer) Login ¶
func (*UnimplementedAuthServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
func (*UnimplementedAuthServer) Register ¶
func (*UnimplementedAuthServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)