Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct { // Code is a unique code for the Endpoint. Doesn't have to be globally unique, just unique per service. For example, // "POST /locations" or "GET /locations/:id" Code *EndpointCode `json:"code"` // Name is a friendly name for the Endpoint. For example, "Create location" or "Get location by id" Name *EndpointName `json:"name"` // Dependencies is a map of Dependencies for a given Endpoint. Keys are service codes, values are lists of endpoint codes Dependencies *map[ServiceCode][]EndpointCode `json:"dependencies"` }
Endpoint represents an Endpoint of a Service
type EndpointCode ¶
type EndpointCode = string
EndpointCode is a code that uniquely identifies an Endpoint. It need not be globally unique, only unique within that one Service
type EndpointName ¶
type EndpointName = string
EndpointName is the human-readable/friedly name of an Endpoint
type Service ¶
type Service struct { // Code is a unique code for the service. For example, "location_tracking" for a location tracking service Code *ServiceCode `json:"code"` // Name is a friendly name for the service. For example, "Location Tracking" for a location tracking service Name *ServiceName `json:"name"` // Endpoints is a list of Endpoints that the Service has Endpoints *[]Endpoint `json:"endpoints"` }
Service represents a service
func MakeServiceFromEntity ¶
MakeServiceFromEntity constructs a Service DTO from a Service Entity
func MakeServiceFromRequest ¶
MakeServiceFromRequest constructs a Service DTO from an HTTP request
type ServiceCode ¶
type ServiceCode = string
ServiceCode is a code that uniquely identifies a Service
type ServiceName ¶
type ServiceName = string
ServiceName is the human-readable/friedly name of a Service
Click to show internal directories.
Click to hide internal directories.