inter

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	// Get the service container
	Container() *Container

	// Set the service container
	SetContainer(container Container)

	// Register a shared binding in the container.
	Singleton(abstract interface{}, concrete interface{})

	// Resolve the given type from the container.
	Make(abstract interface{}) interface{}

	// Register an existing instance as shared in the container.
	Instance(abstract interface{}, concrete interface{}) interface{}

	// Register an existing instance as shared in the container without an abstract
	BindStruct(concrete interface{}) interface{}

	// Bind all of the application paths in the container.
	BindPathsInContainer(path BasePath)
}

type Bag

type Bag interface {
	Source() map[string]Collection
	Get(key string) Value
	GetMany(key string) Collection
	Set(key string, value Value)
	Push(key string, value interface{})
	Del(key string)
	Merge(bags ...Bag) Bag
}

type BasePath

type BasePath interface {
	AppPath() string
	BasePath() string
	BootstrapPath() string
	ConfigPath() string
	DatabasePath() string
	LangPath() string
	PublicPath() string
	StoragePath() string
	ResourcePath() string
	EnvironmentFile() string
	EnvironmentTestingFile() string
}

type Bindings

type Bindings map[string]interface{}

type BootServiceProvider

type BootServiceProvider interface {
	Boot(app App) App
}

type Bootstrap

type Bootstrap interface {
	Bootstrap(app App) App
}

type Collection

type Collection interface {
	Source() []Value
	First() Value
	Push(item interface{}) Collection
	Reverse() Collection
	Contains(search interface{}) bool
	Len() int
}

type ConsoleKernel

type ConsoleKernel interface {
}

type Container

type Container interface {
	// Resolve the given type from the container.
	Make(abstract interface{}) interface{}

	// Register a shared binding in the container.
	Singleton(abstract interface{}, concrete interface{})

	// Register an existing instance as shared in the container.
	Instance(abstract interface{}, concrete interface{}) interface{}

	// // Register an existing instance as shared in the container without an abstract
	BindStruct(concrete interface{}) interface{}

	// Get the container's bindings.
	Bindings() Bindings

	Copy() Container

	// "Extend" an abstract type in the container.
	Extend(abstract interface{}, function func(service interface{}) interface{})
}

type Controller

type Controller func(request Request) Response

type Decorator

type Decorator interface {
	Decorate(route Route) Route
}

type ExceptionHandler

type ExceptionHandler interface {
}

type HttpKernel

type HttpKernel interface {
	Handle(request *http.Request) http.ResponseWriter
}

type HttpMiddleware

type HttpMiddleware interface {
	Handle(request Request, next Next) Response
}

type Instances

type Instances map[string]interface{}

type MapMethodRoutes

type MapMethodRoutes map[string][]Route

type Model

type Model interface {
	ToMap
	Id() int
}

type Next

type Next = Controller

type Pusher

type Pusher interface {
	Push(interface{}) interface{}
}

type RegisterServiceProvider

type RegisterServiceProvider interface {
	Register(app App) App
}

type Request

type Request interface {
	App() App
	SetApp(app App) Request
	Make(abstract interface{}) interface{}
	Content() string
	SetContent(content string) Request
	Source() http.Request
	Method() string
	IsMethod(method string) bool
	Path() string
	Url() string
	FullUrl() string
	All() Bag
	Value(key string) Value
	ValueOr(key string, value interface{}) Value
	Values(key string) Collection
	SetUrlValues(vars map[string]string) Request
	Header(key string) string
	Headers() http.Header
	Route() Route
}

type Response

type Response interface {
	Content() string
	SetContent(content string) Response
	Status() int
	SetStatus(status int) Response
	Header(key string) string
	Headers() http.Header
}

type Route

type Route interface {
	Uri() string
	SetUri(url string) Route
	Method() string
	Controller() Controller
	SetPrefix(prefix string) Route
	SetDestination(destination string) Route
	SetStatus(status int) Route
	RouteOptions() RouteOptions
	Constraint() map[string]string
	SetConstraint(parameter string, regex string) Route
	Domain() string
	SetDomain(domain string) Route
	Name() string
	SetName(name string) Route
	Named(pattern ...string) bool
	Middleware() []HttpMiddleware
	SetMiddleware(middlewares []HttpMiddleware) Route
	SetExcludeMiddleware(middlewares []HttpMiddleware) Route
}

type RouteCollection

type RouteCollection interface {
	SetApp(app App)
	App() App
	Push(route Route) RouteCollection
	Merge(routeCollections RouteCollection) RouteCollection
	All() []Route
	Match(request Request) Route
	Where(parameter, regex string) RouteCollection
	WhereMulti(constraints map[string]string) RouteCollection
	Domain(domain string) RouteCollection
	Prefix(prefix string) RouteCollection
	Name(name string) RouteCollection
	Middleware(...HttpMiddleware) RouteCollection
	WithoutMiddleware(...HttpMiddleware) RouteCollection
}

type RouteOptions

type RouteOptions interface {
	Prefixes() []string
}

type Rule

type Rule interface {
	Passes(value string) error
}

type ToMap

type ToMap interface {
	ToMap() map[string]interface{}
}

type Value

type Value interface {
	Source() interface{}
	String() string
	StringE() (string, error)
	Strings() []string
	StringsE() ([]string, error)
	Number() int
	NumberE() (int, error)
	Numbers() []int
	NumbersE() ([]int, error)
	Empty() bool
	Present() bool
	Split(separator string) []string
}

Jump to

Keyboard shortcuts

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