api

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

README

pkg/api

The packages here contain the data model for the threeport API. The types represent the objects that are manipulated through the API and often correspond to tables in the database, the type fields to the columns of those tables.

The generated code for the objects includes all the needed methods, the string constants that represent their object types (used in responses to client requests), the NATS subject names that are used for notifications to the controllers as well as the REST paths that are used by the APIs request router.

The objects are versioned so that backward compatibility for the API objects can be maintained across releases of threeport itself. When required fields are added to an object or when fields are removed, a new version for that API object must be created.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RestapiVersions = make(map[string]RESTAPIVersions)

Functions

func AddRestApiVersion

func AddRestApiVersion(vo iapi.VersionObject)

Types

type RESTAPIVersions

type RESTAPIVersions struct {
	//  Required.  REST API resource name.
	API string `json:"API" validate:"required"`
	// Required.  REST API resource versions.
	Versions []string `json:"Versions" validate:"required"`
}

RESTAPIVersions provides the versions for individual REST endpoints.

Directories

Path Synopsis
+threeport-sdk route-exclude
+threeport-sdk route-exclude

Jump to

Keyboard shortcuts

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