clapper

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attendee

type Attendee struct {
	User
	AttendStatus string `db:"attend_status" json:"attendStatus"`
}

Attendee represents a persons attendance for a meeting, social or other

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 a 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 *Event, 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 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 null.Int `db:"permission_id" json:"permissionID"`
}

Position is a role people can signup 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  null.Time      `db:"unlock_date" json:"unlockDate"`
	ArrivalTime null.Time      `db:"arrival_time" json:"arrivalTime"`
	StartTime   null.Time      `db:"start_time" json:"startTime"`
	EndTime     null.Time      `db:"end_time" json:"endTime"`
	Crew        []CrewPosition `json:"crew"`
}

Signup represents a signup sheet which contains a group of roles

type SignupRepo

type SignupRepo interface {
	New(ctx context.Context, eventID int, s Signup) (int, error)
	Update(ctx context.Context, s Signup) error
	Delete(ctx context.Context, signupID int) error
}

SignupRepo defines all signup sheet interactions

type User

type User struct {
	UserID    int    `db:"user_id" json:"userID"`
	Nickname  string `db:"nickname" json:"nickname"`
	FirstName string `db:"first_name" json:"firstName"`
	LastName  string `db:"last_name" json:"lastName"`
}

User a basic representation of a user

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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