Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ApiRoutes = []APIRoute{ {"serviceTypes:create", "POST", "/service-types", handlers.ServiceTypeCreate, true}, {"serviceTypes:ListOne", "GET", "/service-types/{service-type}", handlers.ServiceTypesListOne, true}, {"serviceTypes:DeleteOne", "DELETE", "/service-types/{service-type}", handlers.ServiceTypeDeleteOne, true}, {"serviceTypes:ListOne", "PUT", "/service-types/{service-type}", handlers.ServiceTypeUpdate, true}, {"serviceType:ListAll", "GET", "/service-types", handlers.ServiceTypeListAll, true}, {"authMethod:Create", "POST", "/service-types/{service-type}/authm", handlers.AuthMethodCreate, true}, {"authMethod:ListOne", "GET", "/service-types/{service-type}/hosts/{host}/authm", handlers.AuthMethodListOne, true}, {"authMethod:Delete", "DELETE", "/service-types/{service-type}/hosts/{host}/authm", handlers.AuthMethodDeleteOne, true}, {"authMethod:Delete", "PUT", "/service-types/{service-type}/hosts/{host}/authm", handlers.AuthMethodUpdateOne, true}, {"bindings:ListAllByServiceTypeAndHost", "GET", "/service-types/{service-type}/hosts/{host}/bindings", handlers.BindingListAllByServiceTypeAndHost, true}, {"authMethod:ListAll", "GET", "/authm", handlers.AuthMethodListAll, true}, {"bindings:create", "POST", "/bindings/{name}", handlers.BindingCreate, true}, {"bindings:ListAll", "GET", "/bindings", handlers.BindingListAll, true}, {"bindings:update", "PUT", "/bindings/{name}", handlers.BindingUpdate, true}, {"bindings:ListOneByName", "GET", "/bindings/{name}", handlers.BindingListOneByName, true}, {"bindings:delete", "DELETE", "/bindings/{name}", handlers.BindingDelete, true}, {"auth:dn", "GET", "/service-types/{service-type}/hosts/{host}:authx509", handlers.AuthViaCert, false}, }
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Router *mux.Router // router Object reference Routes []APIRoute // routes definitions list }
API Object that holds routing information and the router itself
type APIRoute ¶
type APIRoute struct { Name string // name of the route for description purposes Method string // GET, POST, PUT string literals Path string // API call path with urlVars included Handler http.HandlerFunc // Handler Function to be used Auth bool // whether or not it should use the auth handler }
APIRoute Item describing an API route
Click to show internal directories.
Click to hide internal directories.