socialnetwork_pb

package
v0.0.0-...-bf8641f Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Auth_Login_FullMethodName  = "/socialnetwork.Auth/Login"
	Auth_SignUp_FullMethodName = "/socialnetwork.Auth/SignUp"
)
View Source
const (
	FollowService_FollowUser_FullMethodName   = "/socialnetwork.FollowService/FollowUser"
	FollowService_UnfollowUser_FullMethodName = "/socialnetwork.FollowService/UnfollowUser"
	FollowService_GetFollowing_FullMethodName = "/socialnetwork.FollowService/GetFollowing"
)
View Source
const (
	PostService_CreatePost_FullMethodName   = "/socialnetwork.PostService/CreatePost"
	PostService_GetPost_FullMethodName      = "/socialnetwork.PostService/GetPost"
	PostService_Repost_FullMethodName       = "/socialnetwork.PostService/Repost"
	PostService_DeletePost_FullMethodName   = "/socialnetwork.PostService/DeletePost"
	PostService_GetUserPosts_FullMethodName = "/socialnetwork.PostService/GetUserPosts"
)
View Source
const (
	UserService_GetUser_FullMethodName  = "/socialnetwork.UserService/GetUser"
	UserService_EditUser_FullMethodName = "/socialnetwork.UserService/EditUser"
)

Variables

View Source
var Auth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "socialnetwork.Auth",
	HandlerType: (*AuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _Auth_Login_Handler,
		},
		{
			MethodName: "SignUp",
			Handler:    _Auth_SignUp_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/services/proto/auth_service.proto",
}

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

View Source
var File_internal_services_proto_auth_service_proto protoreflect.FileDescriptor
View Source
var File_internal_services_proto_db_models_proto protoreflect.FileDescriptor
View Source
var File_internal_services_proto_follow_service_proto protoreflect.FileDescriptor
View Source
var File_internal_services_proto_posts_service_proto protoreflect.FileDescriptor
View Source
var File_internal_services_proto_users_service_proto protoreflect.FileDescriptor
View Source
var FollowService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "socialnetwork.FollowService",
	HandlerType: (*FollowServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "FollowUser",
			Handler:    _FollowService_FollowUser_Handler,
		},
		{
			MethodName: "UnfollowUser",
			Handler:    _FollowService_UnfollowUser_Handler,
		},
		{
			MethodName: "GetFollowing",
			Handler:    _FollowService_GetFollowing_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/services/proto/follow_service.proto",
}

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

View Source
var PostService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "socialnetwork.PostService",
	HandlerType: (*PostServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreatePost",
			Handler:    _PostService_CreatePost_Handler,
		},
		{
			MethodName: "GetPost",
			Handler:    _PostService_GetPost_Handler,
		},
		{
			MethodName: "Repost",
			Handler:    _PostService_Repost_Handler,
		},
		{
			MethodName: "DeletePost",
			Handler:    _PostService_DeletePost_Handler,
		},
		{
			MethodName: "GetUserPosts",
			Handler:    _PostService_GetUserPosts_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/services/proto/posts_service.proto",
}

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

View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "socialnetwork.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUser",
			Handler:    _UserService_GetUser_Handler,
		},
		{
			MethodName: "EditUser",
			Handler:    _UserService_EditUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/services/proto/users_service.proto",
}

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

Functions

func RegisterAuthServer

func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)

func RegisterFollowServiceServer

func RegisterFollowServiceServer(s grpc.ServiceRegistrar, srv FollowServiceServer)

func RegisterPostServiceServer

func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer)

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type AuthClient

type AuthClient interface {
	// Allows a user to log in. Returns an authentication token if the login is successful.
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	// Allows a new user to register.
	SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*SignUpResponse, error)
}

AuthClient is the client API for Auth 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 NewAuthClient

func NewAuthClient(cc grpc.ClientConnInterface) AuthClient

type AuthServer

type AuthServer interface {
	// Allows a user to log in. Returns an authentication token if the login is successful.
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	// Allows a new user to register.
	SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error)
	// contains filtered or unexported methods
}

AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility

type CreatePostRequest

type CreatePostRequest struct {
	UserId  string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePostRequest) Descriptor deprecated

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

