api

package
v0.0.0-...-578d352 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileUploadHandler

func FileUploadHandler(r *http.Request) (string, error)

handle file upload no compression added so i take in all formats of images

Types

type ApiErr

type ApiErr struct {
	Err        string `json:"err"`
	StatusCode int
}

func (*ApiErr) Error

func (e *ApiErr) Error() string

type ApiGenericRes

type ApiGenericRes struct {
	Success bool   `json:"success"`
	Msg     string `json:"msg"`
}

type ApiServer

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

func NewApiServer

func NewApiServer(addr string, cors *cors.Cors) *ApiServer

func (*ApiServer) HandleCreateUser

func (s *ApiServer) HandleCreateUser(w http.ResponseWriter, r *http.Request) error

func (*ApiServer) HandleDeleteUser

func (s *ApiServer) HandleDeleteUser(w http.ResponseWriter, r *http.Request) error

func (*ApiServer) HandleGetAllUser

func (s *ApiServer) HandleGetAllUser(w http.ResponseWriter, r *http.Request) error

func (*ApiServer) HandleGetUser

func (s *ApiServer) HandleGetUser(w http.ResponseWriter, r *http.Request) error

func (*ApiServer) HandleUpdateUser

func (s *ApiServer) HandleUpdateUser(w http.ResponseWriter, r *http.Request) error

func (*ApiServer) HandleUploadUserProfilePic

func (s *ApiServer) HandleUploadUserProfilePic(w http.ResponseWriter, r *http.Request) error

func (*ApiServer) NotFound

func (s *ApiServer) NotFound(w http.ResponseWriter, r *http.Request) error

not found

func (*ApiServer) PingHandler

func (s *ApiServer) PingHandler(w http.ResponseWriter, r *http.Request) error

ping

func (*ApiServer) Run

func (s *ApiServer) Run()

type Msg

type Msg struct {
	Msg string `json:"msg"`
}

Jump to

Keyboard shortcuts

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