Documentation ¶
Index ¶
- func AcceptJoinRequest(user string, org string) error
- func AddPolicy(who, resource, access string) error
- func AuthorizeUser(ctx context.Context) (bool, error)
- func ConnectEnforcer()
- func ConnectToDB() bolt.Conn
- func CreateAttendee(eventName string, p Participant, c chan error, mutex *sync.Mutex)
- func CreateAttendeeSync(eventName string, p Participant, mutex *sync.Mutex) error
- func CreateCouponSchema(event string, coupons []Coupon, c chan error)
- func CreateEvent(e Event, ce chan error)
- func CreateGuest(event string, g Guest, c chan error, mutex *sync.Mutex)
- func CreateJoinRequest(user string, org string) error
- func CreateNewOrg(org Organization, user string) error
- func CreateParticipant(e Event, label string, c chan error, mutex *sync.Mutex)
- func DBInit(c bolt.Conn)
- func DeleteAttendee(q Query, c chan error)
- func DeleteCouponSchema(event string, q Coupon, c chan MessageReturn)
- func DeleteEvent(q Query, c chan error)
- func DenyJoinRequest(user, org string) error
- func Enforce(who, resource, access string) bool
- func EnforceRoleAdmin(email, org string) (bool, error)
- func EnforceRoleEither(email, org string) (bool, error)
- func EnforceRoleMember(email, org string) (bool, error)
- func GetAuth(resource string) []string
- func GetUserDetails(user string) (events []Event, orgs []Organization, err error)
- func InviteUserToOrg(email, org string) error
- func IsEventOfOrg(eventname, orgname string) (bool, error)
- func Login(email string, password string, organization string, role string) (token string, err error)
- func MarkPresent(attendance Attendance, c chan MessageReturn)
- func ReadAttendee(q Query, c chan ParticipantReturn, mutex *sync.Mutex)
- func ReadGuest(q Query, c chan GuestReturn)
- func RedeemCoupon(attendance Attendance, couponName string, c chan MessageReturn)
- func RemovePolicy(who, resource, access string) error
- func RmAttendee(q Query, c chan error)
- func RmGuest(q Query, c chan error)
- func ShowEventData(q Query, c chan EventReturn)
- func TokenGen(email string, role string, organization string, c chan TokenReturn)
- func UpdateAttendee(q Query, c chan error)
- func UpdateEvent(q Query, c chan error)
- func ViewAbsent(event string, query Query, day int, c chan SafeParticipantReturn)
- func ViewAll(event string, query Query, c chan SafeParticipantReturn, mutex *sync.Mutex)
- func ViewCouponSchema(event string, mutex *sync.Mutex, c chan CouponReturn)
- func ViewPresent(event string, query Query, day int, c chan SafeParticipantReturn, ...)
- type Attendance
- type Attendee
- type Coupon
- type CouponReturn
- type Event
- type EventReturn
- type Guest
- type GuestReturn
- type MessageReturn
- type Organization
- type Participant
- type ParticipantReturn
- type Query
- type SafeParticipantReturn
- type Token
- type TokenReturn
- type User
- type UserReturn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptJoinRequest ¶
func CreateAttendee ¶
func CreateAttendee(eventName string, p Participant, c chan error, mutex *sync.Mutex)
func CreateAttendeeSync ¶
func CreateAttendeeSync(eventName string, p Participant, mutex *sync.Mutex) error
func CreateCouponSchema ¶
func CreateEvent ¶
func CreateGuest ¶
create a new guest node with relationship to the event
func CreateJoinRequest ¶
func CreateNewOrg ¶
func CreateNewOrg(org Organization, user string) error
func CreateParticipant ¶
create a new node with given label and participant data struct (FOR COORDINATORS)
func DeleteAttendee ¶
func DeleteCouponSchema ¶
func DeleteCouponSchema(event string, q Coupon, c chan MessageReturn)
func DenyJoinRequest ¶
func EnforceRoleAdmin ¶
func EnforceRoleEither ¶
func EnforceRoleMember ¶
func GetUserDetails ¶
func GetUserDetails(user string) (events []Event, orgs []Organization, err error)
func InviteUserToOrg ¶
func IsEventOfOrg ¶
func MarkPresent ¶
func MarkPresent(attendance Attendance, c chan MessageReturn)
func ReadAttendee ¶
func ReadAttendee(q Query, c chan ParticipantReturn, mutex *sync.Mutex)
func ReadGuest ¶
func ReadGuest(q Query, c chan GuestReturn)
func RedeemCoupon ¶
func RedeemCoupon(attendance Attendance, couponName string, c chan MessageReturn)
func RemovePolicy ¶
func RmAttendee ¶
func ShowEventData ¶
func ShowEventData(q Query, c chan EventReturn)
func UpdateAttendee ¶
func UpdateEvent ¶
update event with given query and new value
func ViewAbsent ¶
func ViewAbsent(event string, query Query, day int, c chan SafeParticipantReturn)
func ViewAll ¶
func ViewAll(event string, query Query, c chan SafeParticipantReturn, mutex *sync.Mutex)
func ViewCouponSchema ¶
func ViewCouponSchema(event string, mutex *sync.Mutex, c chan CouponReturn)
func ViewPresent ¶
Types ¶
type Attendance ¶
type CouponReturn ¶
type Event ¶
type Event struct { ClubName string `json:"clubName"` Name string `json:"name"` ToDate string `json:"toDate"` FromDate string `json:"fromDate"` ToTime string `json:"toTime"` FromTime string `json:"fromTime"` Budget string `json:"budget"` Description string `json:"description"` Category string `json:"category"` Venue string `json:"venue"` Attendance string `json:"attendance"` ExpectedParticipants string `json:"expectedParticipants"` FacultyCoordinator Participant `json:"facultyCoordinator"` StudentCoordinator Participant `json:"studentCoordinator"` PROrequest string `json:"PROrequest"` CampusEngineerRequest string `json:"campusEngineerRequest"` Duration string `json:"duration"` // MainSponsor Participant `json:"mainSponsor"` Status string `json:"status"` }
func ReadEventsByOrg ¶
type EventReturn ¶
type GuestReturn ¶
type MessageReturn ¶
type Organization ¶
type Organization struct { Name string `json:"name"` Location string `json:"location"` Description string `json:"description"` Tag string `json:"tag"` CreatedAt string `json:"createdAt"` Website string `json:"website"` }
func GetOrgs ¶
func GetOrgs(org string) ([]Organization, error)
func GetUserDetailsOnlyOrg ¶
func GetUserDetailsOnlyOrg(user string) (orgs []Organization, err error)
type Participant ¶
type ParticipantReturn ¶
type SafeParticipantReturn ¶
type SafeParticipantReturn struct { Participants []Participant `json:"participants"` Err error `json:"err"` }
type Token ¶
type Token struct { Email string `json:"email"` Role string `json:"role"` Organization string `json:"organization"` jwt.StandardClaims }
func ValidateToken ¶
type TokenReturn ¶
type User ¶
type User struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` Password string `json:"password"` Email string `json:"email"` PhoneNumber string `json:"phoneNumber"` LinkedIn string `json:"linkedIn"` Facebook string `json:"facebook"` Description string `json:"description"` CreatedAt string `json:"createdAt"` DeviceToken string `json:"deviceToken"` }
role as relation
func GetJoinRequests ¶
func (*User) Get ¶
func (u *User) Get(c chan UserReturn)
type UserReturn ¶
Click to show internal directories.
Click to hide internal directories.