Deprecated: Use CreatePostRequest.ProtoReflect.Descriptor instead.

func (*CreatePostRequest) GetContent

func (x *CreatePostRequest) GetContent() string

func (*CreatePostRequest) GetUserId

func (x *CreatePostRequest) GetUserId() string

func (*CreatePostRequest) ProtoMessage

func (*CreatePostRequest) ProtoMessage()

func (*CreatePostRequest) ProtoReflect

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

func (*CreatePostRequest) Reset

func (x *CreatePostRequest) Reset()

func (*CreatePostRequest) String

func (x *CreatePostRequest) String() string

type CreatePostResponse

type CreatePostResponse struct {
	Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePostResponse) Descriptor deprecated

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

Deprecated: Use CreatePostResponse.ProtoReflect.Descriptor instead.

func (*CreatePostResponse) GetPost

func (x *CreatePostResponse) GetPost() *Post

func (*CreatePostResponse) ProtoMessage

func (*CreatePostResponse) ProtoMessage()

func (*CreatePostResponse) ProtoReflect

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

func (*CreatePostResponse) Reset

func (x *CreatePostResponse) Reset()

func (*CreatePostResponse) String

func (x *CreatePostResponse) String() string

type DeletePostRequest

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

func (*DeletePostRequest) Descriptor deprecated

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

Deprecated: Use DeletePostRequest.ProtoReflect.Descriptor instead.

func (*DeletePostRequest) GetPostId

func (x *DeletePostRequest) GetPostId() string

func (*DeletePostRequest) ProtoMessage

func (*DeletePostRequest) ProtoMessage()

func (*DeletePostRequest) ProtoReflect

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

func (*DeletePostRequest) Reset

func (x *DeletePostRequest) Reset()

func (*DeletePostRequest) String

func (x *DeletePostRequest) String() string

type DeletePostResponse

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

func (*DeletePostResponse) Descriptor deprecated

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

Deprecated: Use DeletePostResponse.ProtoReflect.Descriptor instead.

func (*DeletePostResponse) ProtoMessage

func (*DeletePostResponse) ProtoMessage()

func (*DeletePostResponse) ProtoReflect

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

func (*DeletePostResponse) Reset

func (x *DeletePostResponse) Reset()

func (*DeletePostResponse) String

func (x *DeletePostResponse) String() string

type EditUserRequest

type EditUserRequest struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*EditUserRequest) Descriptor deprecated

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

Deprecated: Use EditUserRequest.ProtoReflect.Descriptor instead.

func (*EditUserRequest) GetUser

func (x *EditUserRequest) GetUser() *User

func (*EditUserRequest) ProtoMessage

func (*EditUserRequest) ProtoMessage()

func (*EditUserRequest) ProtoReflect

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

func (*EditUserRequest) Reset

func (x *EditUserRequest) Reset()

func (*EditUserRequest) String

func (x *EditUserRequest) String() string

type EditUserResponse

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

func (*EditUserResponse) Descriptor deprecated

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

Deprecated: Use EditUserResponse.ProtoReflect.Descriptor instead.

func (*EditUserResponse) ProtoMessage

func (*EditUserResponse) ProtoMessage()

func (*EditUserResponse) ProtoReflect

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

func (*EditUserResponse) Reset

func (x *EditUserResponse) Reset()

func (*EditUserResponse) String

func (x *EditUserResponse) String() string

type FollowServiceClient

type FollowServiceClient interface {
	// Follow a user
	FollowUser(ctx context.Context, in *FollowUserRequest, opts ...grpc.CallOption) (*FollowUserResponse, error)
	// Unfollow a user
	UnfollowUser(ctx context.Context, in *UnfollowUserRequest, opts ...grpc.CallOption) (*UnfollowUserResponse, error)
	// Get the list of users followed by a specific user
	GetFollowing(ctx context.Context, in *GetFollowingRequest, opts ...grpc.CallOption) (*GetFollowingResponse, error)
}

FollowServiceClient is the client API for FollowService 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.

type FollowServiceServer

type FollowServiceServer interface {
	// Follow a user
	FollowUser(context.Context, *FollowUserRequest) (*FollowUserResponse, error)
	// Unfollow a user
	UnfollowUser(context.Context, *UnfollowUserRequest) (*UnfollowUserResponse, error)
	// Get the list of users followed by a specific user
	GetFollowing(context.Context, *GetFollowingRequest) (*GetFollowingResponse, error)
	// contains filtered or unexported methods
}

FollowServiceServer is the server API for FollowService service. All implementations must embed UnimplementedFollowServiceServer for forward compatibility

type FollowUserRequest

type FollowUserRequest struct {
	UserId       string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	TargetUserId string `protobuf:"bytes,2,opt,name=target_user_id,json=targetUserId,proto3" json:"target_user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*FollowUserRequest) Descriptor deprecated

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

Deprecated: Use FollowUserRequest.ProtoReflect.Descriptor instead.

func (*FollowUserRequest) GetTargetUserId

func (x *FollowUserRequest) GetTargetUserId() string

func (*FollowUserRequest) GetUserId

func (x *FollowUserRequest) GetUserId() string

func (*FollowUserRequest) ProtoMessage

func (*FollowUserRequest) ProtoMessage()

func (*FollowUserRequest) ProtoReflect

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

func (*FollowUserRequest) Reset

func (x *FollowUserRequest) Reset()

func (*FollowUserRequest) String

func (x *FollowUserRequest) String() string

type FollowUserResponse

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

func (*FollowUserResponse) Descriptor deprecated

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

Deprecated: Use FollowUserResponse.ProtoReflect.Descriptor instead.

func (*FollowUserResponse) ProtoMessage

func (*FollowUserResponse) ProtoMessage()

func (*FollowUserResponse) ProtoReflect

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

func (*FollowUserResponse) Reset

func (x *FollowUserResponse) Reset()

func (*FollowUserResponse) String

func (x *FollowUserResponse) String() string

type GetFollowingRequest

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

func (*GetFollowingRequest) Descriptor deprecated

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

Deprecated: Use GetFollowingRequest.ProtoReflect.Descriptor instead.

func (*GetFollowingRequest) GetUserId

func (x *GetFollowingRequest) GetUserId() string

func (*GetFollowingRequest) ProtoMessage

func (*GetFollowingRequest) ProtoMessage()

func (*GetFollowingRequest) ProtoReflect

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

func (*GetFollowingRequest) Reset

func (x *GetFollowingRequest) Reset()

func (*GetFollowingRequest) String

func (x *GetFollowingRequest) String() string

type GetFollowingResponse

type GetFollowingResponse struct {
	FollowingUsernames []string `protobuf:"bytes,1,rep,name=following_usernames,json=followingUsernames,proto3" json:"following_usernames,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFollowingResponse) Descriptor deprecated

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

Deprecated: Use GetFollowingResponse.ProtoReflect.Descriptor instead.

func (*GetFollowingResponse) GetFollowingUsernames

func (x *GetFollowingResponse) GetFollowingUsernames() []string

func (*GetFollowingResponse) ProtoMessage

func (*GetFollowingResponse) ProtoMessage()

func (*GetFollowingResponse) ProtoReflect

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

func (*GetFollowingResponse) Reset

func (x *GetFollowingResponse) Reset()

func (*GetFollowingResponse) String

func (x *GetFollowingResponse) String() string

type GetPostRequest

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

func (*GetPostRequest) Descriptor deprecated

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

Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.

func (*GetPostRequest) GetPostId

func (x *GetPostRequest) GetPostId() string

func (*GetPostRequest) ProtoMessage

func (*GetPostRequest) ProtoMessage()

func (*GetPostRequest) ProtoReflect

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

func (*GetPostRequest) Reset

func (x *GetPostRequest) Reset()

func (*GetPostRequest) String

func (x *GetPostRequest) String() string

type GetPostResponse

type GetPostResponse struct {
	Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPostResponse) Descriptor deprecated

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

Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.

func (*GetPostResponse) GetPost

func (x *GetPostResponse) GetPost() *Post

func (*GetPostResponse) ProtoMessage

func (*GetPostResponse) ProtoMessage()

func (*GetPostResponse) ProtoReflect

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

func (*GetPostResponse) Reset

func (x *GetPostResponse) Reset()

func (*GetPostResponse) String

func (x *GetPostResponse) String() string

type GetUserPostsRequest

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

func (*GetUserPostsRequest) Descriptor deprecated

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

Deprecated: Use GetUserPostsRequest.ProtoReflect.Descriptor instead.

func (*GetUserPostsRequest) GetUserId

func (x *GetUserPostsRequest) GetUserId() string

func (*GetUserPostsRequest) ProtoMessage

func (*GetUserPostsRequest) ProtoMessage()

func (*GetUserPostsRequest) ProtoReflect

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

func (*GetUserPostsRequest) Reset

func (x *GetUserPostsRequest) Reset()

func (*GetUserPostsRequest) String

func (x *GetUserPostsRequest) String() string

type GetUserPostsResponse

type GetUserPostsResponse struct {
	Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserPostsResponse) Descriptor deprecated

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

Deprecated: Use GetUserPostsResponse.ProtoReflect.Descriptor instead.

func (*GetUserPostsResponse) GetPosts

func (x *GetUserPostsResponse) GetPosts() []*Post

func (*GetUserPostsResponse) ProtoMessage

func (*GetUserPostsResponse) ProtoMessage()

func (*GetUserPostsResponse) ProtoReflect

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

func (*GetUserPostsResponse) Reset

func (x *GetUserPostsResponse) Reset()

func (*GetUserPostsResponse) String

func (x *GetUserPostsResponse) String() string

type GetUserRequest

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

func (*GetUserRequest) Descriptor deprecated

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

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) GetUsername

