postImpl

package
v0.0.0-...-4d1b151 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const UploadDir = "images"

Variables

This section is empty.

Functions

func HandleImage

func HandleImage(w http.ResponseWriter, r *http.Request, params map[string]string)

func HandlePostCreate

func HandlePostCreate(w http.ResponseWriter, r *http.Request, _ map[string]string)

func HandlePostDetailsCreate

func HandlePostDetailsCreate(w http.ResponseWriter, r *http.Request, params map[string]string)

Types

type Post

type Post struct {
	ID              int64
	UserID          int64
	Username        string
	ProfileImageUrl string
	Title           string
	Description     string
	Image           string
	MinimumFund     decimal.Decimal
	FundRaised      decimal.Decimal
	DeadlineDate    time.Time
	CreatedAt       time.Time
	IsBookmarked    bool
}

type Server

type Server struct {
	pb.UnimplementedPostServiceServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(secretKey []byte) (*Server, error)

func (*Server) BookmarkPost

func (s *Server) BookmarkPost(ctx context.Context, req *pb.BookmarkPostRequest) (*emptypb.Empty, error)

func (*Server) FundPost

func (s *Server) FundPost(ctx context.Context, req *pb.FundPostRequest) (*emptypb.Empty, error)

func (*Server) GetPost

func (s *Server) GetPost(ctx context.Context, req *pb.GetPostRequest) (*pb.GetPostResponse, error)

func (*Server) LandingPosts

func (s *Server) LandingPosts(ctx context.Context, _ *emptypb.Empty) (*pb.LandingPostsResponse, error)

func (*Server) SearchPost

func (s *Server) SearchPost(ctx context.Context, req *pb.SearchPostRequest) (*pb.SearchPostResponse, error)

func (*Server) UserBookmarks

func (s *Server) UserBookmarks(ctx context.Context, _ *emptypb.Empty) (*pb.UserBookmarksResponse, error)

func (*Server) UserFunds

func (s *Server) UserFunds(ctx context.Context, _ *emptypb.Empty) (*pb.UserFundsResponse, error)

func (*Server) UserIDProjects

func (s *Server) UserIDProjects(ctx context.Context, req *pb.UserIDProjectsRequest) (*pb.UserProjectsResponse, error)

func (*Server) UserProjects

func (s *Server) UserProjects(ctx context.Context, _ *emptypb.Empty) (*pb.UserProjectsResponse, error)

Jump to

Keyboard shortcuts

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