package example
import "zgo.at/kommentaar/example"
nolint
nolint
Index ¶
- func DeleteEntity()
- func GetEntity()
- func ListEntities()
- func MyHandler()
- func Other()
- func PatchEntity()
- func PostEntity()
- type AnObject
- type ErrorObject
- type MyError
- type QueryParams
- type RequestObj
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 ¶
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.
Source Files ¶
example.go second.go unified.go
Directories ¶
Path | Synopsis |
---|---|
example/exampleimport |
- Version
- v0.0.0-20230517222226-0b90222c1cce (latest)
- Published
- May 17, 2023
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 14 minutes ago –
Tools for package owners.