Documentation ¶
Index ¶
- Constants
- func ErrorType(err error, code int) bool
- func HttpError(w http.ResponseWriter, message string, status int)
- func SetupHttpRouter(h *Handler) *mux.Router
- type Handler
- func (h *Handler) CreatePolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateRule(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeletePolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteRule(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetBackendServices(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetPolicies(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetPolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetPreConfiguredRules(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetRule(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HttpError(err error, w http.ResponseWriter, projectID, resource string)
- func (h *Handler) SetPolicyBackend(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdatePolicy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateRule(w http.ResponseWriter, r *http.Request)
Constants ¶
View Source
const ( EndpointDeletePolicy = "/projects/{project}/policies/{policy}" EndpointDeleteRule = "/projects/{project}/policies/{policy}/rules/{priority}" )
View Source
const ( EndpointGetPolicy = "/projects/{project}/policies/{policy}" EndpointGetPolicies = "/projects/{project}/policies" EndpointGetRule = "/projects/{project}/policies/{policy}/rules/{priority}" EndpointGetPreConfiguredRules = "/projects/{project}/preConfiguredRules" EndpointGetBackendServices = "/projects/{project}/backendServices" )
View Source
const ( EndpointIsAlive = "/internal/isalive" EndpointIsReady = "/internal/isready" )
View Source
const ( EndpointUpdatePolicy = "/projects/{project}/policies/{policy}" EndpointUpdateRule = "/projects/{project}/policies/{policy}/rules/{priority}" )
View Source
const ( EndpointCreatePolicy = "/projects/{project}/policies" EndpointCreateRule = "/projects/{project}/policies/{policy}/rules" EndpointSetPolicyBackend = "/projects/{project}/policies/{policy}/backendServices/{backend}" )
Variables ¶
This section is empty.
Functions ¶
func SetupHttpRouter ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) CreatePolicy ¶
func (h *Handler) CreatePolicy(w http.ResponseWriter, r *http.Request)
func (*Handler) CreateRule ¶
func (h *Handler) CreateRule(w http.ResponseWriter, r *http.Request)
func (*Handler) DeletePolicy ¶
func (h *Handler) DeletePolicy(w http.ResponseWriter, r *http.Request)
func (*Handler) DeleteRule ¶
func (h *Handler) DeleteRule(w http.ResponseWriter, r *http.Request)
func (*Handler) GetBackendServices ¶
func (h *Handler) GetBackendServices(w http.ResponseWriter, r *http.Request)
func (*Handler) GetPolicies ¶
func (h *Handler) GetPolicies(w http.ResponseWriter, r *http.Request)
func (*Handler) GetPreConfiguredRules ¶
func (h *Handler) GetPreConfiguredRules(w http.ResponseWriter, r *http.Request)
func (*Handler) HttpError ¶
func (h *Handler) HttpError(err error, w http.ResponseWriter, projectID, resource string)
func (*Handler) SetPolicyBackend ¶
func (h *Handler) SetPolicyBackend(w http.ResponseWriter, r *http.Request)
func (*Handler) UpdatePolicy ¶
func (h *Handler) UpdatePolicy(w http.ResponseWriter, r *http.Request)
func (*Handler) UpdateRule ¶
func (h *Handler) UpdateRule(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.