api

package
v0.0.0-...-b12e379 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

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

func Init

func Init() Api

func (Api) Run

func (api Api) Run()

type AuthResource

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

func (AuthResource) Routes

func (rs AuthResource) Routes() chi.Router

type ConcertsResource

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

func (ConcertsResource) Create

func (rs ConcertsResource) Create(w http.ResponseWriter, r *http.Request)

@Summary Creates new concert @Tags Concerts @Param concert body domain.Concert true "Concert to create" @Security BearerAuth @Router /concerts [post]

func (ConcertsResource) Get

@Summary Returns concert info @Tags Concerts @Param id path integer true "Concert id" @Router /concerts/{id} [get]

func (ConcertsResource) GetAll

func (rs ConcertsResource) GetAll(w http.ResponseWriter, r *http.Request)

@Summary Returns list of concerts @Description Returns list of 10 last concerts in db oredered by concert_id. @Description Use last_id query parameter to select concerts before this last_id @Tags Concerts @Param last_id query integer false "id before which to get last concerts" @Router /concerts [get]

func (ConcertsResource) Routes

func (rs ConcertsResource) Routes() chi.Router

func (ConcertsResource) Update

func (rs ConcertsResource) Update(w http.ResponseWriter, r *http.Request)

@Summary Updates concert info @Tags Concerts @Param id path integer true "Concert id" @Param concert body domain.Concert true "Updated concert info" @Security BearerAuth @Router /concerts/{id} [put]

type TicketsResource

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

func (TicketsResource) Create

func (rs TicketsResource) Create(w http.ResponseWriter, r *http.Request)

@Summary Creates new ticket @Tags Tickets @Param ticket body domain.Ticket true "Ticket to create" @Security BearerAuth @Router /tickets [post]

func (TicketsResource) Get

@Summary Returns ticket info @Tags Tickets @Param id path integer true "Ticket id" @Security BearerAuth @Router /tickets/{id} [get]

func (TicketsResource) GetAll

func (rs TicketsResource) GetAll(w http.ResponseWriter, r *http.Request)

@Summary Returns list of tickets @Description Returns list of 10 last tickets in db oredered by ticket_id. @Description Use last_id query parameter to select tickets before this last_id @Tags Tickets @Param last_id query integer false "id before which to get last tickets" @Security BearerAuth @Router /tickets [get]

func (TicketsResource) GetAllOwn

func (rs TicketsResource) GetAllOwn(w http.ResponseWriter, r *http.Request)

@Summary Returns list of tickets that user has @Description Returns list of 10 last tickets that the user has in db oredered by ticket_id. @Description Use last_id query parameter to select tickets before this last_id @Tags Tickets @Param last_id query integer false "id before which to get last tickets" @Security BearerAuth @Router /tickets/own [get]

func (TicketsResource) Routes

func (rs TicketsResource) Routes() chi.Router

func (TicketsResource) Update

func (rs TicketsResource) Update(w http.ResponseWriter, r *http.Request)

@Summary Updates ticket info @Tags Tickets @Param id path integer true "Ticket id" @Param ticket body domain.Ticket true "Updated ticket info" @Security BearerAuth @Router /tickets/{id} [put]

func (TicketsResource) UpdateToken

func (rs TicketsResource) UpdateToken(w http.ResponseWriter, r *http.Request)

@Summary Updates ticket verification token @Tags Tickets @Param id path integer true "Ticket id" @Security BearerAuth @Router /tickets/{id}/token [put]

type UsersResource

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

func (UsersResource) Get

func (UsersResource) GetAll

func (rs UsersResource) GetAll(w http.ResponseWriter, r *http.Request)

func (UsersResource) Routes

func (rs UsersResource) Routes() chi.Router

Jump to

Keyboard shortcuts

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