func (x *GetUserRequest) GetUsername() string

func (*GetUserRequest) ProtoMessage

func (*GetUserRequest) ProtoMessage()

func (*GetUserRequest) ProtoReflect

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

func (*GetUserRequest) Reset

func (x *GetUserRequest) Reset()

func (*GetUserRequest) String

func (x *GetUserRequest) String() string

type GetUserResponse

type GetUserResponse struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserResponse) Descriptor deprecated

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

Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.

func (*GetUserResponse) GetUser

func (x *GetUserResponse) GetUser() *User

func (*GetUserResponse) ProtoMessage

func (*GetUserResponse) ProtoMessage()

func (*GetUserResponse) ProtoReflect

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

func (*GetUserResponse) Reset

func (x *GetUserResponse) Reset()

func (*GetUserResponse) String

func (x *GetUserResponse) String() string

type LoginRequest

type LoginRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,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) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) GetUsername

func (x *LoginRequest) GetUsername() 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 {
	Token string `protobuf:"bytes,1,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) 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 Post

type Post struct {
	PostId         string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	UserId         string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Content        string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	OriginalPostId string `protobuf:"bytes,4,opt,name=original_post_id,json=originalPostId,proto3" json:"original_post_id,omitempty"` // This field is set if the post is a repost
	Timestamp      int64  `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Post) Descriptor deprecated

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

Deprecated: Use Post.ProtoReflect.Descriptor instead.

func (*Post) GetContent

func (x *Post) GetContent() string

func (*Post) GetOriginalPostId

func (x *Post) GetOriginalPostId() string

func (*Post) GetPostId

func (x *Post) GetPostId() string

func (*Post) GetTimestamp

func (x *Post) GetTimestamp() int64

func (*Post) GetUserId

func (x *Post) GetUserId() string

func (*Post) ProtoMessage

func (*Post) ProtoMessage()

func (*Post) ProtoReflect

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

func (*Post) Reset

func (x *Post) Reset()

func (*Post) String

func (x *Post) String() string

type PostServiceClient

type PostServiceClient interface {
	// Create a new post
	CreatePost(ctx context.Context, in *CreatePostRequest, opts ...grpc.CallOption) (*CreatePostResponse, error)
	// Get a post by its ID
	GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
	// Repost an existing post
	Repost(ctx context.Context, in *RepostRequest, opts ...grpc.CallOption) (*RepostResponse, error)
	// Delete a post by its ID
	DeletePost(ctx context.Context, in *DeletePostRequest, opts ...grpc.CallOption) (*DeletePostResponse, error)
	// Get all posts for a specific user
	GetUserPosts(ctx context.Context, in *GetUserPostsRequest, opts ...grpc.CallOption) (*GetUserPostsResponse, error)
}

