proto

package
v0.0.0-...-704a905 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_user_proto_user_proto protoreflect.FileDescriptor
View Source
var Profile_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.Profile",
	HandlerType: (*ProfileServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Profile_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _Profile_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Profile_Delete_Handler,
		},
		{
			MethodName: "GetById",
			Handler:    _Profile_GetById_Handler,
		},
		{
			MethodName: "GetByUsername",
			Handler:    _Profile_GetByUsername_Handler,
		},
		{
			MethodName: "GetByEmail",
			Handler:    _Profile_GetByEmail_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user/proto/user.proto",
}

Profile_ServiceDesc is the grpc.ServiceDesc for Profile service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterProfileServer

func RegisterProfileServer(s grpc.ServiceRegistrar, srv ProfileServer)

Types

type Email

type Email struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*Email) Descriptor deprecated

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

Deprecated: Use Email.ProtoReflect.Descriptor instead.

func (*Email) GetEmail

func (x *Email) GetEmail() string

func (*Email) ProtoMessage

func (*Email) ProtoMessage()

func (*Email) ProtoReflect

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

func (*Email) Reset

func (x *Email) Reset()

func (*Email) String

func (x *Email) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type ProfileClient

type ProfileClient interface {
	Create(ctx context.Context, in *User, opts ...grpc.CallOption) (*Empty, error)
	Update(ctx context.Context, in *User, opts ...grpc.CallOption) (*Empty, error)
	Delete(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*Empty, error)
	GetById(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*User, error)
	GetByUsername(ctx context.Context, in *Username, opts ...grpc.CallOption) (*User, error)
	GetByEmail(ctx context.Context, in *Email, opts ...grpc.CallOption) (*User, error)
}

ProfileClient is the client API for Profile service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewProfileClient

func NewProfileClient(cc grpc.ClientConnInterface) ProfileClient

type ProfileServer

type ProfileServer interface {
	Create(context.Context, *User) (*Empty, error)
	Update(context.Context, *User) (*Empty, error)
	Delete(context.Context, *UserId) (*Empty, error)
	GetById(context.Context, *UserId) (*User, error)
	GetByUsername(context.Context, *Username) (*User, error)
	GetByEmail(context.Context, *Email) (*User, error)
	// contains filtered or unexported methods
}

ProfileServer is the server API for Profile service. All implementations must embed UnimplementedProfileServer for forward compatibility

type UnimplementedProfileServer

type UnimplementedProfileServer struct {
}

UnimplementedProfileServer must be embedded to have forward compatible implementations.

func (UnimplementedProfileServer) Create

func (UnimplementedProfileServer) Delete

func (UnimplementedProfileServer) GetByEmail

func (UnimplementedProfileServer) GetById

func (UnimplementedProfileServer) GetByUsername

func (UnimplementedProfileServer) Update

type UnsafeProfileServer

type UnsafeProfileServer interface {
	// contains filtered or unexported methods
}

UnsafeProfileServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProfileServer will result in compilation errors.

type User

type User struct {
	UserId         uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_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"`
	Password       string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	Avatar         string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"`
	CountFollowing int64  `protobuf:"varint,6,opt,name=count_following,json=countFollowing,proto3" json:"count_following,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAvatar

func (x *User) GetAvatar() string

func (*User) GetCountFollowing

func (x *User) GetCountFollowing() int64

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetUserId

func (x *User) GetUserId() uint64

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserId

type UserId struct {
	UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*UserId) Descriptor deprecated

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

Deprecated: Use UserId.ProtoReflect.Descriptor instead.

func (*UserId) GetUserId

func (x *UserId) GetUserId() uint64

func (*UserId) ProtoMessage

func (*UserId) ProtoMessage()

func (*UserId) ProtoReflect

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

func (*UserId) Reset

func (x *UserId) Reset()

func (*UserId) String

func (x *UserId) String() string

type Username

type Username struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*Username) Descriptor deprecated

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

Deprecated: Use Username.ProtoReflect.Descriptor instead.

func (*Username) GetUsername

func (x *Username) GetUsername() string

func (*Username) ProtoMessage

func (*Username) ProtoMessage()

func (*Username) ProtoReflect

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

func (*Username) Reset

func (x *Username) Reset()

func (*Username) String

func (x *Username) String() string

Jump to

Keyboard shortcuts

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