organization

package
v0.0.0-...-21824ef Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	Save(organization *entities.Organization) (*entities.Organization, error)
	FindAll() ([]entities.Organization, error)
	Find(orgID uint) (*entities.Organization, error)
	Delete(orgID uint) error
	SaveJoinReq(request *entities.JoinRequest) error
	DelJoinReq(orgID uint, email string) error
	FindAllJoinReq(orgID uint) ([]entities.JoinRequest, error)
	AcceptJoinReq(request *entities.JoinRequest) error
	AddUserToOrg(orgID uint, email string) error
}

func NewPostgresRepo

func NewPostgresRepo(db *gorm.DB) Repository

type Service

type Service interface {
	SaveOrg(org *entities.Organization) (*entities.Organization, error)
	GetAllOrgs() ([]entities.Organization, error)
	DelOrg(orgID uint) error
	GetOrgEvents(orgID uint) ([]entities.Event, error)
	SendJoinRequest(orgID uint, email string) error
	GetAllJoinReqs(orgID uint) ([]entities.JoinRequest, error)
	AcceptJoinReq(orgID uint, email string) error
	DelJoinReq(orgID uint, email string) error
	LoginOrg(orgID uint, email string) (*jwt.Token, error)
	GetOrgJoinReqs(orgID uint) ([]entities.JoinRequest, error)
	FindOrg(orgID uint) (*entities.Organization, error)
	AddUserToOrg(orgID uint, email string) error
}

func NewOrganizationService

func NewOrganizationService(rp Repository) Service

Jump to

Keyboard shortcuts

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