model

package
v0.0.0-...-d94427d Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AqiParam

type AqiParam struct {
	Latitude  string `form:"latitude" binding:"required"`
	Longitude string `form:"longitude" binding:"required"`
}

type AqiResponse

type AqiResponse struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

type CommunityDataResponse

type CommunityDataResponse struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	Description    string `json:"description"`
	ProfilePicture string `json:"profile_picture"`
	CoverPicture   string `json:"cover_picture"`
}

type CommunityDetails

type CommunityDetails struct {
	Detail Details               `json:"detail"`
	Member []UserProfileResponse `json:"members"`
}

type CommunityRequest

type CommunityRequest struct {
	Name           string                `form:"name"`
	Description    string                `form:"description"`
	ProfilePicture *multipart.FileHeader `form:"profile_picture" binding:"required"`
	CoverPicture   *multipart.FileHeader `form:"cover_picture" binding:"required"`
	Price          uint64                `form:"price"`
}

type Details

type Details struct {
	Description string   `json:"description"`
	Galery      []string `json:"galery"`
}

type GoogleResAqi

type GoogleResAqi struct {
	DateTime   string `json:"dateTime"`
	RegionCode string `json:"regionCode"`
	Indexes    any    `json:"indexes"`
}

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email" binding:"required,email"`
	Password string `json:"password" binding:"required,min=8"`
}

type LoginResponse

type LoginResponse struct {
	Token    string    `json:"token"`
	ExpireAt time.Time `json:"expire_at"`
}

type Member

type Member struct {
	ID          string `json:"id"`
	UserID      string `json:"user_id"`
	CommunityID string `json:"community_id"`
}

type MemberRequest

type MemberRequest struct {
	CommunityID string `json:"community_id" binding:"required"`
}

type PostResponse

type PostResponse struct {
	ID          string `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	ImageUrl    string `json:"image_url"`
	Link        string `json:"link"`
	Category    int    `json:"category"`
}

type Response

type Response struct {
	Error   bool   `json:"error"`
	Message string `json:"message"`
	Payload any    `json:"payload"`
}

type ServiceResponse

type ServiceResponse struct {
	Code    int
	Error   bool
	Message string
	Payload any
}

type UserCreateRequest

type UserCreateRequest struct {
	Email    string `json:"email" binding:"required,email"`
	Password string `json:"password" binding:"required,min=8"`
	FullName string `json:"full_name" binding:"required"`
}

type UserCreateResponse

type UserCreateResponse struct {
	ID string `json:"id"`
}

type UserProfileResponse

type UserProfileResponse struct {
	ID       string `json:"id"`
	Email    string `json:"email"`
	FullName string `json:"full_name"`
}

type UserTokenData

type UserTokenData struct {
	ID    string
	Email string
}

Jump to

Keyboard shortcuts

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