github.com/axw/juju@v0.0.0-20161005053422-4bd6544d08d4/apiserver/common/apihttp/endpoint.go (about)

     1  // Copyright 2016 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package apihttp
     5  
     6  import (
     7  	"net/http"
     8  )
     9  
    10  // Endpoint describes a single HTTP endpoint.
    11  type Endpoint struct {
    12  	// Pattern is the pattern to match for the endpoint.
    13  	Pattern string
    14  
    15  	// Method is the HTTP method to use (e.g. GET).
    16  	Method string
    17  
    18  	// Handler is the HTTP handler to use.
    19  	Handler http.Handler
    20  }