Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ApiBlueprintPrefix base URI prefix for all blueprint routes ApiBlueprintPrefix = common.ApiV1UriPrefix + "/blueprint" )
View Source
const BlueprintURIVariableId = "blueprintId"
View Source
const ( // ErrKeyBlueprintError error key placeholder ErrKeyBlueprintError string = "BlueprintError" )
Variables ¶
View Source
var ( // ApiBlueprintIdVariable URI variable used to get blueprint Id out of URI ApiBlueprintIdVariable = fmt.Sprintf("/{%s}", BlueprintURIVariableId) )
Functions ¶
func AttachRoutes ¶
func AttachRoutes(request *AttachRoutesRequest)
AttachRoutes attaches blueprint handler to corresponding routes on router
Types ¶
type AttachRoutesRequest ¶
type AttachRoutesRequest struct { // Router main router being served by Api Router *router.Router // Handler valid blueprint handler Handler blueprintHandler }
AttachRoutesRequest holds everything needed to attach blueprint routes to router
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler manages blueprint requests
func NewHandler ¶
func NewHandler(service blueprintService, validator blueprintValidator) *Handler
NewHandler returns blueprint handler
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service holds and manages blueprint business logic
func NewService ¶
func NewService(blueprintRespository blueprintRespository) *Service
NewService created blueprint service
Click to show internal directories.
Click to hide internal directories.