Documentation ¶
Index ¶
- Constants
- func Auth(c *config.Config) http.HandlerFunc
- func CreateEvent(client *http.Client, c *config.Config) http.HandlerFunc
- func CreateSession(client *http.Client, c *config.Config) http.HandlerFunc
- func CreateSpeaker(client *http.Client, c *config.Config) http.HandlerFunc
- func DeleteEventById(client *http.Client, c *config.Config) http.HandlerFunc
- func DeleteSessionById(client *http.Client, c *config.Config) http.HandlerFunc
- func DeleteSpeakerById(client *http.Client, c *config.Config) http.HandlerFunc
- func EditEventById(client *http.Client, c *config.Config) http.HandlerFunc
- func EditSessionById(client *http.Client, c *config.Config) http.HandlerFunc
- func EditSpeakerById(client *http.Client, c *config.Config) http.HandlerFunc
- func GetAllEvents(client *http.Client, c *config.Config) http.HandlerFunc
- func GetAllSessions(client *http.Client, c *config.Config) http.HandlerFunc
- func GetAllSpeakers(client *http.Client, c *config.Config) http.HandlerFunc
- func GetEventById(client *http.Client, c *config.Config) http.HandlerFunc
- func GetImageByFilename(c *config.Config) http.HandlerFunc
- func GetSessionById(client *http.Client, c *config.Config) http.HandlerFunc
- func GetSpeakerById(client *http.Client, c *config.Config) http.HandlerFunc
- func SignIn(client *http.Client, c *config.Config) http.HandlerFunc
- func SignOut(c *config.Config) http.HandlerFunc
- func UploadImage(c *config.Config) http.HandlerFunc
Constants ¶
const ( ID = "id" FILENAME = "filename" CONTENT_TYPE = "Content-Type" APPLICATION_JSON = "application/json" IMAGE_JPEG = "image/jpeg" )
const FORM_DATA_NAME = "file"
Our frontend appends a file and sets the form data name to `file`. It's the most commonly used name for form data.
const (
IMAGES_DIRECTORY_PATH = "./images"
)
Variables ¶
This section is empty.
Functions ¶
func CreateEvent ¶
`/events` POST route. It's a protected route. It communicates with the event service only.
func CreateSession ¶
`/sessions` POST route. It's a protected route. It communicates with the session service only.
func CreateSpeaker ¶
`/speakers` POST route. It's a protected route. It communicates with the speakers service only.
func DeleteEventById ¶
`/events/{id}` DELETE route. It's a protected route. It communicates with the event service only.
func DeleteSessionById ¶
`/sessions/{id}` DELETE route. It's a protected route. It communicates with the session service only.
func DeleteSpeakerById ¶
`/speakers/{id}` DELETE route. It's a protected route. It communicates with the speaker service only.
func EditEventById ¶
`/events/{id}` PUT route. It's a protected route. It communicates with the event service only.
func EditSessionById ¶
`/sessions/{id}` PUT route. It's a protected route. It communicates with the session service only.
func EditSpeakerById ¶
`/speakers/{id}` PUT route. It's a protected route. It communicates with the speaker service only.
func GetAllEvents ¶
`/events` GET route. It communicates with the event service only.
func GetAllSessions ¶
`/sessions` GET route. It communicates with the session service only.
func GetAllSpeakers ¶
`/speakers` GET route. It communicates with the speaker service only.
func GetEventById ¶
`/events/{id}` GET route. It communicates with the event service only.
func GetImageByFilename ¶
func GetImageByFilename(c *config.Config) http.HandlerFunc
`/images/{filename}` GET route. It doesn't communicate with the database or any of the services. It retrieves the images from the filesystem (`event/images`).
func GetSessionById ¶
`/sessions/{id}` GET route. It communicates with the session service only.
func GetSpeakerById ¶
`/speakers/{id}` GET route. It communicates with the speaker service only.
func SignOut ¶
func SignOut(c *config.Config) http.HandlerFunc
`/auth/sign-out` POST route. It communicates with the auth service only.
func UploadImage ¶
func UploadImage(c *config.Config) http.HandlerFunc
`/images` POST route. It doesn't communicate with the database or any of the services. It stores the image in the filesystem (`event/images`).
Types ¶
This section is empty.
Source Files ¶
- auth.go
- createEvent.go
- createSession.go
- createSpeaker.go
- deleteEventById.go
- deleteSessionById.go
- deleteSpeakerById.go
- editEventById.go
- editSessionById.go
- editSpeakerById.go
- getAllEvents.go
- getAllSessions.go
- getAllSpeakers.go
- getEventById.go
- getImageByFilename.go
- getSessionById.go
- getSpeakerById.go
- signIn.go
- signOut.go
- uploadImage.go
- util.go