services

package
v0.0.0-...-7a4b419 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseService

type BaseService struct {
	User         core.UserRepository
	Institute    core.InstitutionRepo
	Event        core.EventRepo
	Reward       core.RewardRepo
	Team         core.TeamRepo
	Trainee      core.TraineeRepo
	Solution     core.SolutionRepo
	Entrepreneur core.EntrepreneurRepo
}

type BusinessService

type BusinessService struct {
	Repo core.BusinessRepo
}

func (BusinessService) Create

func (s BusinessService) Create(business *core.Business) (*core.Business, map[string]string)

func (BusinessService) List

func (s BusinessService) List()

type EntrepreneurService

type EntrepreneurService struct {
	Repo core.EntrepreneurRepo
}

func (EntrepreneurService) Add

func (EntrepreneurService) Get

func (EntrepreneurService) List

func (t EntrepreneurService) List() (*[]core.Entrepreneur, error)

type EventService

type EventService struct {
	Repo core.EventRepo
}

func (*EventService) Create

func (d *EventService) Create(event *core.Event) (*core.Event, map[string]string)

func (*EventService) Get

func (d *EventService) Get(id string) (*core.Event, error)

func (*EventService) List

func (d *EventService) List() (*[]core.Event, error)

func (*EventService) Update

func (d *EventService) Update(event *core.Event) (string, error)

type InstituteService

type InstituteService struct {
	Repo core.InstitutionRepo
}

func (*InstituteService) Create

func (d *InstituteService) Create(centre *core.Institution) (*core.Institution, map[string]string)

func (*InstituteService) Get

func (d *InstituteService) Get(id string) (*core.Institution, error)

func (*InstituteService) List

func (d *InstituteService) List() (*[]core.Institution, error)

func (*InstituteService) Update

func (d *InstituteService) Update(centre *core.Institution) (string, error)

type RewardService

type RewardService struct {
	Repo core.RewardRepo
}

func (*RewardService) Create

func (r *RewardService) Create(centre *core.Reward) (*core.Reward, map[string]string)

func (*RewardService) Get

func (r *RewardService) Get(id string) (*core.Reward, error)

func (*RewardService) List

func (r *RewardService) List(event string) (*[]core.Reward, error)

func (*RewardService) Update

func (r *RewardService) Update(reward *core.Reward) (string, error)

type SolutionRewardRequest

type SolutionRewardRequest struct {
	Solution string `json:"solution"`
	Reward   string `json:"reward"`
}

type SolutionService

type SolutionService struct {
	Repo       core.SolutionRepo
	RewardRepo core.RewardRepo
}

func (*SolutionService) AddedReward

func (s *SolutionService) AddedReward(request *SolutionRewardRequest) (string, error)

func (*SolutionService) Create

func (s *SolutionService) Create(solution *core.Solution) (*core.Solution, map[string]string)

func (*SolutionService) Get

func (s *SolutionService) Get(id string) (*core.Solution, error)

func (*SolutionService) List

func (s *SolutionService) List(event string) (*[]core.Solution, error)

func (*SolutionService) Update

func (s *SolutionService) Update(solution *core.Solution) (string, error)

type TeamRequest

type TeamRequest struct {
	Name        string   `json:"name" binding:"required"`
	Description string   `json:"description" binding:"required"`
	Event       string   `json:"event"`
	Members     []string `json:"members" binding:"required"`
}

type TeamService

type TeamService struct {
	Repo        core.TeamRepo
	TraineeRepo core.TraineeRepo
}

func (TeamService) Create

func (t TeamService) Create(param *TeamRequest) (*core.Team, map[string]string)

func (TeamService) List

func (t TeamService) List(event string) (*[]core.Team, error)

type TraineeService

type TraineeService struct {
	Repo core.TraineeRepo
}

func (TraineeService) Add

func (t TraineeService) Add(record *core.Trainee) (*core.Trainee, map[string]string)

func (TraineeService) Get

func (t TraineeService) Get(id string) (*core.Trainee, error)

func (TraineeService) List

func (t TraineeService) List(event string) (*[]core.Trainee, error)

type User

type User struct {
	Repo core.UserRepository
}

func (User) Add

func (u User) Add(record *core.User) (*core.User, map[string]string)

func (User) ChangePassword

func (u User) ChangePassword(user core.User) (*core.User, error)

func (User) Disable

func (u User) Disable(id string) (*core.User, error)

func (User) Edit

func (u User) Edit(record *core.User) (*core.User, map[string]string)

func (User) Enable

func (u User) Enable(id string) (*core.User, error)

func (User) GetPassword

func (u User) GetPassword(id string) (*core.UserWithPassword, error)

func (User) Login

func (u User) Login(phone, password string) (*core.User, error)

func (User) Remove

func (u User) Remove(id string) (string, error)

func (User) ResetPassword

func (u User) ResetPassword(phone string) (*core.User, error)

func (User) User

func (u User) User(id string) (*core.PublicUser, error)

func (User) Users

func (u User) Users() (*[]core.PublicUser, error)

Jump to

Keyboard shortcuts

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