Documentation
¶
Index ¶
Constants ¶
View Source
const ( ParameterConfigurationLayer = "layer" ParameterConfigurationBundle = "bundle" ParameterConfigurationOwner = "owner" ParameterConfigurationKey = "key" )
Variables ¶
View Source
var ( ErrNoSuchCommand = errors.New("no such command") ErrGortBundleDisabled = errors.New("gort bundle disabled") )
View Source
var ( // ErrMissingValue is returned by a method when an expected form field // is missing. ErrMissingValue = errors.New("a form value is missing") )
Functions ¶
func GenerateTemporaryTLSKeys ¶ added in v0.9.0
Types ¶
type RESTServer ¶
RESTServer represents a Gort REST API service.
func BuildRESTServer ¶
func BuildRESTServer(ctx context.Context, addr string) *RESTServer
BuildRESTServer builds a RESTServer.
func (*RESTServer) ListenAndServe ¶
func (s *RESTServer) ListenAndServe() error
ListenAndServe starts the Gort web service.
func (*RESTServer) ListenAndServeTLS ¶ added in v0.9.0
func (s *RESTServer) ListenAndServeTLS(certFile string, keyFile string) error
ListenAndServe starts the Gort web service.
func (*RESTServer) Requests ¶
func (s *RESTServer) Requests() <-chan RequestEvent
Requests retrieves the channel to which user request events are sent.
type RequestEvent ¶
type RequestEvent struct { Addr string UserID string Timestamp time.Time Request string Status int Size int64 }
RequestEvent represents a request of a service endpoint.
func (RequestEvent) String ¶
func (e RequestEvent) String() string
type StatusCaptureWriter ¶
type StatusCaptureWriter struct { http.ResponseWriter // contains filtered or unexported fields }
StatusCaptureWriter is a wrapper around a http.ResponseWriter that is used by middleware to capture a response status and byte length for logging purposes.
func (StatusCaptureWriter) Header ¶
func (w StatusCaptureWriter) Header() http.Header
Header returns the header map that will be sent by http.WriteHeader.
func (StatusCaptureWriter) Write ¶
func (w StatusCaptureWriter) Write(bytes []byte) (int, error)
Write writes the data to the connection as part of an HTTP reply.
func (StatusCaptureWriter) WriteHeader ¶
func (w StatusCaptureWriter) WriteHeader(statusCode int)
WriteHeader sends an HTTP response header with the provided status code.
Click to show internal directories.
Click to hide internal directories.