Documentation ¶
Index ¶
- func Healthcheck(c *app.Context) error
- func Login(c *app.Context) (err error)
- func NoteCreate(c *app.Context) (err error)
- func NoteDestroy(c *app.Context) (err error)
- func NoteIndex(c *app.Context) (err error)
- func NoteShow(c *app.Context) (err error)
- func NoteUpdate(c *app.Context) (err error)
- func Register(c *app.Context) (err error)
- type Note
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Healthcheck ¶
Healthcheck - swagger:route GET /api/v1/healthcheck healthcheck HealthcheckGET
Returns an OK message to show the application is functioning.
You can use this endpoint as a healthcheck for a load balancer.
Responses:
200: OKResponse
func Login ¶
Login - swagger:route POST /api/v1/login authentication UserLogin
Return a token after verifying the login information.
Responses:
200: LoginResponse 400: BadRequestResponse 500: InternalServerErrorResponse
func NoteCreate ¶
NoteCreate - swagger:route POST /api/v1/note note NoteCreate
Create a note for the current user.
Security:
token:
Responses:
201: NoteCreateResponse 400: BadRequestResponse 401: UnauthorizedResponse 500: InternalServerErrorResponse
func NoteDestroy ¶
NoteDestroy - swagger:route DELETE /api/v1/note/{note_id} note NoteDestroy
Delete a note for the current user.
Security:
token:
Responses:
200: OKResponse 400: BadRequestResponse 401: UnauthorizedResponse 500: InternalServerErrorResponse
func NoteIndex ¶
NoteIndex - swagger:route GET /api/v1/note note NoteIndex
Return all notes for the current user.
Security:
token:
Responses:
200: NoteIndexResponse 400: BadRequestResponse 401: UnauthorizedResponse 500: InternalServerErrorResponse
func NoteShow ¶
NoteShow - swagger:route GET /api/v1/note/{note_id} note NoteShow
Return a note for the current user.
Security:
token:
Responses:
200: NoteShowResponse 400: BadRequestResponse 401: UnauthorizedResponse 500: InternalServerErrorResponse
func NoteUpdate ¶
NoteUpdate - swagger:route PUT /api/v1/note/{note_id} note NoteUpdate
Update a note for the current user.
Security:
token:
Responses:
200: OKResponse 400: BadRequestResponse 401: UnauthorizedResponse 500: InternalServerErrorResponse
Types ¶
type Note ¶
type Note struct { // User who owns the note. // example: 314445cd-e9fb-4c58-58b6-777ee06465f5 // required: true UserID string `json:"id"` // This is the text content of the note. // example: This is a note. // required: true Message string `json:"message"` }
Note represents a note belonging to a user. swagger:model