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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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