gateway

package
v0.0.0-...-356e89f Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2016 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Overview

Package gateway provides pz-gateway helper functions.

Index

Constants

View Source
const GatewayJobURL = "http://pz-gateway.cf.piazzageo.io/job"

GatewayJobURL is the Piazza registration endpoint

Variables

This section is empty.

Functions

func RegisterService

func RegisterService(m ResourceMetadata) error

RegisterService handles service registartion with Piazza for external services.

Types

type JobMsg

type JobMsg struct {
	Type  string `json:"type"`
	JobID string `json:"jobId"`
}

JobMsg defines the expected output JSON returned by Piazza when an external service is registered.

type ResourceMetadata

type ResourceMetadata struct {
	Name             string `json:"name"`
	Description      string `json:"description"`
	URL              string `json:"url"`
	Method           string `json:"method,omitempty"`
	RequestMimeType  string `json:"requestMimeType,omitempty"`
	ResponseMimeType string `json:"responseMimeType,omitempty"`
	Params           string `json:"params,omitempty"`
}

ResourceMetadata defines the metadata required to register the service.

Jump to

Keyboard shortcuts

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