Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CrewPosition ¶
type CrewPosition struct {
CrewID int `db:"crew_id" json:"crewID"`
User `json:"user"`
Locked bool `db:"locked" json:"locked"`
Credited bool `db:"credited" json:"credited"`
Ordering int `db:"ordering" json:"ordering,omitempty"`
Position
}
CrewPosition represents a role for a signup sheet
type CrewRepo ¶
type CrewRepo interface {
New(ctx context.Context, signupID, positionID int) error
Get(ctx context.Context, crewID int) (*CrewPosition, error)
UpdateUser(ctx context.Context, crewID, userID int) error
UpdateUserAndVerify(ctx context.Context, crewID, userID int) error
DeleteUser(ctx context.Context, crewID int) error
Delete(ctx context.Context, crewID int) error
}
CrewRepo defines all crew interactions.
This repo is similar to the position one except it deals with each unique role on a signup sheet. Providing the facilities for users to use the signup sheet.
type Event ¶
type Event struct {
EventID int `db:"event_id" json:"eventID"`
EventType string `db:"event_type" json:"eventType"`
Name string `db:"name" json:"name"`
StartDate time.Time `db:"start_date" json:"startDate"`
EndDate time.Time `db:"end_date" json:"endDate"`
Description string `db:"description" json:"description"`
Location string `db:"location" json:"location"`
IsPrivate bool `db:"is_private" json:"isPrivate"`
IsCancelled bool `db:"is_cancelled" json:"isCancelled"`
IsTentative bool `db:"is_tentative" json:"isTentative"`
Signups []Signup `json:"signups,omitempty"` // Used for shows
Attendees []Attendee `json:"attendees,omitempty"` // Used for social, meet and other. This would be an XOR with Signups
}
Event represents a group of signups
type EventRepo ¶
type EventRepo interface {
ListMonth(ctx context.Context, year, month int) (*[]Event, error)
Get(ctx context.Context, eventID int) (*Event, error)
New(ctx context.Context, e *NewEvent, userID int) (int, error)
Update(ctx context.Context, e *Event, userID int) error
Delete(ctx context.Context, eventID int) error
}
EventRepo defines all event interactions
type NewCrew ¶ added in v0.7.0
type NewCrew struct {
PositionID int `db:"position_id" json:"positionID"`
Locked bool `db:"locked" json:"locked"`
Credited bool `db:"credited" json:"credited"`
Ordering int `db:"ordering" json:"ordering,omitempty"`
}
NewCrew required fields to add crew to a signup sheet
type NewEvent ¶ added in v0.7.0
type NewEvent struct {
EventType string `db:"event_type" json:"eventType"`
Name string `db:"name" json:"name"`
StartDate time.Time `db:"start_date" json:"startDate"`
EndDate time.Time `db:"end_date" json:"endDate"`
Description string `db:"description" json:"description"`
Location string `db:"location" json:"location"`
IsPrivate bool `db:"is_private" json:"isPrivate"`
IsCancelled bool `db:"is_cancelled" json:"isCancelled"`
IsTentative bool `db:"is_tentative" json:"isTentative"`
}
NewEvent represents the necessary fields to create a new event.
type NewSignup ¶ added in v0.7.0
type NewSignup struct {
EventID int `db:"event_id" json:"eventID"`
Title string `db:"title" json:"title"`
Description string `db:"description" json:"description"`
UnlockDate *time.Time `db:"unlock_date" json:"unlockDate"`
ArrivalTime *time.Time `db:"arrival_time" json:"arrivalTime"`
StartTime *time.Time `db:"start_time" json:"startTime"`
EndTime *time.Time `db:"end_time" json:"endTime"`
Crew []NewCrew `json:"crew"`
}
NewSignup required fields to add
type Position ¶
type Position struct {
PositionID int `db:"position_id" json:"positionID"`
Name string `db:"name" json:"name"`
Description string `db:"description" json:"description"`
Admin bool `db:"admin" json:"admin"`
PermissionID *int `db:"permission_id" json:"permissionID"`
}
Position is a role people can sign up too
type PositionRepo ¶
type PositionRepo interface {
List(ctx context.Context) (*[]Position, error)
New(ctx context.Context, p *Position) (int, error)
Update(ctx context.Context, p *Position) error
Delete(ctx context.Context, positionID int) error
}
PositionRepo defines all position interactions.
This repo is for managing the positions, where it feeds the system where the producer makes the signup sheet, but not the doesn't interact with an event directly.
type Signup ¶
type Signup struct {
SignupID int `db:"signup_id" json:"signupID"`
Title string `db:"title" json:"title"`
Description string `db:"description" json:"description"`
UnlockDate *time.Time `db:"unlock_date" json:"unlockDate"`
ArrivalTime *time.Time `db:"arrival_time" json:"arrivalTime"`
StartTime *time.Time `db:"start_time" json:"startTime"`
EndTime *time.Time `db:"end_time" json:"endTime"`
Crew []CrewPosition `json:"crew"`
}
Signup represents a signup sheet which contains a group of roles