PostServiceClient is the client API for PostService 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.

type PostServiceServer

type PostServiceServer interface {
	// Create a new post
	CreatePost(context.Context, *CreatePostRequest) (*CreatePostResponse, error)
	// Get a post by its ID
	GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
	// Repost an existing post
	Repost(context.Context, *RepostRequest) (*RepostResponse, error)
	// Delete a post by its ID
	DeletePost(context.Context, *DeletePostRequest) (*DeletePostResponse, error)
	// Get all posts for a specific user
	GetUserPosts(context.Context, *GetUserPostsRequest) (*GetUserPostsResponse, error)
	// contains filtered or unexported methods
}

PostServiceServer is the server API for PostService service. All implementations must embed UnimplementedPostServiceServer for forward compatibility

type RepostRequest

type RepostRequest struct {
	UserId         string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	OriginalPostId string `protobuf:"bytes,2,opt,name=original_post_id,json=originalPostId,proto3" json:"original_post_id,omitempty"`
	Content        string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*RepostRequest) Descriptor deprecated

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

Deprecated: Use RepostRequest.ProtoReflect.Descriptor instead.

func (*RepostRequest) GetContent

func (x *RepostRequest) GetContent() string

func (*RepostRequest) GetOriginalPostId

func (x *RepostRequest) GetOriginalPostId() string

func (*RepostRequest) GetUserId

func (x *RepostRequest) GetUserId() string

func (*RepostRequest) ProtoMessage

func (*RepostRequest) ProtoMessage()

func (*RepostRequest) ProtoReflect

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

func (*RepostRequest) Reset

func (x *RepostRequest) Reset()

func (*RepostRequest) String

func (x *RepostRequest) String() string

type RepostResponse

type RepostResponse struct {
	Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
	// contains filtered or unexported fields
}

func (*RepostResponse) Descriptor deprecated

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

Deprecated: Use RepostResponse.ProtoReflect.Descriptor instead.

func (*RepostResponse) GetPost

func (x *RepostResponse) GetPost() *Post

func (*RepostResponse) ProtoMessage

func (*RepostResponse) ProtoMessage()

func (*RepostResponse) ProtoReflect

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

func (*RepostResponse) Reset

func (x *RepostResponse) Reset()

func (*RepostResponse) String

func (x *RepostResponse) String() string

type SignUpRequest

type SignUpRequest struct {
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*SignUpRequest) Descriptor deprecated

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

Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead.

func (*SignUpRequest) GetUser

func (x *SignUpRequest) GetUser() *User

func (*SignUpRequest) ProtoMessage

func (*SignUpRequest) ProtoMessage()

func (*SignUpRequest) ProtoReflect

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

func (*SignUpRequest) Reset

func (x *SignUpRequest) Reset()

func (*SignUpRequest) String

func (x *SignUpRequest) String() string

type SignUpResponse

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

func (*SignUpResponse) Descriptor deprecated

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

Deprecated: Use SignUpResponse.ProtoReflect.Descriptor instead.

func (*SignUpResponse) ProtoMessage

func (*SignUpResponse) ProtoMessage()

func (*SignUpResponse) ProtoReflect

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

func (*SignUpResponse) Reset

func (x *SignUpResponse) Reset()

func (*SignUpResponse) String

func (x *SignUpResponse) String() string

type UnfollowUserRequest

