Documentation ¶
Index ¶
- Variables
- func CreateUser(ctx context.Context, in *User) (err error)
- func RegisterAuthServer(s *grpc.Server, srv AuthServer)
- type AuthClient
- type AuthServer
- type Credentials
- type Empty
- type UnimplementedAuthServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreatedAt() string
- func (x *User) GetEmail() string
- func (x *User) GetId() int64
- func (x *User) GetName() string
- func (x *User) GetPassw() string
- func (x *User) GetPermission() *UserLevel
- func (x *User) GetToken() string
- func (x *User) GetUpdatedAt() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserLevel
Constants ¶
This section is empty.
Variables ¶
View Source
var File_protos_auth_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s *grpc.Server, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { CreateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*Empty, error) Login(ctx context.Context, in *Credentials, opts ...grpc.CallOption) (*User, 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 { CreateUser(context.Context, *User) (*Empty, error) Login(context.Context, *Credentials) (*User, error) }
AuthServer is the server API for Auth service.
type Credentials ¶
type Credentials struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Passw string `protobuf:"bytes,2,opt,name=passw,proto3" json:"passw,omitempty"` // contains filtered or unexported fields }
func (*Credentials) Descriptor
deprecated
func (*Credentials) Descriptor() ([]byte, []int)
Deprecated: Use Credentials.ProtoReflect.Descriptor instead.
func (*Credentials) GetEmail ¶
func (x *Credentials) GetEmail() string
func (*Credentials) GetPassw ¶
func (x *Credentials) GetPassw() string
func (*Credentials) ProtoMessage ¶
func (*Credentials) ProtoMessage()
func (*Credentials) ProtoReflect ¶
func (x *Credentials) ProtoReflect() protoreflect.Message
func (*Credentials) Reset ¶
func (x *Credentials) Reset()
func (*Credentials) String ¶
func (x *Credentials) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer can be embedded to have forward compatible implementations.
func (*UnimplementedAuthServer) CreateUser ¶
func (*UnimplementedAuthServer) Login ¶
func (*UnimplementedAuthServer) Login(context.Context, *Credentials) (*User, error)
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Passw string `protobuf:"bytes,4,opt,name=passw,proto3" json:"passw,omitempty"` Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` Permission *UserLevel `protobuf:"bytes,6,opt,name=permission,proto3" json:"permission,omitempty"` CreatedAt string `protobuf:"bytes,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"` UpdatedAt string `protobuf:"bytes,8,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (*User) GetPermission ¶
func (*User) GetUpdatedAt ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserLevel ¶
type UserLevel struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*UserLevel) Descriptor
deprecated
func (*UserLevel) ProtoMessage ¶
func (*UserLevel) ProtoMessage()
func (*UserLevel) ProtoReflect ¶
func (x *UserLevel) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.