contract

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateHelloRequest

type CreateHelloRequest struct {
	model.Hello
}

CreateHelloRequest is the request object for POST /hello

func (*CreateHelloRequest) Valid

func (r *CreateHelloRequest) Valid() error

Valid satisfies the Validator interface which allows incoming requests to be be made to parse a basic validation check

type GetAreaTypesRequest

type GetAreaTypesRequest struct {
	PaginationParams
	Dataset string `schema:"dataset"`
}

GetAreaTypesRequest defines the schema for the GET /area-types query parameter

func (*GetAreaTypesRequest) Valid

func (r *GetAreaTypesRequest) Valid() error

Valid validates the values given in the request

type GetAreaTypesResponse

type GetAreaTypesResponse struct {
	PaginationResponse
	AreaTypes []model.AreaType `json:"area-types"`
}

GetAreaTypesResponse is the response object for GET /area-types

type GetAreasRequest

type GetAreasRequest struct {
	Dataset  string `schema:"dataset"`
	AreaType string `schema:"area-type"`
	Text     string `schema:"text"`
}

GetAreasRequest defines the schema for the GET /areas query parameter

type GetAreasResponse

type GetAreasResponse struct {
	Areas []model.Areas `json:"areas"`
}

GetAreasResponse is the response object for GET /areas

type GetHelloResponse

type GetHelloResponse struct {
	Message string `json:"message"`
}

GetHelloResponse is the response object for GET /hello

type PaginationParams

type PaginationParams struct {
	Limit  int `json:"limit" schema:"limit"`
	Offset int `json:"offset" schema:"offset"`
}

type PaginationResponse

type PaginationResponse struct {
	PaginationParams
	Count      int `json:"count"`
	TotalCount int `json:"total_count"`
}

Jump to

Keyboard shortcuts

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