rest

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Definitions = []di.Def{
	{
		Build: func(ctn di.Container) (interface{}, error) {
			folders := ctn.Get("focus.media.actions.folder").(*actions.Folders)
			validator := ctn.Get("focus.validator").(services.Validator)
			return handlers.NewFolderHandler(folders, validator), nil
		},
		Name: "focus.media.handler.folder",
	},
	{
		Build: func(ctn di.Container) (interface{}, error) {
			medias := ctn.Get("focus.media.actions.media").(*actions.Medias)
			validator := ctn.Get("focus.validator").(services.Validator)
			return handlers.NewMediaHandler(medias, validator), nil
		},
		Name: "focus.media.handler.media",
	},
	{
		Build: func(ctn di.Container) (interface{}, error) {
			confHandler := ctn.Get("focus.media.handler.folder").(*handlers.FolderHandler)
			optHandler := ctn.Get("focus.media.handler.media").(*handlers.MediaHandler)
			errorHandler := ctn.Get("focus.errorHandler").(services.ErrorHandler)
			return NewRouter(confHandler, optHandler, errorHandler), nil
		},
		Name: "focus.media.router",
	},
}

Functions

This section is empty.

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router сервис роутинга

func NewRouter

func NewRouter(folderHandler *handlers.FolderHandler,
	mediaHandler *handlers.MediaHandler,
	errorHandler services.ErrorHandler,
) *Router

NewRouter конструктор

func (*Router) SetRoutes

func (r *Router) SetRoutes(group *gin.RouterGroup)

SetRoutes проставление роутов

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL