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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewEvent

type NewEvent struct {
	EventType   string    `json:"eventType"`
	Name        string    `json:"name"`
	StartDate   time.Time `json:"startDate"`
	EndDate     time.Time `json:"endDate"`
	Description string    `json:"description"`
	Location    string    `json:"location"`
	IsPrivate   bool      `json:"isPrivate"`
	IsCancelled bool      `json:"isCancelled"`
}

NewEvent represents necessary fields to create a new event.

Here for making the documentation look more clean.

type Repos

type Repos struct {
	// contains filtered or unexported fields
}

Repos encapsulates the dependency

func NewRepos

func NewRepos(db *sqlx.DB) *Repos

NewRepos creates our data store

func (*Repos) DeleteCrew

func (r *Repos) DeleteCrew(c echo.Context) error

DeleteCrew handles deleting crew position

@Summary Delete crew @Description deletes a crew position by ID. @ID delete-signup @Tags clapper, signups @Param signupid path int true "Event ID" @Param signupid path int true "Signup ID" @Param signupid path int true "Crew ID" @Success 200 @Router /v1/internal/clapper/{eventid}/{signupid}/{crewid} [delete]

func (*Repos) DeleteSignup

func (r *Repos) DeleteSignup(c echo.Context) error

DeleteSignup handles deleting signup

@Summary Delete signup @Description deletes a signup by ID. @ID delete-signup @Tags clapper, signups @Param signupid path int true "Event ID" @Param signupid path int true "Signup ID" @Success 200 @Router /v1/internal/clapper/{eventid}/{signupid} [delete]

func (*Repos) GetEvent

func (r *Repos) GetEvent(c echo.Context) error

GetEvent handles getting all signups and roles for a given event @Summary Get event by ID @Description Get a event including signup-sheets and roles. @ID get-event @Tags clapper, events @Produce json @Param eventid path int true "Event ID" @Success 200 {object} clapper.Event @Router /v1/internal/clapper/event/{eventid} [get]

func (*Repos) ListMonth

func (r *Repos) ListMonth(c echo.Context) error

ListMonth returns all events for a month. @Summary List events by month @Description Lists events by month. The signup section will be null. @ID get-events-month @Tags clapper, events @Produce json @Param year path int true "year" @Param month path int true "month" @Success 200 {array} clapper.Event @Router /v1/internal/clapper/calendar/{year}/{month} [get]

func (*Repos) ListPosition

func (r *Repos) ListPosition(c echo.Context) error

ListPosition handles listing all possible positions @Summary List positions @Description Lists all positions. @ID get-positions @Tags positions @Produce json @Success 200 {array} clapper.Position @Router /v1/internal/clapper/positions [get]

func (*Repos) NewCrew

func (r *Repos) NewCrew(c echo.Context) error

NewCrew handles creating a new crew, this being a single person

@Summary NewCrew @Description Creates a new crew object, that being a single person. @ID new-crew @Tags clapper, crews @Accept json @Param eventid path int true "Event ID" @Param signupid path int true "Signup ID" @Param crewid path int true "Position ID" @Success 200 @Router /v1/internal/clapper/event/{eventid}/{signupid}/{positionid} [post]

func (*Repos) NewEvent

func (r *Repos) NewEvent(c echo.Context) error

NewEvent handles creating a new event @Summary New event @Description creates a new event. @Description You do not need to include the sign-up sheets just the meta @ID new-event @Tags events @Accept json @Param event body NewEvent true "Event object" @Success 201 body int "Event ID" @Router /v1/internal/clapper/event [post]

func (*Repos) NewPosition

func (r *Repos) NewPosition(c echo.Context) error

NewPosition handles creating a new position @Summary New position @Description creates a new position. @ID new-position @Tags positions @Accept json @Param event body clapper.Position true "Position object" @Success 201 body int "Position ID" @Router /v1/internal/clapper/positions [post]

func (*Repos) NewSignup

func (r *Repos) NewSignup(c echo.Context) error

NewSignup handles a creating a signup sheet

@Summary New signup sheet @Description Creates a new signup sheet, this is the sub part of an event @Description containing the list of crew, with a little metadata on top. @ID new-signup @Tags clapper, signups @Accept json @Param event body clapper.Signup true "Signup object" @Success 201 body int "Event ID" @Router /v1/internal/clapper/event/{eventid}/signup [post]

func (*Repos) ResetCrew

func (r *Repos) ResetCrew(c echo.Context) error

ResetCrew handles setting the crew position back to empty for when a user changes their mind.

@Summary Set crew user by user token @Description Uses JWT to set who is doing the crew position to empty @ID delete-crew-user-token @Tags clapper, crews @Param crewid path int true "Crew ID" @Success 200 @Router /v1/internal/clapper/crews/{crewid} [delete]

func (*Repos) SetCrew

func (r *Repos) SetCrew(c echo.Context) error

SetCrew handles setting the user ID for a crew object, essentially just signing a person up to the position.

@Summary Set crew user by user token @Description Uses JWT to set who is doing the crew position @ID set-crew-user-token @Tags clapper, crews @Param crewid path int true "Crew ID" @Success 200 @Router /v1/internal/clapper/crews/{crewid} [put]

func (*Repos) UpdateEvent

func (r *Repos) UpdateEvent(c echo.Context) error

UpdateEvent updates an existing event @Summary Update event @Description updates an event. Only uses the meta, if you change the @Description type it will delete the children. @ID update-event @Tags events @Accept json @Param quote body clapper.Event true "Event object" @Success 200 @Router /v1/internal/clapper/event [put]

func (*Repos) UpdatePosition

func (r *Repos) UpdatePosition(c echo.Context) error

UpdatePosition updates an existing position @Summary Update position @Description updates a position. @ID update-position @Tags positions @Accept json @Param quote body clapper.Position true "Position object" @Success 200 @Router /v1/internal/clapper/positions [put]

func (*Repos) UpdateSignup

func (r *Repos) UpdateSignup(c echo.Context) error

UpdateSignup updates an existing signup

@Summary Update signup @Description updates a signup sheet, to the body. @ID update-signup @Tags clapper, signups @Param eventid path int true "Event ID" @Param signupid path int true "Signup ID" @Accept json @Param quote body clapper.Signup true "Signup object" @Success 200 @Router /v1/internal/clapper/event/{eventid}/{signupid} [put]

Jump to

Keyboard shortcuts

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