endpoint

package
v0.0.0-...-4790e63 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Healthcheck

func Healthcheck(c *app.Context) error

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

func Login(c *app.Context) (err error)

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

func NoteCreate(c *app.Context) (err error)

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

func NoteDestroy(c *app.Context) (err error)

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

func NoteIndex(c *app.Context) (err error)

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

func NoteShow(c *app.Context) (err error)

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

func NoteUpdate(c *app.Context) (err error)

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

func Register

func Register(c *app.Context) (err error)

Register - swagger:route POST /api/v1/register authentication UserRegister

Create a user in the system.

Responses:

201: RegisterResponse
400: BadRequestResponse
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

Jump to

Keyboard shortcuts

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