example

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

nolint

nolint

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteEntity

func DeleteEntity()

DELETE /entities/{id}.json Delete an entity

Path: deletePathParams Response 204: {empty} Response 400: {empty}

func GetEntity

func GetEntity()

GET /entities/{id}.json Get entity by id

Query: QueryParams Response 200: entityResponse Response 400: {empty}

func ListEntities

func ListEntities()

GET /entities.json List of entities paginated.

Query: QueryParams Response 400: {empty}

func MyHandler

func MyHandler()

These docs are general Go docs, and not parsed (note the blank line). Actually, the above OpenAPI block could be anywhere in the code; and doesn't *have* to be right above the handler.

func Other

func Other()

Other others a lot!

func PatchEntity

func PatchEntity()

PATCH /entities/{id}.json Update an entity

Request body: entity Response 200: entityResponse Response 400: {empty}

func PostEntity

func PostEntity()

POST /entities.json Create an entity

Request body: entity Response 200: entityResponse Response 400: {empty}

Types

type AnObject

type AnObject struct {
	// Just any comment here really (int, required)
	ID int

	// Document it!
	Subject string

	// Document it!
	XSubject string
}

type ErrorObject

type ErrorObject struct {
	// Errors..
	Errors []MyError
}

ErrorObject ..

type MyError

type MyError struct {
	Message string
	Code    int
}

MyError ..

type QueryParams

type QueryParams struct {
	PageOffset int `json:"pageOffset"`
	PageSize   int `json:"pageSize"`
	Page       int `json:"page"`

	// Comma separated list of targets to order by.
	OrderBy string `json:"orderBy"`
	// Direction to order by ascending or descending.
	OrderMode string `json:"orderMode"` // {enum: asc desc}

	// Comma separated list of targets to include.
	Include string `json:"include"`
}

QueryParams documentation.

type RequestObj

type RequestObj struct {
	// woot woot
	Asd string
	// contains filtered or unexported fields
}

RequestObj is now documented.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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