services

package
v0.0.0-...-c9b56a8 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 活动报名成功 | 活动删除成功
	Success = iota
	// 活动重复报名 | 活动报名已取消
	Duplicate
	// 活动不存在
	NotFound
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckEventReq

type CheckEventReq struct {
}

type CheckEventRes

type CheckEventRes struct {
}

type CreateEventService

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

func NewCreateEventService

func NewCreateEventService(db *gorm.DB) *CreateEventService

type EnrollForEventReq

type EnrollForEventReq struct {
	EventID int64
}

type EnrollForEventRes

type EnrollForEventRes struct {
	Status uint8
}

type EventService

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

func NewEventService

func NewEventService(db *gorm.DB) *EventService

func (EventService) CheckEvent

func (s EventService) CheckEvent(ctx *rpc.Context, req *CheckEventReq, res *CheckEventRes) (err error)

用户是否查看过已报名的活动

func (EventService) EnrollForEvent

func (s EventService) EnrollForEvent(ctx *rpc.Context, req *EnrollForEventReq, res *EnrollForEventRes) (err error)

用户报名活动

func (EventService) GetEventMoreInfo

func (s EventService) GetEventMoreInfo(ctx *rpc.Context, req *GetEventMoreInfoReq, res *GetEventMoreInfoRes) (err error)

获取单个活动详细信息

func (EventService) GetEventsList

func (s EventService) GetEventsList(ctx *rpc.Context, req *GetEventsListReq, res *GetEventsListRes) error

根据req的EventID获取对应的活动简单信息列表, 若空数组则返回全部活动

func (EventService) GetUserEnrolledEvents

func (s EventService) GetUserEnrolledEvents(ctx *rpc.Context, req *GetUserEnrolledEventsReq, res *GetUserEnrolledEventsRes) (err error)

func (EventService) QuitEvent

func (s EventService) QuitEvent(ctx *rpc.Context, req *QuitEventReq, res *QuitEventRes) (err error)

用户取消报名活动

type GetEventMoreInfoReq

type GetEventMoreInfoReq struct {
	EventID int64
}

type GetEventMoreInfoRes

type GetEventMoreInfoRes struct {
	Schedules []eventsModels.Schedule
	Hackathon eventsModels.Hackathon
}

type GetEventsListReq

type GetEventsListReq struct {
	EventIDs []int64
}

type GetEventsListRes

type GetEventsListRes struct {
	Events []eventsModels.Event
}

type GetUserEnrolledEventsReq

type GetUserEnrolledEventsReq struct {
}

type GetUserEnrolledEventsRes

type GetUserEnrolledEventsRes struct {
	Events []eventsModels.Event
}

type QuitEventReq

type QuitEventReq struct {
	EventID int64
}

type QuitEventRes

type QuitEventRes struct {
	Status uint8
}

Jump to

Keyboard shortcuts

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