authProto

package
v0.0.0-...-352c0ba Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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) Descriptor() ([]byte, []int)

Deprecated: Use SavedUser.ProtoReflect.Descriptor instead.

func (*SavedUser) GetAvatar

func (x *SavedUser) GetAvatar() string

func (*SavedUser) GetBio

func (x *SavedUser) GetBio() string

func (*SavedUser) GetBirthday

func (x *SavedUser) GetBirthday() int64

func (*SavedUser) GetCreatedAt

func (x *SavedUser) GetCreatedAt() int64

func (*SavedUser) GetEmail

func (x *SavedUser) GetEmail() string

func (*SavedUser) GetFacebook

func (x *SavedUser) GetFacebook() string

func (*SavedUser) GetFirstName

func (x *SavedUser) GetFirstName() string

func (*SavedUser) GetId

func (x *SavedUser) GetId() int32

func (*SavedUser) GetInstagram

func (x *SavedUser) GetInstagram() string

func (*SavedUser) GetIsAdmin

func (x *SavedUser) GetIsAdmin() bool

func (*SavedUser) GetLastName

func (x *SavedUser) GetLastName() string

func (*SavedUser) GetTwitter

func (x *SavedUser) GetTwitter() string

func (*SavedUser) GetUpdatedAt

func (x *SavedUser) GetUpdatedAt() int64

func (*SavedUser) GetUsername

func (x *SavedUser) GetUsername() string

func (*SavedUser) ProtoMessage

func (*SavedUser) ProtoMessage()

func (*SavedUser) ProtoReflect

func (x *SavedUser) ProtoReflect() protoreflect.Message

func (*SavedUser) Reset

func (x *SavedUser) Reset()

func (*SavedUser) String

func (x *SavedUser) String() string

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer can be embedded to have forward compatible implementations.

func (*UnimplementedAuthServer) CheckToken

func (*UnimplementedAuthServer) Login

func (*UnimplementedAuthServer) Register

Jump to

Keyboard shortcuts

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