type UnfollowUserRequest struct {
	UserId       string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	TargetUserId string `protobuf:"bytes,2,opt,name=target_user_id,json=targetUserId,proto3" json:"target_user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*UnfollowUserRequest) Descriptor deprecated

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

Deprecated: Use UnfollowUserRequest.ProtoReflect.Descriptor instead.

func (*UnfollowUserRequest) GetTargetUserId

func (x *UnfollowUserRequest) GetTargetUserId() string

func (*UnfollowUserRequest) GetUserId

func (x *UnfollowUserRequest) GetUserId() string

func (*UnfollowUserRequest) ProtoMessage

func (*UnfollowUserRequest) ProtoMessage()

func (*UnfollowUserRequest) ProtoReflect

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

func (*UnfollowUserRequest) Reset

func (x *UnfollowUserRequest) Reset()

func (*UnfollowUserRequest) String

func (x *UnfollowUserRequest) String() string

type UnfollowUserResponse

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

func (*UnfollowUserResponse) Descriptor deprecated

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

Deprecated: Use UnfollowUserResponse.ProtoReflect.Descriptor instead.

func (*UnfollowUserResponse) ProtoMessage

func (*UnfollowUserResponse) ProtoMessage()

func (*UnfollowUserResponse) ProtoReflect

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

func (*UnfollowUserResponse) Reset

func (x *UnfollowUserResponse) Reset()

func (*UnfollowUserResponse) String

func (x *UnfollowUserResponse) String() string

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServer) Login

func (UnimplementedAuthServer) SignUp

type UnimplementedFollowServiceServer

type UnimplementedFollowServiceServer struct {
}

UnimplementedFollowServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFollowServiceServer) FollowUser

func (UnimplementedFollowServiceServer) GetFollowing

func (UnimplementedFollowServiceServer) UnfollowUser

type UnimplementedPostServiceServer

type UnimplementedPostServiceServer struct {
}

UnimplementedPostServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPostServiceServer) CreatePost

func (UnimplementedPostServiceServer) DeletePost

func (UnimplementedPostServiceServer) GetPost

func (UnimplementedPostServiceServer) GetUserPosts

func (UnimplementedPostServiceServer) Repost

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) EditUser

func (UnimplementedUserServiceServer) GetUser

type UnsafeAuthServer

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

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

type UnsafeFollowServiceServer

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

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

type UnsafePostServiceServer

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

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

type UnsafeUserServiceServer

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

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

type User

type User struct {
	Username     string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Name         string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	PasswordHash string `protobuf:"bytes,3,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"`
	Email        string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetName

func (x *User) GetName() string

func (*User) GetPasswordHash

func (x *User) GetPasswordHash() string

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 UserFollows

type UserFollows struct {
	FollowingUserIds []string `protobuf:"bytes,2,rep,name=following_user_ids,json=followingUserIds,proto3" json:"following_user_ids,omitempty"`
	// contains filtered or unexported fields
}

Used to represent the following relationships between users

func (*UserFollows) Descriptor deprecated

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

Deprecated: Use UserFollows.ProtoReflect.Descriptor instead.

func (*UserFollows) GetFollowingUserIds

func (x *UserFollows) GetFollowingUserIds() []string

func (*UserFollows) ProtoMessage

func (*UserFollows) ProtoMessage()

func (*UserFollows) ProtoReflect

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

func (*UserFollows) Reset

func (x *UserFollows) Reset()

func (*UserFollows) String

func (x *UserFollows) String() string

type UserPosts

type UserPosts struct {
	PostsIds []string `protobuf:"bytes,2,rep,name=posts_ids,json=postsIds,proto3" json:"posts_ids,omitempty"`
	// contains filtered or unexported fields
}

Used to represent the posts that a user has made

func (*UserPosts) Descriptor deprecated

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

Deprecated: Use UserPosts.ProtoReflect.Descriptor instead.

func (*UserPosts) GetPostsIds

func (x *UserPosts) GetPostsIds() []string

func (*UserPosts) ProtoMessage

func (*UserPosts) ProtoMessage()

func (*UserPosts) ProtoReflect

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

func (*UserPosts) Reset

func (x *UserPosts) Reset()

func (*UserPosts) String

func (x *UserPosts) String() string

type UserServiceClient

type UserServiceClient interface {
	// Get a user
	GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
	// Edit user's account
	EditUser(ctx context.Context, in *EditUserRequest, opts ...grpc.CallOption) (*EditUserResponse, error)
}

UserServiceClient is the client API for UserService 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.

type UserServiceServer

type UserServiceServer interface {
	// Get a user
	GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
	// Edit user's account
	EditUser(context.Context, *EditUserRequest) (*EditUserResponse, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

Jump to

Keyboard shortcuts

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