clapper

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CrewRepo added in v0.9.6

type CrewRepo interface {
	SetCrew(c echo.Context) error
	ResetCrew(c echo.Context) error
	NewCrew(c echo.Context) error
	DeleteCrew(c echo.Context) error
}

Repos encapsulates the dependency

type EventRepo added in v0.9.6

type EventRepo interface {
	ListMonth(c echo.Context) error
	GetEvent(c echo.Context) error
	NewEvent(c echo.Context) error
	UpdateEvent(c echo.Context) error
	DeleteEvent(c echo.Context) error
}

Repos encapsulates the dependency

type PositionRepo added in v0.9.6

type PositionRepo interface {
	ListPositions(c echo.Context) error
	NewPosition(c echo.Context) error
	UpdatePosition(c echo.Context) error
	DeletePosition(c echo.Context) error
}

Repos encapsulates the dependency

type Repos

type Repos interface {
	CrewRepo
	EventRepo
	PositionRepo
	SignupRepo
}

Repos encapsulates the dependency

func NewRepos

func NewRepos(db *sqlx.DB, access utils.Repo) Repos

NewRepos creates our data store

type SignupRepo added in v0.9.6

type SignupRepo interface {
	NewSignup(c echo.Context) error
	UpdateSignup(c echo.Context) error
	DeleteSignup(c echo.Context) error
}

Repos encapsulates the dependency

type Store added in v0.9.6

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

Repos encapsulates the dependency

func (*Store) DeleteCrew added in v0.9.6

func (s *Store) DeleteCrew(c echo.Context) error

DeleteCrew handles deleting crew position

@Summary Delete crew @Description deletes a crew position by ID. @ID delete-crew @Tags clapper-crews @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 (*Store) DeleteEvent added in v0.9.6

func (s *Store) DeleteEvent(c echo.Context) error

DeleteEvent removes an event including child objects

@Summary Delete event @Description Removes an event including its children @ID delete-event @Tags clapper-events @Accept json @Param eventid path int true "Event ID" @Success 200 @Router /v1/internal/clapper/event/{eventid} [delete]

func (*Store) DeletePosition added in v0.9.6

func (s *Store) DeletePosition(c echo.Context) error

DeletePosition removes a position

@Summary Delete position @ID delete-position @Tags clapper-positions @Accept json @Param positionid path int true "Position ID" @Success 200 @Router /v1/internal/clapper/positions/{positionid} [delete]

func (*Store) DeleteSignup added in v0.9.6

func (s *Store) 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 (*Store) GetEvent added in v0.9.6

func (s *Store) GetEvent(c echo.Context) error

GetEvent handles getting all signups and roles for a given event @Summary Get event by ID @Description Get an 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 (*Store) ListMonth added in v0.9.6

func (s *Store) 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/monthly/{year}/{month} [get]

func (*Store) ListPositions added in v0.9.6

func (s *Store) ListPositions(c echo.Context) error

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

func (*Store) NewCrew added in v0.9.6

func (s *Store) NewCrew(c echo.Context) error

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

@Summary Add a position to a signup sheet as crew @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 (*Store) NewEvent added in v0.9.6

func (s *Store) 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 clapper-events @Accept json @Param event body clapper.NewEvent true "Event object" @Success 201 body int "Event ID" @Router /v1/internal/clapper/event [post]

func (*Store) NewPosition added in v0.9.6

func (s *Store) NewPosition(c echo.Context) error

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

func (*Store) NewSignup added in v0.9.6

func (s *Store) 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 subpart 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.NewSignup true "Signup object" @Success 201 body int "Event ID" @Router /v1/internal/clapper/event/{eventid}/signup [post]

func (*Store) ResetCrew added in v0.9.6

func (s *Store) ResetCrew(c echo.Context) error

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

@Summary Reset crew user to blank @Description Uses JWT to set who is doing the crew position to empty @ID delete-crew-user-token @Tags clapper-crews @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/{signupid}/{crewid}/reset [put]

func (*Store) SetCrew added in v0.9.6

func (s *Store) 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 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}/{crewid} [put]

func (*Store) UpdateEvent added in v0.9.6

func (s *Store) UpdateEvent(c echo.Context) error

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

func (*Store) UpdatePosition added in v0.9.6

func (s *Store) UpdatePosition(c echo.Context) error

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

func (*Store) UpdateSignup added in v0.9.6

func (s *Store) 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