Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContextFromRequest ¶
NewContextFromRequest provides a new context including a trxId from the request or if missing, a brand new trxId.
func ValidateEndpoint ¶
ValidateEndpoints provides url/uri level validation, it does not make any actual http(s) requests
func ValidateUUID ¶
ValidateUUID checks the uuid string for supported formats
func WriteJSONMessage ¶
func WriteJSONMessage(w http.ResponseWriter, status int, msg string) error
WriteJSONMessage writes the msg provided as encoded json with the proper content type header added.
Types ¶
type Endpoint ¶
type Endpoint interface {
// Endpoint
// Returns the endpoint
Endpoint() string
// IsValid
// Validates the structure of the url/uri(s)
IsValid() error
// IsGTG
// Checks if this endpoint is actually reachable and performing as expected
IsGTG(ctx context.Context) (string, error)
}
Common type/behaviour definition for an endpoint
Click to show internal directories.
Click to hide internal directories.